KaliVeda
1.13/01
Heavy-Ion Analysis Toolkit
|
Function for fitting PID mass spectra.
This class is used by KVIDZAFromZGrid (and in the GUI for determining identified isotopes with such grids, KVItvFinderDialog) in order to fit PID mass spectra for a given \(Z\) with a set of gaussians and a background function. The fit can then be used to calculate yields of each isotope, probability that a given PID value is associated with a certain \(A\), mean/most probable \(A\) for a given PID, mass distribution \(P(A|PID)\) for given PID, etc. etc.
The function used to fit the PID spectrum is
\[ N(PID) = \exp(b_0 + b_1*PID) + \sum_{i=1}^{N_{iso}} N_i \mathcal{G}(PID,f(A_i),\sigma) \]
where:
\[ f(A_i) = a_0 + a_1 A_i + a_2 A_i^2 \]
Note that the same width \(\sigma\) is used for all isotopes \(A_i\) of a given element \(Z\).
The probability that a given PID value is associated with the mass number \(A_i\) is then given by
\[ P(A_i|PID) = \frac{N_i \mathcal{G}(PID,f(A_i),\sigma)}{N(PID)} \]
Definition at line 49 of file KVMultiGaussIsotopeFit.h.
Public Member Functions | |
KVMultiGaussIsotopeFit () | |
KVMultiGaussIsotopeFit (int z, const KVNameValueList &) | |
initialize from previous fit with parameters stored in KVNameValueList More... | |
KVMultiGaussIsotopeFit (int z, int Ngauss, double PID_min, double PID_max, const KVNumberList &alist, double bkg_cst, double bkg_slp, double gaus_wid, double pidvsa_a0, double pidvsa_a1, double pidvsa_a2) | |
KVMultiGaussIsotopeFit (int z, int Ngauss, double PID_min, double PID_max, const KVNumberList &alist, std::vector< double > pidlist) | |
Constructor used to initialize and prepare a new fit of isotope PID spectrum. More... | |
KVMultiGaussIsotopeFit (int z, std::vector< int > alist) | |
void | DrawFitWithGaussians (Option_t *opt="") const |
Draw the overall fit plus the individual gaussians for each isotope. More... | |
int | GetA (double PID, double &P) const |
std::map< int, double > | GetADistribution (double PID) const |
double | GetBackgroundConstant () const |
double | GetBackgroundSlope () const |
double | GetCentroid (int i) const |
double | GetGaussianNorm (int i) const |
double | GetGaussianWidth (int) const |
double | GetInterpolatedA (double PID) const |
double | GetMaxSigma () const |
double | GetMeanA (double PID) const |
double | GetMinSigma () const |
int | GetMostProbableA (double PID, double &P) const |
double | GetPIDmax () const |
double | GetPIDmin () const |
double | GetPIDvsAfit_a0 () const |
double | GetPIDvsAfit_a1 () const |
double | GetPIDvsAfit_a2 () const |
double | GetProbability (int A, double PID) const |
void | ReleaseCentroids () |
void | SetFitRange (double min, double max) |
Change range of fit. More... | |
void | SetGaussianNorm (int i, double v) |
void | SetSigmaLimits (double smin, double smax) |
void | UnDraw (TVirtualPad *pad=gPad) const |
Remove the graphical representation of this fit from the given pad. More... | |
![]() | |
TF1 () | |
TF1 (const char *name, const char *formula, Double_t xmin, Double_t xmax, Option_t *option) | |
TF1 (const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1, EAddToList addToGlobList=EAddToList::kDefault, bool vectorize=false) | |
TF1 (const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Int_t npar, const char *, const char *, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Int_t npar, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, Double_t xmin, Double_t xmax, Int_t npar, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, Double_t(*fcn)(const Double_t *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, Double_t(*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, const char *, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, ROOT::Math::ParamFunctor f, Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, std::function< T(const T *data, const Double_t *param)> &fcn, Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const char *name, T(*fcn)(const T *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1, EAddToList addToGlobList=EAddToList::kDefault) | |
TF1 (const TF1 &f1) | |
virtual | ~TF1 () |
virtual void | AddParameter (const TString &name, Double_t value) |
virtual Bool_t | AddToGlobalList (Bool_t on=kTRUE) |
virtual void | Browse (TBrowser *b) |
virtual Double_t | CentralMoment (Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) |
TObject * | Clone (const char *newname=0) const |
virtual void | Copy (TObject &f1) const |
virtual TH1 * | CreateHistogram () |
virtual Double_t | Derivative (Double_t x, Double_t *params=0, Double_t epsilon=0.001) const |
virtual Double_t | Derivative2 (Double_t x, Double_t *params=0, Double_t epsilon=0.001) const |
virtual Double_t | Derivative3 (Double_t x, Double_t *params=0, Double_t epsilon=0.001) const |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
virtual void | Draw (Option_t *option="") |
virtual TF1 * | DrawCopy (Option_t *option="") const |
virtual TObject * | DrawDerivative (Option_t *option="al") |
virtual void | DrawF1 (Double_t xmin, Double_t xmax, Option_t *option="") |
virtual TObject * | DrawIntegral (Option_t *option="al") |
virtual Double_t | Eval (Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const |
virtual Double_t | EvalPar (const Double_t *x, const Double_t *params=0) |
T | EvalPar (const T *x, const Double_t *params=0) |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
virtual void | FixParameter (Int_t ipar, Double_t value) |
Double_t | GetChisquare () const |
virtual TString | GetExpFormula (Option_t *option="") const |
virtual TFormula * | GetFormula () |
virtual const TFormula * | GetFormula () const |
virtual TH1 * | GetHistogram () const |
virtual const TObject * | GetLinearPart (Int_t i) const |
virtual Double_t | GetMaximum (Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const |
virtual Double_t | GetMaximumStored () const |
virtual Double_t | GetMaximumX (Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const |
TMethodCall * | GetMethodCall () const |
virtual Double_t | GetMinimum (Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const |
virtual Double_t | GetMinimumStored () const |
virtual Double_t | GetMinimumX (Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const |
virtual Int_t | GetNDF () const |
virtual Int_t | GetNdim () const |
virtual Int_t | GetNpar () const |
virtual Int_t | GetNpx () const |
virtual Int_t | GetNumber () const |
virtual Int_t | GetNumberFitPoints () const |
virtual Int_t | GetNumberFreeParameters () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
virtual Double_t | GetParameter (const TString &name) const |
virtual Double_t | GetParameter (Int_t ipar) const |
virtual Double_t * | GetParameters () const |
virtual void | GetParameters (Double_t *params) |
TObject * | GetParent () const |
virtual Double_t | GetParError (Int_t ipar) const |
virtual const Double_t * | GetParErrors () const |
virtual void | GetParLimits (Int_t ipar, Double_t &parmin, Double_t &parmax) const |
virtual const char * | GetParName (Int_t ipar) const |
virtual Int_t | GetParNumber (const char *name) const |
virtual Double_t | GetProb () const |
virtual Int_t | GetQuantiles (Int_t nprobSum, Double_t *q, const Double_t *probSum) |
virtual Double_t | GetRandom (Double_t xmin, Double_t xmax, TRandom *rng=nullptr, Option_t *opt=nullptr) |
virtual Double_t | GetRandom (TRandom *rng=nullptr, Option_t *opt=nullptr) |
virtual void | GetRange (Double_t &xmin, Double_t &xmax) const |
virtual void | GetRange (Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const |
virtual void | GetRange (Double_t &xmin, Double_t &ymin, Double_t &zmin, Double_t &xmax, Double_t &ymax, Double_t &zmax) const |
virtual Double_t | GetSave (const Double_t *x) |
virtual Double_t | GetVariable (const TString &name) |
virtual Double_t | GetX (Double_t y, Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const |
TAxis * | GetXaxis () const |
virtual Double_t | GetXmax () const |
virtual Double_t | GetXmin () const |
TAxis * | GetYaxis () const |
TAxis * | GetZaxis () const |
virtual void | GradientPar (const Double_t *x, Double_t *grad, Double_t eps=0.01) |
void | GradientPar (const T *x, T *grad, Double_t eps=0.01) |
virtual Double_t | GradientPar (Int_t ipar, const Double_t *x, Double_t eps=0.01) |
T | GradientPar (Int_t ipar, const T *x, Double_t eps=0.01) |
void | GradientParTempl (const T *x, T *grad, Double_t eps=0.01) |
T | GradientParTempl (Int_t ipar, const T *x, Double_t eps=0.01) |
virtual void | InitArgs (const Double_t *x, const Double_t *params) |
virtual Double_t | Integral (Double_t a, Double_t b, Double_t epsrel=1.e-12) |
virtual Double_t | IntegralError (Double_t a, Double_t b, const Double_t *params=0, const Double_t *covmat=0, Double_t epsilon=1.E-2) |
virtual Double_t | IntegralError (Int_t n, const Double_t *a, const Double_t *b, const Double_t *params=0, const Double_t *covmat=0, Double_t epsilon=1.E-2) |
virtual Double_t | IntegralFast (Int_t num, Double_t *x, Double_t *w, Double_t a, Double_t b, Double_t *params=0, Double_t epsilon=1e-12) |
virtual Double_t | IntegralMultiple (Int_t n, const Double_t *a, const Double_t *b, Double_t epsrel, Double_t &relerr) |
virtual Double_t | IntegralMultiple (Int_t n, const Double_t *a, const Double_t *b, Int_t maxpts, Double_t epsrel, Double_t epsabs, Double_t &relerr, Int_t &nfnevl, Int_t &ifail) |
virtual Double_t | IntegralMultiple (Int_t n, const Double_t *a, const Double_t *b, Int_t, Int_t maxpts, Double_t epsrel, Double_t &relerr, Int_t &nfnevl, Int_t &ifail) |
virtual Double_t | IntegralOneDim (Double_t a, Double_t b, Double_t epsrel, Double_t epsabs, Double_t &err) |
virtual Bool_t | IsEvalNormalized () const |
virtual Bool_t | IsInside (const Double_t *x) const |
virtual Bool_t | IsLinear () const |
virtual Bool_t | IsValid () const |
bool | IsVectorized () |
virtual Double_t | Mean (Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) |
virtual Double_t | Moment (Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) |
T | operator() (const T *x, const Double_t *params=nullptr) |
virtual Double_t | operator() (Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const |
TF1 & | operator= (const TF1 &rhs) |
virtual void | Paint (Option_t *option="") |
virtual void | Print (Option_t *option="") const |
virtual void | ReleaseParameter (Int_t ipar) |
virtual void | Save (Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax) |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
virtual void | SetChisquare (Double_t chi2) |
virtual void | SetFitResult (const ROOT::Fit::FitResult &result, const Int_t *indpar=0) |
void | SetFunction (Func f) |
void | SetFunction (PtrObj &p, MemFn memFn) |
virtual void | SetMaximum (Double_t maximum=-1111) |
virtual void | SetMinimum (Double_t minimum=-1111) |
virtual void | SetNDF (Int_t ndf) |
virtual void | SetNormalized (Bool_t flag) |
virtual void | SetNpx (Int_t npx=100) |
virtual void | SetNumberFitPoints (Int_t npfits) |
virtual void | SetParameter (const TString &name, Double_t value) |
virtual void | SetParameter (Int_t param, Double_t value) |
virtual void | SetParameters (const Double_t *params) |
virtual void | SetParameters (Double_t p0, Double_t p1, Double_t p2=0, Double_t p3=0, Double_t p4=0, Double_t p5=0, Double_t p6=0, Double_t p7=0, Double_t p8=0, Double_t p9=0, Double_t p10=0) |
virtual void | SetParent (TObject *p=0) |
virtual void | SetParError (Int_t ipar, Double_t error) |
virtual void | SetParErrors (const Double_t *errors) |
virtual void | SetParLimits (Int_t ipar, Double_t parmin, Double_t parmax) |
virtual void | SetParName (Int_t ipar, const char *name) |
virtual void | SetParNames (const char *name0="p0", const char *name1="p1", const char *name2="p2", const char *name3="p3", const char *name4="p4", const char *name5="p5", const char *name6="p6", const char *name7="p7", const char *name8="p8", const char *name9="p9", const char *name10="p10") |
virtual void | SetRange (Double_t xmin, Double_t xmax) |
virtual void | SetRange (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) |
virtual void | SetRange (Double_t xmin, Double_t ymin, Double_t zmin, Double_t xmax, Double_t ymax, Double_t zmax) |
virtual void | SetSavedPoint (Int_t point, Double_t value) |
virtual void | SetTitle (const char *title="") |
virtual void | SetVectorized (Bool_t vectorized) |
virtual void | Update () |
virtual Double_t | Variance (Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) |
![]() | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TNamed &named) | |
TNamed (const TString &name, const TString &title) | |
virtual | ~TNamed () |
virtual void | Clear (Option_t *option="") |
virtual Int_t | Compare (const TObject *obj) const |
virtual void | FillBuffer (char *&buffer) |
virtual const char * | GetName () const |
virtual const char * | GetTitle () const |
virtual ULong_t | Hash () const |
virtual Bool_t | IsSortable () const |
virtual void | ls (Option_t *option="") const |
TNamed & | operator= (const TNamed &rhs) |
virtual void | SetName (const char *name) |
virtual void | SetNameTitle (const char *name, const char *title) |
virtual Int_t | Sizeof () const |
![]() | |
TObject () | |
TObject (const TObject &object) | |
virtual | ~TObject () |
void | AbstractMethod (const char *method) const |
virtual void | AppendPad (Option_t *option="") |
ULong_t | CheckedHash () |
virtual const char * | ClassName () const |
virtual void | Delete (Option_t *option="") |
virtual void | DrawClass () const |
virtual TObject * | DrawClone (Option_t *option="") const |
virtual void | Dump () const |
virtual void | Error (const char *method, const char *msgfmt,...) const |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
virtual TObject * | FindObject (const char *name) const |
virtual TObject * | FindObject (const TObject *obj) const |
virtual Option_t * | GetDrawOption () const |
virtual const char * | GetIconName () const |
virtual Option_t * | GetOption () const |
virtual UInt_t | GetUniqueID () const |
virtual Bool_t | HandleTimer (TTimer *timer) |
Bool_t | HasInconsistentHash () const |
virtual void | Info (const char *method, const char *msgfmt,...) const |
virtual Bool_t | InheritsFrom (const char *classname) const |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
virtual void | Inspect () const |
void | InvertBit (UInt_t f) |
virtual Bool_t | IsEqual (const TObject *obj) const |
virtual Bool_t | IsFolder () const |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
R__ALWAYS_INLINE Bool_t | IsZombie () const |
void | MayNotUse (const char *method) const |
virtual Bool_t | Notify () |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
void | operator delete (void *ptr) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
virtual void | Pop () |
virtual Int_t | Read (const char *name) |
virtual void | RecursiveRemove (TObject *obj) |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
void | SetBit (UInt_t f) |
void | SetBit (UInt_t f, Bool_t set) |
virtual void | SetDrawOption (Option_t *option="") |
virtual void | SetUniqueID (UInt_t uid) |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | UseCurrentStyle () |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
![]() | |
TAttLine () | |
TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth) | |
virtual | ~TAttLine () |
void | Copy (TAttLine &attline) const |
Int_t | DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2) |
virtual Color_t | GetLineColor () const |
virtual Style_t | GetLineStyle () const |
virtual Width_t | GetLineWidth () const |
virtual void | Modify () |
virtual void | ResetAttLine (Option_t *option="") |
virtual void | SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1) |
virtual void | SetLineAttributes () |
virtual void | SetLineColor (Color_t lcolor) |
virtual void | SetLineColorAlpha (Color_t lcolor, Float_t lalpha) |
virtual void | SetLineStyle (Style_t lstyle) |
virtual void | SetLineWidth (Width_t lwidth) |
![]() | |
TAttFill () | |
TAttFill (Color_t fcolor, Style_t fstyle) | |
virtual | ~TAttFill () |
void | Copy (TAttFill &attfill) const |
virtual Color_t | GetFillColor () const |
virtual Style_t | GetFillStyle () const |
virtual Bool_t | IsTransparent () const |
virtual void | Modify () |
virtual void | ResetAttFill (Option_t *option="") |
virtual void | SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001) |
virtual void | SetFillAttributes () |
virtual void | SetFillColor (Color_t fcolor) |
virtual void | SetFillColorAlpha (Color_t fcolor, Float_t falpha) |
virtual void | SetFillStyle (Style_t fstyle) |
![]() | |
TAttMarker () | |
TAttMarker (Color_t color, Style_t style, Size_t msize) | |
virtual | ~TAttMarker () |
void | Copy (TAttMarker &attmarker) const |
virtual Color_t | GetMarkerColor () const |
virtual Size_t | GetMarkerSize () const |
virtual Style_t | GetMarkerStyle () const |
virtual void | Modify () |
virtual void | ResetAttMarker (Option_t *toption="") |
virtual void | SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1) |
virtual void | SetMarkerAttributes () |
virtual void | SetMarkerColor (Color_t mcolor=1) |
virtual void | SetMarkerColorAlpha (Color_t mcolor, Float_t malpha) |
virtual void | SetMarkerSize (Size_t msize=1) |
virtual void | SetMarkerStyle (Style_t mstyle=1) |
Private Types | |
enum | fit_param_index { bkg_cst = 1 , bkg_slp = 2 , gauss_wid = 3 , pidvsA_a0 = 4 , pidvsA_a1 = 5 , pidvsA_a2 = 6 } |
Private Member Functions | |
double | centroid_fit (double *x, double *p) |
double | evaluate_gaussian (int i, double pid) const |
double | FitFunc (double *x, double *p) |
int | get_gauss_norm_index (int ig) const |
int | get_mass_index (int ig, int ng) const |
int | total_number_parameters (int ng) const |
Private Attributes | |
std::vector< int > | Alist |
list of masses of isotopes (in increasing order) More... | |
double | max_sigma = 1.e-1 |
double | min_sigma = 1.e-2 |
int | Niso |
number of isotopes to fit = number of gaussians More... | |
std::vector< double > | PIDlist |
list of initial centroid (PID) of each isotope (in increasing order) More... | |
double | PIDmax |
PID limits for current set of isotopes. More... | |
double | PIDmin |
int | Z |
atomic number of the isotopes More... | |
#include <KVMultiGaussIsotopeFit.h>
|
private |
Enumerator | |
---|---|
bkg_cst | |
bkg_slp | |
gauss_wid | |
pidvsA_a0 | |
pidvsA_a1 | |
pidvsA_a2 |
Definition at line 50 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 117 of file KVMultiGaussIsotopeFit.h.
|
inline |
This constructor cannot be used to perform fits, but can be used to UnDraw() an existing fit
Definition at line 118 of file KVMultiGaussIsotopeFit.h.
KVMultiGaussIsotopeFit::KVMultiGaussIsotopeFit | ( | int | z, |
int | Ngauss, | ||
double | PID_min, | ||
double | PID_max, | ||
const KVNumberList & | alist, | ||
std::vector< double > | pidlist | ||
) |
Constructor used to initialize and prepare a new fit of isotope PID spectrum.
Definition at line 10 of file KVMultiGaussIsotopeFit.cpp.
KVMultiGaussIsotopeFit::KVMultiGaussIsotopeFit | ( | int | z, |
int | Ngauss, | ||
double | PID_min, | ||
double | PID_max, | ||
const KVNumberList & | alist, | ||
double | bkg_cst, | ||
double | bkg_slp, | ||
double | gaus_wid, | ||
double | pidvsa_a0, | ||
double | pidvsa_a1, | ||
double | pidvsa_a2 | ||
) |
Constructor which can be used with existing fit results (not to perform new fits)
Use SetGaussianNorm() to set the normalisation parameters for each gaussian
Definition at line 72 of file KVMultiGaussIsotopeFit.cpp.
KVMultiGaussIsotopeFit::KVMultiGaussIsotopeFit | ( | int | z, |
const KVNameValueList & | fitparams | ||
) |
initialize from previous fit with parameters stored in KVNameValueList
Definition at line 115 of file KVMultiGaussIsotopeFit.cpp.
Definition at line 58 of file KVMultiGaussIsotopeFit.h.
Draw the overall fit plus the individual gaussians for each isotope.
Definition at line 150 of file KVMultiGaussIsotopeFit.cpp.
return weight of gaussian i (i=1,2,...) for given value of pid
Definition at line 111 of file KVMultiGaussIsotopeFit.h.
Definition at line 69 of file KVMultiGaussIsotopeFit.h.
|
inlineprivate |
Definition at line 91 of file KVMultiGaussIsotopeFit.h.
|
inlineprivate |
Definition at line 95 of file KVMultiGaussIsotopeFit.h.
|
inlinestatic |
Definition at line 199 of file KVMultiGaussIsotopeFit.h.
|
inlinestatic |
Definition at line 195 of file KVMultiGaussIsotopeFit.h.
|
inlinestatic |
Definition at line 203 of file KVMultiGaussIsotopeFit.h.
Probabilistic method to determine \(A\) from PID.
The A returned will be drawn at random from the probability distribution given by the sum of all gaussians (and the background) for the given PID.
The result of the draw may be that this PID is part of the background noise: in this case we return 0
P is the probability of the chosen result.
Definition at line 263 of file KVMultiGaussIsotopeFit.cpp.
For the given PID, the map is filled with all possible values of \(A\) and the associated probability.
Definition at line 231 of file KVMultiGaussIsotopeFit.cpp.
|
inline |
Definition at line 208 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 213 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 218 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 231 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 226 of file KVMultiGaussIsotopeFit.h.
Definition at line 184 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 259 of file KVMultiGaussIsotopeFit.h.
for a given PID, calculate the mean value of \(A\) from the weighted sum of all gaussians
Definition at line 205 of file KVMultiGaussIsotopeFit.cpp.
|
inline |
Definition at line 255 of file KVMultiGaussIsotopeFit.h.
For a given PID, calculate the most probable value of \(A\), P is its probability.
Definition at line 178 of file KVMultiGaussIsotopeFit.cpp.
|
inline |
Definition at line 250 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 246 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 139 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 144 of file KVMultiGaussIsotopeFit.h.
|
inline |
Definition at line 149 of file KVMultiGaussIsotopeFit.h.
[in] | A | isotope mass number |
[in] | PID | value of PID associated with A |
Definition at line 303 of file KVMultiGaussIsotopeFit.cpp.
|
inline |
Release the constraint on the positions of the centroids
Definition at line 131 of file KVMultiGaussIsotopeFit.h.
Change range of fit.
Definition at line 325 of file KVMultiGaussIsotopeFit.cpp.
Definition at line 237 of file KVMultiGaussIsotopeFit.h.
Definition at line 263 of file KVMultiGaussIsotopeFit.h.
|
inlineprivate |
Definition at line 99 of file KVMultiGaussIsotopeFit.h.
void KVMultiGaussIsotopeFit::UnDraw | ( | TVirtualPad * | pad = gPad | ) | const |
Remove the graphical representation of this fit from the given pad.
Definition at line 134 of file KVMultiGaussIsotopeFit.cpp.
|
inlinestatic |
Remove the graphical representation of any gaussian for this Z from the given pad
Definition at line 164 of file KVMultiGaussIsotopeFit.h.
|
inlinestatic |
Remove the graphical representation of the given gaussian from the given pad
Definition at line 157 of file KVMultiGaussIsotopeFit.h.
|
private |
list of masses of isotopes (in increasing order)
Definition at line 106 of file KVMultiGaussIsotopeFit.h.
Definition at line 109 of file KVMultiGaussIsotopeFit.h.
Definition at line 108 of file KVMultiGaussIsotopeFit.h.
|
private |
number of isotopes to fit = number of gaussians
Definition at line 104 of file KVMultiGaussIsotopeFit.h.
|
private |
list of initial centroid (PID) of each isotope (in increasing order)
Definition at line 107 of file KVMultiGaussIsotopeFit.h.
|
private |
PID limits for current set of isotopes.
Definition at line 105 of file KVMultiGaussIsotopeFit.h.
|
private |
Definition at line 105 of file KVMultiGaussIsotopeFit.h.
|
private |
atomic number of the isotopes
Definition at line 103 of file KVMultiGaussIsotopeFit.h.