GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
GGaus Class Reference

Definition at line 9 of file GGaus.h.

Public Member Functions

 GGaus (Double_t xlow, Double_t xhigh, Option_t *opt="gsc")
 
 GGaus (Double_t xlow, Double_t xhigh, TF1 *bg, Option_t *opt="gsc")
 
 GGaus (const GGaus &)
 
 GGaus ()
 
 ~GGaus () override
 
TF1 * Background (Option_t *="TF1")
 
void Clear (Option_t *opt="") override
 
void Copy (TObject &) const override
 
void DrawResiduals (TH1 *) const
 
bool Fit (TH1 *, Option_t *opt="")
 
Double_t GetArea () const
 
Double_t GetAreaErr () const
 
Double_t GetCentroid () const
 
Double_t GetCentroidErr () const
 
Double_t GetFWHM () const
 
Double_t GetFWHMErr () const
 
Double_t GetSum () const
 
Double_t GetSumErr () const
 
void InitNames ()
 
bool InitParams (TH1 *fithist=nullptr)
 
void Print (Option_t *opt="") const override
 

Static Public Member Functions

static Bool_t CompareArea (const GGaus &lhs, const GGaus &rhs)
 
static Bool_t CompareEnergy (const GGaus &lhs, const GGaus &rhs)
 

Protected Member Functions

void SetArea (Double_t a)
 
void SetArea (Double_t a, Double_t dA)
 
void SetAreaErr (Double_t d_a)
 
void SetChi2 (Double_t chi2)
 
void SetNdf (Double_t Ndf)
 
void SetSum (Double_t a)
 
void SetSumErr (Double_t d_a)
 

Private Member Functions

Bool_t IsInitialized () const
 
void SetInitialized (Bool_t flag=true)
 

Private Attributes

double fArea {0.}
 
TF1 fBGFit
 
TF1 fBGHist
 
double fChi2 {0.}
 
double fDArea {0.}
 
double fDSum {0.}
 
double fNdf {0.}
 
double fSum {0.}
 
bool init_flag {false}
 

#include <GGaus.h>

+ Inheritance diagram for GGaus:
+ Collaboration diagram for GGaus:

Constructor & Destructor Documentation

◆ GGaus() [1/4]

GGaus::GGaus ( Double_t  xlow,
Double_t  xhigh,
Option_t *  opt = "gsc" 
)

◆ GGaus() [2/4]

GGaus::GGaus ( Double_t  xlow,
Double_t  xhigh,
TF1 *  bg,
Option_t *  opt = "gsc" 
)

Definition at line 32 of file GGaus.cxx.

References Clear(), fBGFit, and InitNames().

◆ GGaus() [3/4]

GGaus::GGaus ( const GGaus peak)

Definition at line 64 of file GGaus.cxx.

References Copy().

◆ GGaus() [4/4]

GGaus::GGaus ( )

Definition at line 55 of file GGaus.cxx.

References Clear(), fBGFit, and InitNames().

◆ ~GGaus()

GGaus::~GGaus ( )
override

Definition at line 69 of file GGaus.cxx.

Member Function Documentation

◆ Background()

TF1* GGaus::Background ( Option_t *  = "TF1")
inline

Definition at line 28 of file GGaus.h.

References fBGFit.

◆ Clear()

void GGaus::Clear ( Option_t *  opt = "")
override

Definition at line 230 of file GGaus.cxx.

References fArea, fChi2, fDArea, fDSum, fNdf, fSum, and init_flag.

Referenced by GGaus().

◆ CompareArea()

static Bool_t GGaus::CompareArea ( const GGaus lhs,
const GGaus rhs 
)
inlinestatic

Definition at line 61 of file GGaus.h.

References GetArea().

◆ CompareEnergy()

static Bool_t GGaus::CompareEnergy ( const GGaus lhs,
const GGaus rhs 
)
inlinestatic

Definition at line 60 of file GGaus.h.

References GetCentroid().

◆ Copy()

void GGaus::Copy ( TObject &  obj) const
override

Definition at line 82 of file GGaus.cxx.

References fArea, fBGFit, fChi2, fDArea, fDSum, fNdf, fSum, and init_flag.

Referenced by Fit(), and GGaus().

◆ DrawResiduals()

void GGaus::DrawResiduals ( TH1 *  hist) const

Definition at line 263 of file GGaus.cxx.

References fChi2, and hist.

◆ Fit()

Bool_t GGaus::Fit ( TH1 *  fithist,
Option_t *  opt = "" 
)

Definition at line 156 of file GGaus.cxx.

References Copy(), DGREEN, DRED, fArea, fBGFit, fDSum, fSum, InitParams(), IsInitialized(), Print(), RED, and RESET_COLOR.

◆ GetArea()

Double_t GGaus::GetArea ( ) const
inline

Definition at line 33 of file GGaus.h.

References fArea.

Referenced by CompareArea().

◆ GetAreaErr()

Double_t GGaus::GetAreaErr ( ) const
inline

Definition at line 34 of file GGaus.h.

References fDArea.

◆ GetCentroid()

Double_t GGaus::GetCentroid ( ) const
inline

Definition at line 31 of file GGaus.h.

Referenced by CompareEnergy().

◆ GetCentroidErr()

Double_t GGaus::GetCentroidErr ( ) const
inline

Definition at line 32 of file GGaus.h.

◆ GetFWHM()

Double_t GGaus::GetFWHM ( ) const
inline

Definition at line 37 of file GGaus.h.

Referenced by Print().

◆ GetFWHMErr()

Double_t GGaus::GetFWHMErr ( ) const
inline

Definition at line 38 of file GGaus.h.

Referenced by Print().

◆ GetSum()

Double_t GGaus::GetSum ( ) const
inline

Definition at line 35 of file GGaus.h.

References fSum.

◆ GetSumErr()

Double_t GGaus::GetSumErr ( ) const
inline

Definition at line 36 of file GGaus.h.

References fDSum.

◆ InitNames()

void GGaus::InitNames ( )

Definition at line 73 of file GGaus.cxx.

Referenced by GGaus().

◆ InitParams()

bool GGaus::InitParams ( TH1 *  fithist = nullptr)

Definition at line 96 of file GGaus.cxx.

References SetInitialized().

Referenced by Fit().

◆ IsInitialized()

Bool_t GGaus::IsInitialized ( ) const
inlineprivate

Definition at line 72 of file GGaus.h.

References init_flag.

Referenced by Fit().

◆ Print()

void GGaus::Print ( Option_t *  opt = "") const
override

Definition at line 246 of file GGaus.cxx.

References fArea, fChi2, fDArea, fDSum, fNdf, fSum, GetFWHM(), GetFWHMErr(), GREEN, and RESET_COLOR.

Referenced by Fit().

◆ SetArea() [1/2]

void GGaus::SetArea ( Double_t  a)
inlineprotected

Definition at line 45 of file GGaus.h.

References fArea.

Referenced by SetArea().

◆ SetArea() [2/2]

void GGaus::SetArea ( Double_t  a,
Double_t  dA 
)
inlineprotected

Definition at line 49 of file GGaus.h.

References SetArea(), and SetAreaErr().

◆ SetAreaErr()

void GGaus::SetAreaErr ( Double_t  d_a)
inlineprotected

Definition at line 46 of file GGaus.h.

References fDArea.

Referenced by SetArea().

◆ SetChi2()

void GGaus::SetChi2 ( Double_t  chi2)
inlineprotected

Definition at line 54 of file GGaus.h.

References fChi2.

◆ SetInitialized()

void GGaus::SetInitialized ( Bool_t  flag = true)
inlineprivate

Definition at line 73 of file GGaus.h.

References init_flag.

Referenced by InitParams().

◆ SetNdf()

void GGaus::SetNdf ( Double_t  Ndf)
inlineprotected

Definition at line 55 of file GGaus.h.

References fNdf.

◆ SetSum()

void GGaus::SetSum ( Double_t  a)
inlineprotected

Definition at line 47 of file GGaus.h.

References fSum.

◆ SetSumErr()

void GGaus::SetSumErr ( Double_t  d_a)
inlineprotected

Definition at line 48 of file GGaus.h.

References fDSum.

Member Data Documentation

◆ fArea

double GGaus::fArea {0.}
private

Definition at line 64 of file GGaus.h.

Referenced by Clear(), Copy(), Fit(), GetArea(), Print(), and SetArea().

◆ fBGFit

TF1 GGaus::fBGFit
private

Definition at line 76 of file GGaus.h.

Referenced by Background(), Copy(), Fit(), and GGaus().

◆ fBGHist

TF1 GGaus::fBGHist
private

Definition at line 77 of file GGaus.h.

◆ fChi2

double GGaus::fChi2 {0.}
private

Definition at line 66 of file GGaus.h.

Referenced by Clear(), Copy(), DrawResiduals(), Print(), and SetChi2().

◆ fDArea

double GGaus::fDArea {0.}
private

Definition at line 65 of file GGaus.h.

Referenced by Clear(), Copy(), GetAreaErr(), Print(), and SetAreaErr().

◆ fDSum

double GGaus::fDSum {0.}
private

Definition at line 70 of file GGaus.h.

Referenced by Clear(), Copy(), Fit(), GetSumErr(), Print(), and SetSumErr().

◆ fNdf

double GGaus::fNdf {0.}
private

Definition at line 67 of file GGaus.h.

Referenced by Clear(), Copy(), Print(), and SetNdf().

◆ fSum

double GGaus::fSum {0.}
private

Definition at line 69 of file GGaus.h.

Referenced by Clear(), Copy(), Fit(), GetSum(), Print(), and SetSum().

◆ init_flag

bool GGaus::init_flag {false}
private

Definition at line 74 of file GGaus.h.

Referenced by Clear(), Copy(), IsInitialized(), and SetInitialized().