This Class is used to represent fitted data that is Gaussian like in nature (ie centroid and area).
Definition at line 32 of file TMultiPeak.h.
Public Member Functions | |
TMultiPeak (Double_t xlow, Double_t xhigh, const std::vector< Double_t > ¢roids, Option_t *type="gsc") | |
TMultiPeak (const TMultiPeak ©) | |
TMultiPeak () | |
~TMultiPeak () override | |
Bool_t | AddToGlobalList (Bool_t on=kTRUE) override |
TF1 * | Background () const |
void | Clear (Option_t *opt="") override |
virtual void | ClearParameters (Option_t *opt="") |
void | Copy (TObject &obj) const override |
virtual void | CopyParameters (TF1 *copy) const |
void | DrawPeaks () |
Bool_t | Fit (TH1 *fithist, Option_t *opt="") |
virtual TH1 * | GetHist () const |
TPeak * | GetPeak (UInt_t idx) |
TPeak * | GetPeakClosestTo (Double_t energy) |
bool | InitParams (TH1 *fithist) override |
Bool_t | IsGoodFit () const |
void | Print (Option_t *opt="") const override |
virtual void | SetHist (TH1 *hist) |
void | SortPeaks (Bool_t(*SortFunction)(const TPeak *, const TPeak *)=TPeak::CompareEnergy) |
Static Public Member Functions | |
static Bool_t | AddToGlobalList (TF1 *func, Bool_t on=kTRUE) |
static const char * | GetDefaultFitType () |
static bool | GetLogLikelihoodFlag () |
static void | SetDefaultFitType (const char *fitType) |
static void | SetLogLikelihoodFlag (bool flag) |
Protected Member Functions | |
void | GoodFit (Bool_t flag=true) |
void | InitNames () |
Bool_t | IsInitialized () const |
void | SetInitialized (Bool_t flag=true) |
Private Member Functions | |
Double_t | MultiPhotoPeakBG (Double_t *dim, Double_t *par) |
Double_t | MultiStepBG (Double_t *dim, Double_t *par) |
Double_t | SinglePeakBG (Double_t *dim, Double_t *par) |
Private Attributes | |
TF1 * | fBackground |
bool | fConstrainWidths |
std::vector< TPeak * > | fPeakVec |
Static Private Attributes | |
static bool | fLogLikelihoodFlag = false |
#include <TMultiPeak.h>
|
override |
Definition at line 64 of file TMultiPeak.cxx.
References fBackground, and fPeakVec.
TMultiPeak::TMultiPeak | ( | Double_t | xlow, |
Double_t | xhigh, | ||
const std::vector< Double_t > & | centroids, | ||
Option_t * | type = "gsc" |
||
) |
Definition at line 15 of file TMultiPeak.cxx.
References TGRSIFit::AddToGlobalList(), Clear(), fBackground, fPeakVec, InitNames(), MultiStepBG(), and SortPeaks().
TMultiPeak::TMultiPeak | ( | const TMultiPeak & | copy | ) |
Definition at line 101 of file TMultiPeak.cxx.
References Copy().
TMultiPeak::TMultiPeak | ( | ) |
Definition at line 52 of file TMultiPeak.cxx.
References TGRSIFit::AddToGlobalList(), fBackground, InitNames(), and MultiStepBG().
Referenced by Fit().
|
overrideinherited |
Definition at line 66 of file TGRSIFit.cxx.
Referenced by Copy(), TMultiPeak(), TPeak::TPeak(), and TGRSIFit::~TGRSIFit().
|
staticinherited |
Definition at line 96 of file TGRSIFit.cxx.
|
inline |
Definition at line 53 of file TMultiPeak.h.
References fBackground.
|
override |
Definition at line 336 of file TMultiPeak.cxx.
References TGRSIFit::Clear(), and fPeakVec.
Referenced by TMultiPeak().
|
virtualinherited |
Definition at line 47 of file TGRSIFit.cxx.
|
override |
Definition at line 106 of file TMultiPeak.cxx.
References TGRSIFit::AddToGlobalList(), TGRSIFit::Copy(), fBackground, and fPeakVec.
Referenced by TMultiPeak().
|
virtualinherited |
Definition at line 54 of file TGRSIFit.cxx.
Referenced by Fit().
void TMultiPeak::DrawPeaks | ( | ) |
Definition at line 447 of file TMultiPeak.cxx.
References fPeakVec, TPeak::GetCentroid(), TPeak::GetFWHM(), and SinglePeakBG().
Bool_t TMultiPeak::Fit | ( | TH1 * | fithist, |
Option_t * | opt = "" |
||
) |
Definition at line 186 of file TMultiPeak.cxx.
References TGRSIFit::CopyParameters(), fBackground, fPeakVec, TPeak::GetArea(), TPeak::GetAreaErr(), TGRSIFit::GetHist(), GetLogLikelihoodFlag(), InitParams(), TGRSIFit::IsInitialized(), TPeak::SetArea(), TPeak::SetAreaErr(), TPeak::SetChi2(), TGRSIFit::SetHist(), TPeak::SetNdf(), and TMultiPeak().
|
inlinestaticinherited |
Definition at line 60 of file TGRSIFit.h.
References TGRSIFit::fDefaultFitType.
|
inlinevirtualinherited |
Definition at line 59 of file TGRSIFit.h.
References TGRSIFit::fHist.
Referenced by TPeak::Copy(), TPeak::DrawResiduals(), TPeak::Fit(), Fit(), TPeak::GetIntegralArea(), TPeak::GetIntegralAreaErr(), TPeak::GoodStatus(), InitParams(), and TPeak::InitParams().
|
inlinestatic |
TPeak * TMultiPeak::GetPeak | ( | UInt_t | idx | ) |
Definition at line 423 of file TMultiPeak.cxx.
References fPeakVec.
Referenced by GetPeakClosestTo().
TPeak * TMultiPeak::GetPeakClosestTo | ( | Double_t | energy | ) |
Definition at line 433 of file TMultiPeak.cxx.
|
inlineprotectedinherited |
Definition at line 71 of file TGRSIFit.h.
References TGRSIFit::fGoodFitFlag.
|
protected |
|
overridevirtual |
Implements TGRSIFit.
Definition at line 126 of file TMultiPeak.cxx.
References fPeakVec, TGRSIFit::GetHist(), and TGRSIFit::SetInitialized().
Referenced by Fit().
|
inlineinherited |
Definition at line 54 of file TGRSIFit.h.
References TGRSIFit::fGoodFitFlag.
|
inlineprotectedinherited |
Definition at line 69 of file TGRSIFit.h.
References TGRSIFit::fInitFlag.
Referenced by TPeak::Fit(), and Fit().
|
private |
Definition at line 361 of file TMultiPeak.cxx.
References TGRSIFunctions::PhotoPeak(), TGRSIFunctions::PolyBg(), and TGRSIFunctions::StepFunction().
|
private |
Definition at line 381 of file TMultiPeak.cxx.
References TGRSIFunctions::PolyBg(), and TGRSIFunctions::StepFunction().
Referenced by TMultiPeak().
|
override |
Prints TMultiPeak properties. To see More properties use the option "+"
Definition at line 348 of file TMultiPeak.cxx.
References fPeakVec.
|
inlinestaticinherited |
Definition at line 61 of file TGRSIFit.h.
References TGRSIFit::fDefaultFitType.
|
inlinevirtualinherited |
Definition at line 55 of file TGRSIFit.h.
References TGRSIFit::fHist, and hist.
Referenced by TPeak::Copy(), TPeak::Fit(), and Fit().
|
inlineprotectedinherited |
Definition at line 70 of file TGRSIFit.h.
References TGRSIFit::fInitFlag.
Referenced by InitParams(), and TPeak::InitParams().
|
inlinestatic |
Definition at line 55 of file TMultiPeak.h.
References fLogLikelihoodFlag.
|
private |
Definition at line 401 of file TMultiPeak.cxx.
References TGRSIFunctions::PhotoPeak(), TGRSIFunctions::PolyBg(), and TGRSIFunctions::StepFunction().
Referenced by DrawPeaks().
void TMultiPeak::SortPeaks | ( | Bool_t(*)(const TPeak *, const TPeak *) | SortFunction = TPeak::CompareEnergy | ) |
|
private |
Definition at line 65 of file TMultiPeak.h.
Referenced by Background(), Copy(), Fit(), TMultiPeak(), and ~TMultiPeak().
|
private |
Definition at line 66 of file TMultiPeak.h.
|
staticprivate |
!
Definition at line 63 of file TMultiPeak.h.
Referenced by GetLogLikelihoodFlag(), and SetLogLikelihoodFlag().
|
private |
Definition at line 64 of file TMultiPeak.h.
Referenced by Clear(), Copy(), DrawPeaks(), Fit(), GetPeak(), GetPeakClosestTo(), InitNames(), InitParams(), Print(), SortPeaks(), TMultiPeak(), and ~TMultiPeak().