GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
GGaus Class Reference

Detailed Description

Definition at line 9 of file GGaus.h.

Public Member Functions

 GGaus ()
 
 GGaus (const GGaus &)
 
 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 (GGaus &&) noexcept=default
 
 ~GGaus ()=default
 
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)
 
GGausoperator= (const GGaus &)=default
 
GGausoperator= (GGaus &&) noexcept=default
 
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.}
 
bool fInitFlag {false}
 
double fNdf {0.}
 
double fSum {0.}
 
+ Inheritance diagram for GGaus:
+ Collaboration diagram for GGaus:

Constructor & Destructor Documentation

◆ GGaus() [1/5]

GGaus::GGaus ( )

Definition at line 53 of file GGaus.cxx.

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

◆ GGaus() [2/5]

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

Definition at line 11 of file GGaus.cxx.

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

◆ GGaus() [3/5]

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

Definition at line 30 of file GGaus.cxx.

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

◆ GGaus() [4/5]

GGaus::GGaus ( const GGaus & peak)

Definition at line 62 of file GGaus.cxx.

References Copy().

◆ GGaus() [5/5]

GGaus::GGaus ( GGaus && )
defaultnoexcept

◆ ~GGaus()

GGaus::~GGaus ( )
default

Member Function Documentation

◆ Background()

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

Definition at line 30 of file GGaus.h.

References fBGFit.

◆ Clear()

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

Definition at line 224 of file GGaus.cxx.

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

Referenced by GGaus(), GGaus(), and GGaus().

◆ CompareArea()

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

Definition at line 47 of file GGaus.h.

References GetArea().

◆ CompareEnergy()

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

Definition at line 46 of file GGaus.h.

References GetCentroid().

◆ Copy()

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

Definition at line 76 of file GGaus.cxx.

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

Referenced by GGaus(), and Fit().

◆ DrawResiduals()

void GGaus::DrawResiduals ( TH1 * hist) const

Definition at line 257 of file GGaus.cxx.

References fChi2, and hist.

◆ Fit()

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

Definition at line 151 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 35 of file GGaus.h.

References fArea.

Referenced by CompareArea().

◆ GetAreaErr()

Double_t GGaus::GetAreaErr ( ) const
inline

Definition at line 36 of file GGaus.h.

References fDArea.

◆ GetCentroid()

Double_t GGaus::GetCentroid ( ) const
inline

Definition at line 33 of file GGaus.h.

Referenced by CompareEnergy().

◆ GetCentroidErr()

Double_t GGaus::GetCentroidErr ( ) const
inline

Definition at line 34 of file GGaus.h.

◆ GetFWHM()

Double_t GGaus::GetFWHM ( ) const
inline

Definition at line 39 of file GGaus.h.

Referenced by Print().

◆ GetFWHMErr()

Double_t GGaus::GetFWHMErr ( ) const
inline

Definition at line 40 of file GGaus.h.

Referenced by Print().

◆ GetSum()

Double_t GGaus::GetSum ( ) const
inline

Definition at line 37 of file GGaus.h.

References fSum.

◆ GetSumErr()

Double_t GGaus::GetSumErr ( ) const
inline

Definition at line 38 of file GGaus.h.

References fDSum.

◆ InitNames()

void GGaus::InitNames ( )

Definition at line 67 of file GGaus.cxx.

Referenced by GGaus(), GGaus(), and GGaus().

◆ InitParams()

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

Definition at line 90 of file GGaus.cxx.

References SetInitialized().

Referenced by Fit().

◆ IsInitialized()

Bool_t GGaus::IsInitialized ( ) const
inlineprivate

Definition at line 71 of file GGaus.h.

References fInitFlag.

Referenced by Fit().

◆ operator=() [1/2]

GGaus & GGaus::operator= ( const GGaus & )
default

◆ operator=() [2/2]

GGaus & GGaus::operator= ( GGaus && )
defaultnoexcept

◆ Print()

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

Definition at line 240 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 50 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 54 of file GGaus.h.

References SetArea(), and SetAreaErr().

◆ SetAreaErr()

void GGaus::SetAreaErr ( Double_t d_a)
inlineprotected

Definition at line 51 of file GGaus.h.

References fDArea.

Referenced by SetArea().

◆ SetChi2()

void GGaus::SetChi2 ( Double_t chi2)
inlineprotected

Definition at line 59 of file GGaus.h.

References fChi2.

◆ SetInitialized()

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

Definition at line 72 of file GGaus.h.

References fInitFlag.

Referenced by InitParams().

◆ SetNdf()

void GGaus::SetNdf ( Double_t Ndf)
inlineprotected

Definition at line 60 of file GGaus.h.

References fNdf.

◆ SetSum()

void GGaus::SetSum ( Double_t a)
inlineprotected

Definition at line 52 of file GGaus.h.

References fSum.

◆ SetSumErr()

void GGaus::SetSumErr ( Double_t d_a)
inlineprotected

Definition at line 53 of file GGaus.h.

References fDSum.

Member Data Documentation

◆ fArea

double GGaus::fArea {0.}
private

Definition at line 63 of file GGaus.h.

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

◆ fBGFit

TF1 GGaus::fBGFit
private

Definition at line 75 of file GGaus.h.

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

◆ fBGHist

TF1 GGaus::fBGHist
private

Definition at line 76 of file GGaus.h.

◆ fChi2

double GGaus::fChi2 {0.}
private

Definition at line 65 of file GGaus.h.

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

◆ fDArea

double GGaus::fDArea {0.}
private

Definition at line 64 of file GGaus.h.

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

◆ fDSum

double GGaus::fDSum {0.}
private

Definition at line 69 of file GGaus.h.

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

◆ fInitFlag

bool GGaus::fInitFlag {false}
private

Definition at line 73 of file GGaus.h.

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

◆ fNdf

double GGaus::fNdf {0.}
private

Definition at line 66 of file GGaus.h.

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

◆ fSum

double GGaus::fSum {0.}
private

Definition at line 68 of file GGaus.h.

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