This class is used to fit Addback peaks in data
Definition at line 27 of file TAB3Peak.h.
Public Member Functions | |
TAB3Peak () | |
TAB3Peak (Double_t centroid) | |
~TAB3Peak () override | |
Double_t | Area () const |
Double_t | AreaErr () const |
void | Centroid (const Double_t ¢roid) override |
Double_t | Centroid () const override |
Double_t | CentroidErr () const override |
virtual void | Draw (Option_t *opt="") override |
virtual void | DrawBackground (Option_t *opt="") |
void | DrawComponents (Option_t *opt="") override |
TF1 * | GetBackgroundFunction () |
Double_t | GetChi2 () const |
TF1 * | GetFitFunction () |
Double_t | GetNDF () const |
Int_t | GetNParameters () const |
Double_t | GetReducedChi2 () const |
void | InitializeParameters (TH1 *hist) override |
void | InitParNames () override |
bool | IsBackgroundParameter (const Int_t &par) const |
bool | IsPeakParameter (const Int_t &par) const |
bool | ParameterSetByUser (int par) |
virtual void | Print (Option_t *="") const override |
virtual void | PrintParameters () const |
void | SetArea (const Double_t &area) |
void | SetAreaErr (const Double_t &area_err) |
void | SetGlobalBackground (TF1 *bg) |
void | SetListOfBGPar (std::vector< bool > list_of_bg_par) |
void | UpdateBackgroundParameters () |
Double_t | Width () const override |
Protected Member Functions | |
Double_t | BackgroundFunction (Double_t *dim, Double_t *par) override |
Double_t | PeakFunction (Double_t *dim, Double_t *par) override |
virtual Double_t | PeakOnGlobalFunction (Double_t *dim, Double_t *par) |
void | SetChi2 (const Double_t &chi2) |
void | SetNDF (const Int_t &ndf) |
Double_t | TotalFunction (Double_t *dim, Double_t *par) |
Protected Attributes | |
Double_t | fArea {-0.1} |
Double_t | fAreaErr {0.0} |
TF1 * | fBackgroundFunction {nullptr} |
Double_t | fChi2 {std::numeric_limits<Double_t>::quiet_NaN()} |
TF1 * | fGlobalBackground {nullptr} |
std::vector< bool > | fListOfBGPars |
Int_t | fNDF {0} |
TF1 * | fPeakOnGlobal {nullptr} |
TF1 * | fTotalFunction {nullptr} |
Private Member Functions | |
Double_t | OneHitPeakFunction (Double_t *dim, Double_t *par) |
Double_t | OneHitPeakOnGlobalFunction (Double_t *dim, Double_t *par) |
Double_t | ThreeHitPeakFunction (Double_t *dim, Double_t *par) |
Double_t | ThreeHitPeakOnGlobalFunction (Double_t *dim, Double_t *par) |
Double_t | TwoHitPeakFunction (Double_t *dim, Double_t *par) |
Double_t | TwoHitPeakOnGlobalFunction (Double_t *dim, Double_t *par) |
Private Attributes | |
TF1 * | fOneHitOnGlobal {nullptr} |
TF1 * | fThreeHitOnGlobal {nullptr} |
TF1 * | fTwoHitOnGlobal {nullptr} |
#include <TAB3Peak.h>
|
inlineoverride |
Definition at line 30 of file TAB3Peak.h.
TAB3Peak::TAB3Peak | ( | ) |
Definition at line 8 of file TAB3Peak.cxx.
TAB3Peak::TAB3Peak | ( | Double_t | centroid | ) |
Definition at line 10 of file TAB3Peak.cxx.
References Centroid().
|
inlineinherited |
Definition at line 48 of file TSinglePeak.h.
References TSinglePeak::fArea.
Referenced by TSinglePeak::Print().
|
inlineinherited |
Definition at line 49 of file TSinglePeak.h.
References TSinglePeak::fAreaErr.
Referenced by TSinglePeak::Print().
|
overrideprotectedvirtual |
Reimplemented from TSinglePeak.
Definition at line 146 of file TAB3Peak.cxx.
|
overridevirtual |
Implements TSinglePeak.
Definition at line 15 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction, InitParNames(), TSinglePeak::SetListOfBGPar(), and TSinglePeak::TotalFunction().
|
overridevirtual |
Implements TSinglePeak.
Definition at line 76 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction.
Referenced by TAB3Peak().
|
overridevirtual |
Implements TSinglePeak.
Definition at line 81 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction.
|
overridevirtualinherited |
Definition at line 80 of file TSinglePeak.cxx.
References TSinglePeak::fGlobalBackground, TSinglePeak::fPeakOnGlobal, TSinglePeak::fTotalFunction, and TSinglePeak::PeakOnGlobalFunction().
Referenced by TBGSubtraction::DrawPeak().
|
inlinevirtualinherited |
Definition at line 58 of file TSinglePeak.h.
References TSinglePeak::fGlobalBackground.
|
overridevirtual |
Reimplemented from TSinglePeak.
Definition at line 159 of file TAB3Peak.cxx.
References TSinglePeak::fGlobalBackground, fOneHitOnGlobal, fThreeHitOnGlobal, TSinglePeak::fTotalFunction, fTwoHitOnGlobal, OneHitPeakOnGlobalFunction(), ThreeHitPeakOnGlobalFunction(), and TwoHitPeakOnGlobalFunction().
|
inherited |
Definition at line 33 of file TSinglePeak.cxx.
References TSinglePeak::BackgroundFunction(), TSinglePeak::fBackgroundFunction, and TSinglePeak::fTotalFunction.
|
inlineinherited |
Definition at line 69 of file TSinglePeak.h.
References TSinglePeak::fChi2.
|
inlineinherited |
Definition at line 62 of file TSinglePeak.h.
References TSinglePeak::fTotalFunction.
|
inlineinherited |
Definition at line 70 of file TSinglePeak.h.
References TSinglePeak::fNDF.
|
inherited |
Definition at line 26 of file TSinglePeak.cxx.
References TSinglePeak::fTotalFunction.
|
inlineinherited |
Definition at line 71 of file TSinglePeak.h.
References TSinglePeak::fChi2, and TSinglePeak::fNDF.
|
overridevirtual |
Makes initial guesses at parameters for the fit base on the histogram.
Reimplemented from TSinglePeak.
Definition at line 36 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction, and TSinglePeak::ParameterSetByUser().
|
overridevirtual |
Reimplemented from TSinglePeak.
Definition at line 24 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction.
Referenced by Centroid().
|
inherited |
Definition at line 11 of file TSinglePeak.cxx.
References TSinglePeak::fListOfBGPars.
Referenced by TSinglePeak::IsPeakParameter().
|
inherited |
Definition at line 22 of file TSinglePeak.cxx.
References TSinglePeak::IsBackgroundParameter().
|
private |
Definition at line 96 of file TAB3Peak.cxx.
References GRootFunctions::Gaus().
Referenced by OneHitPeakOnGlobalFunction(), and PeakFunction().
|
private |
Definition at line 131 of file TAB3Peak.cxx.
References TSinglePeak::fGlobalBackground, TSinglePeak::fTotalFunction, and OneHitPeakFunction().
Referenced by DrawComponents().
|
inherited |
This function checks if a parameter or its limits have been set to a non-zero value. In case that the user fixed a parameter to be zero, the limits are non-zero, so this case is covered as well.
Definition at line 102 of file TSinglePeak.cxx.
References TSinglePeak::fTotalFunction.
Referenced by InitializeParameters(), TABPeak::InitializeParameters(), TGauss::InitializeParameters(), and TRWPeak::InitializeParameters().
|
overrideprotectedvirtual |
Reimplemented from TSinglePeak.
Definition at line 91 of file TAB3Peak.cxx.
References OneHitPeakFunction(), ThreeHitPeakFunction(), and TwoHitPeakFunction().
|
protectedvirtualinherited |
Definition at line 72 of file TSinglePeak.cxx.
References TSinglePeak::fGlobalBackground, TSinglePeak::fTotalFunction, and TSinglePeak::PeakFunction().
Referenced by TSinglePeak::Draw().
|
overridevirtualinherited |
Definition at line 41 of file TSinglePeak.cxx.
References TSinglePeak::Area(), TSinglePeak::AreaErr(), TSinglePeak::Centroid(), and TSinglePeak::CentroidErr().
|
virtualinherited |
Definition at line 49 of file TSinglePeak.cxx.
References TSinglePeak::fTotalFunction.
|
inlineinherited |
Definition at line 45 of file TSinglePeak.h.
References TSinglePeak::fArea.
|
inlineinherited |
Definition at line 46 of file TSinglePeak.h.
References TSinglePeak::fAreaErr.
|
inlineprotectedinherited |
Definition at line 81 of file TSinglePeak.h.
References TSinglePeak::fChi2.
|
inlineinherited |
Definition at line 64 of file TSinglePeak.h.
References TSinglePeak::fGlobalBackground.
|
inlineinherited |
Definition at line 42 of file TSinglePeak.h.
References TSinglePeak::fListOfBGPars.
Referenced by Centroid(), TABPeak::Centroid(), TGauss::Centroid(), and TRWPeak::Centroid().
|
inlineprotectedinherited |
Definition at line 82 of file TSinglePeak.h.
References TSinglePeak::fNDF.
|
private |
Definition at line 118 of file TAB3Peak.cxx.
References GRootFunctions::Gaus().
Referenced by PeakFunction(), and ThreeHitPeakOnGlobalFunction().
|
private |
Definition at line 141 of file TAB3Peak.cxx.
References TSinglePeak::fGlobalBackground, TSinglePeak::fTotalFunction, and ThreeHitPeakFunction().
Referenced by DrawComponents().
|
protectedinherited |
Definition at line 59 of file TSinglePeak.cxx.
References TSinglePeak::BackgroundFunction(), and TSinglePeak::PeakFunction().
Referenced by Centroid(), TABPeak::Centroid(), TGauss::Centroid(), and TRWPeak::Centroid().
|
private |
Definition at line 106 of file TAB3Peak.cxx.
References GRootFunctions::Gaus().
Referenced by PeakFunction(), and TwoHitPeakOnGlobalFunction().
|
private |
Definition at line 136 of file TAB3Peak.cxx.
References TSinglePeak::fGlobalBackground, TSinglePeak::fTotalFunction, and TwoHitPeakFunction().
Referenced by DrawComponents().
|
inherited |
Definition at line 63 of file TSinglePeak.cxx.
References TSinglePeak::fBackgroundFunction, and TSinglePeak::fTotalFunction.
|
overridevirtual |
Implements TSinglePeak.
Definition at line 86 of file TAB3Peak.cxx.
References TSinglePeak::fTotalFunction.
|
protectedinherited |
Definition at line 91 of file TSinglePeak.h.
Referenced by TSinglePeak::Area(), and TSinglePeak::SetArea().
|
protectedinherited |
Definition at line 92 of file TSinglePeak.h.
Referenced by TSinglePeak::AreaErr(), and TSinglePeak::SetAreaErr().
|
protectedinherited |
Definition at line 86 of file TSinglePeak.h.
Referenced by TSinglePeak::GetBackgroundFunction(), and TSinglePeak::UpdateBackgroundParameters().
|
protectedinherited |
Definition at line 93 of file TSinglePeak.h.
Referenced by TSinglePeak::GetChi2(), TSinglePeak::GetReducedChi2(), and TSinglePeak::SetChi2().
|
protectedinherited |
Definition at line 87 of file TSinglePeak.h.
Referenced by TSinglePeak::Draw(), TSinglePeak::DrawBackground(), DrawComponents(), TABPeak::DrawComponents(), TABPeak::OneHitPeakOnGlobalFunction(), OneHitPeakOnGlobalFunction(), TSinglePeak::PeakOnGlobalFunction(), TSinglePeak::SetGlobalBackground(), ThreeHitPeakOnGlobalFunction(), TABPeak::TwoHitPeakOnGlobalFunction(), and TwoHitPeakOnGlobalFunction().
|
protectedinherited |
Definition at line 90 of file TSinglePeak.h.
Referenced by TSinglePeak::IsBackgroundParameter(), and TSinglePeak::SetListOfBGPar().
|
protectedinherited |
Definition at line 94 of file TSinglePeak.h.
Referenced by TSinglePeak::GetNDF(), TSinglePeak::GetReducedChi2(), and TSinglePeak::SetNDF().
|
private |
Definition at line 57 of file TAB3Peak.h.
Referenced by DrawComponents().
|
protectedinherited |
Definition at line 88 of file TSinglePeak.h.
Referenced by TSinglePeak::Draw().
|
private |
Definition at line 59 of file TAB3Peak.h.
Referenced by DrawComponents().
|
protectedinherited |
Definition at line 85 of file TSinglePeak.h.
Referenced by Centroid(), TABPeak::Centroid(), TGauss::Centroid(), TRWPeak::Centroid(), CentroidErr(), TABPeak::CentroidErr(), TGauss::CentroidErr(), TRWPeak::CentroidErr(), TSinglePeak::Draw(), TABPeak::DrawComponents(), DrawComponents(), TSinglePeak::GetBackgroundFunction(), TSinglePeak::GetFitFunction(), TSinglePeak::GetNParameters(), InitializeParameters(), TABPeak::InitializeParameters(), TGauss::InitializeParameters(), TRWPeak::InitializeParameters(), InitParNames(), TABPeak::InitParNames(), TGauss::InitParNames(), TRWPeak::InitParNames(), TABPeak::OneHitPeakOnGlobalFunction(), OneHitPeakOnGlobalFunction(), TSinglePeak::ParameterSetByUser(), TSinglePeak::PeakOnGlobalFunction(), TSinglePeak::PrintParameters(), TGauss::TGauss(), ThreeHitPeakOnGlobalFunction(), TABPeak::TwoHitPeakOnGlobalFunction(), TwoHitPeakOnGlobalFunction(), TSinglePeak::UpdateBackgroundParameters(), TABPeak::Width(), Width(), TRWPeak::Width(), and TGauss::Width().
|
private |
Definition at line 58 of file TAB3Peak.h.
Referenced by DrawComponents().