1 #ifndef ALIHFVNVSMASSFITTER_H 2 #define ALIHFVNVSMASSFITTER_H 9 #include <TVirtualPad.h> 11 #include "Fit/Fitter.h" 12 #include "Fit/Chi2FCN.h" 13 #include "Math/WrappedMultiTF1.h" 45 if(
fMassBkgFuncType!=6) AliFatal(
"fMassBkgFuncType should be set to 6 to use higher order polynomials\n");
49 if(
fVnBkgFuncType!=6) AliFatal(
"fVnBkgFuncType should be set to 6 to use higher order polynomials\n");
124 const ROOT::Math::IMultiGenFunction *
fChi2_1;
125 const ROOT::Math::IMultiGenFunction *
fChi2_2;
235 #endif //ALIHFVNVSMASSFITTER TF1 * GetVnVsMassTotFitFunc()
void SetReflVnParLimits(Double_t min, Double_t max)
Double_t GetChiSquare() const
Int_t fVnRflOpt
internal variable for fit with reflections
Int_t fFrac2GausFixed
flag to fix second peak width in case of k2Gaus
Int_t fPolDegreeVnBkg
degree of polynomial expansion for back fit (option 6 for back)
Double_t MassSecondPeak(Double_t *m, Double_t *par)
double operator()(const double *par) const
Double_t GetExpoPDF(Double_t x, Double_t slope, Bool_t isnorm=kTRUE)
Int_t fNParsVnBkg
number of parameters in mass bkg fit function
Bool_t fFixSecWidth
flag to fix the position of the 2nd peak
AliHFGlobalChi2(ROOT::Math::IMultiGenFunction &f1, ROOT::Math::IMultiGenFunction &f2)
Int_t fNParsVnSecPeak
number of parameters in vn sgn fit function (1)
Int_t fNParsRfl
flag use/not use reflections
Bool_t fReflections
degree of polynomial expansion for vn back fit (option 6 for back)
Double_t MassRfl(Double_t *m, Double_t *par)
Bool_t SimultaneusFit(Bool_t drawFit=kTRUE)
Double_t GetPowerFuncPDF(Double_t x, Double_t *pars)
Bool_t fMeanFixedFromMassFit
initialization for fraction of second gaussian in case of k2Gaus
Double_t fMean
uncertainty on mass peak width from simultaneus fit
void SetFixReflOverS(Double_t rovers)
TH1F * fHistoTemplRfl
switch for fix refl/signal
Double_t fMassParticle
flag to fix fraction of second gaussian in case of k2Gaus
Bool_t fFixSecMass
width of the 2nd peak
TH1F * GetTemplateReflections()
Int_t fNParsSec
fit function for second peak
Bool_t fSecondPeak
maximum vn of reflections
Double_t fSigma2GausInit
initialization for peak position
Double_t GetHigherPolFuncPDF(Double_t x, Double_t *pars, Int_t Ndeg, Bool_t isnorm=kTRUE)
Bool_t fSigmaFixedFromMassFit
flag to fix peak position from mass prefit
void Signal(Double_t nOfSigma, Double_t &signal, Double_t &errsignal) const
Double_t fSecMass
number of parameters in second peak fit function
TF1 * fMassTotFunc
mass signal fit function (final, after simultaneus fit)
Double_t vnBkgFunc(Double_t *m, Double_t *pars)
Double_t GetVnUncertainty() const
Double_t fRflOverSig
fit parameters in reflection fit function
void FixSigma2GausFromMassFit()
Double_t fMassMax
upper mass limit
AliHFInvMassFitter class for the fit of invariant mass distribution of charm hadrons.
void IncludeSecondGausPeak(Double_t mass, Bool_t fixm, Double_t width, Bool_t fixw, Bool_t doVn)
Double_t GetMeanUncertainty() const
Double_t GetRawYield() const
Int_t fSigma2GausFixed
flag to fix peak position
TF1 * GetMassTotFitFunc()
void SetParticlePdgMass(Double_t mass)
Int_t fMeanFixed
flag to fix peak width
void SetTemplateReflections(const TH1 *h, TString opt, Double_t minRange, Double_t maxRange)
Double_t fVn
lower mass limit
Int_t fMassSgnFuncType
vn vs. mass histogram to fit
void DefineNumberOfParameters()
private methods
void SetNSigmaForVnSB(Int_t nsigma=4)
Double_t fChiSquare
uncertainty raw yield from simultaneus fit
void SetVnBkgFunc(Int_t functype)
void SetReflVnOption(Int_t opt)
Double_t GetSigmaUncertainty() const
Bool_t fSigma2GausFixedFromMassFit
flag to fix peak width from mass prefit
Double_t fRawYieldUncertainty
raw yield from simultaneus fit
Double_t GetPowerExpoPDF(Double_t x, Double_t *pars)
const ROOT::Math::IMultiGenFunction * fChi2_2
Int_t fNSigmaForSB
simultaneus fit probability
TF1 * fMassBkgFunc
mass fit function (1st step, from prefit)
Double_t fMaxRefl
minimum for refelction histo
void SetMassSgnFunc(Int_t functype)
Double_t vnFunc(Double_t *m, Double_t *pars)
Double_t fVnUncertainty
vn of the signal from fit
Double_t fProb
simultaneus fit number of degree of freedom
Double_t MassSignal(Double_t *m, Double_t *pars)
Bool_t fFrac2GausFixedFromMassFit
flag to fix second peak width from mass prefit in case of k2Gaus
TF1 * fMassSecPeakFunc
switch off/on second peak (for D+->KKpi in Ds)
TF1 * fVnBkgFunc
vn bkg fit function (1st step from SB prefit)
void FixMeanFromMassFit()
Int_t fPolDegreeBkg
flag to fix fraction of second gaussian in case of k2Gaus
Double_t fSecWidth
position of the 2nd peak
void SetInitialFrac2Gaus(Double_t frac, Int_t opt)
Bool_t fVnRflLimited
option for reflection vn type
TF1 * fVnTotFunc
vn bkg fit function (final, after simultaneus fit)
void SetPolDegreeForVnBackgroundFit(Int_t deg)
Int_t fHarmonic
vn uncertainty of second peak from fit
Double_t fSigmaInit
number of sigma for sidebands region (vn bkg prefit)
Int_t fNParsMassBkg
number of parameters in mass signal fit function
Double_t GetFitProbability() const
Double_t MassBkgRfl(Double_t *m, Double_t *par)
Double_t GetReducedChiSquare() const
Double_t fMeanUncertainty
mass peak position from simultaneus fit
void SetPolDegreeForBackgroundFit(Int_t deg)
void SetHarmonic(Int_t harmonic=2)
Double_t GetPolPDF(Double_t x, Double_t *pars, Int_t order, Bool_t isnorm=kTRUE)
Double_t GetRawYieldUncertainty() const
Double_t fSigma
uncertainty on vn of the signal from simultaneus fit
TF1 * fVnBkgFuncSb
mass fit function (final, after simultaneus fit)
Double_t fMeanInit
initialization for peak width
void SetInitialGaussianSigma2Gaus(Double_t sigma, Int_t opt)
TH1F * fMassHisto
data members
void DrawHere(TVirtualPad *c)
void SetInitialGaussianSigma(Double_t sigma, Int_t opt)
TH1F * fHistoTemplRflInit
histogram with reflection template
void FixSigmaFromMassFit()
Double_t GetGausPDF(Double_t x, Double_t mean, Double_t sigma)
fit functions
Int_t fNDF
simultaneus fit chi square
Bool_t fDoSecondPeakVn
vn of second peak from fit
TF1 * fMassRflFunc
initial histogram with reflection template
Double_t MassFunc(Double_t *m, Double_t *pars)
void Background(Double_t nOfSigma, Double_t &background, Double_t &errbackground) const
AliHFInvMassFitter * fMassFitter
vn fit function (final, after simultaneus fit)
TF1 * fMassBkgRflFunc
fit function for reflections
Double_t GetSigma() const
Int_t fNParsVnRfl
number of parameters in vn sec peak fit function (1 if included, 0 otherwise)
TF1 * fMassFuncFromPrefit
type of vn bkg fit function
TH1F * fVnVsMassHisto
mass histogram to fit
Int_t fNParsMassSgn
mass of selected particle
Int_t fNParsVnSgn
number of parameters in vn bkg fit function
Double_t fSigmaUncertainty
mass peak width from simultaneus fit
Double_t fFrac2GausInit
initialization for second peak width in case of k2Gaus
Double_t fRawYield
uncertainty on mass peak position from simultaneus fit
Double_t fVnRflMax
minimum vn of reflections
Int_t fSigmaFixed
number of parameters in vn refl fit function (1 if included, 0 otherwise)
void SetMassBkgFunc(Int_t functype)
Double_t fMinRefl
refelction option
Int_t fVnBkgFuncType
type of mass bkg fit function
void Significance(Double_t nOfSigma, Double_t &significance, Double_t &errsignificance) const
Double_t GetParticlePdgMass() const
Int_t fMassBkgFuncType
type of mass signal fit function
Double_t fVnRflMin
flag to limit or not the vn of reflections
TF1 * fMassSgnFunc
mass bkg fit function (final, after simultaneus fit)
const ROOT::Math::IMultiGenFunction * fChi2_1
Double_t fRawYieldHelp
switch for smoothing of reflection template
Bool_t fFixRflOverSig
reflection/signal
TString fRflOpt
mass bkg fit function plus reflections (final, after simultaneus fit)
Double_t fMassMin
mass fitter for mass prefit
Double_t MassBkg(Double_t *m, Double_t *pars)
Double_t fVnSecPeakUncertainty
flag to introduce second peak vn in the vn vs. mass fit
void SetInitialReflOverS(Double_t rovers)
Bool_t fSmoothRfl
maximum for refelction histo
void SetInitialGaussianMean(Double_t mean, Int_t opt)
void FixFrac2GausFromMassFit()
Double_t fVnSecPeak
flag to fix the width of the 2nd peak