1 #ifndef ALIHFMASSFITTER_H
2 #define ALIHFMASSFITTER_H
43 void SetHisto(
const TH1F *histoToFit);
virtual TH1F * GetOverBackgroundResidualsAndPulls(Double_t minrange=0, Double_t maxrange=-1, TH1 *hPulls=0x0, TH1 *hResidualTrend=0x0, TH1 *hPullsTrend=0x0)
TVirtualPad * GetPad(Double_t nsigma=3, Int_t writeFitInfo=1) const
TH1F * GetHistoClone() const
Float_t * fFitPars
number of parameters of the final function
void DrawHere(TVirtualPad *pd, Double_t nsigma=3, Int_t writeFitInfo=1) const
write the canvas in a root file
Bool_t * fFixPar
kTRUE = only side bands considered
virtual Bool_t CheckRangeFit()
virtual TPaveText * GetFitParametersBox(Double_t nsigma=3., Int_t mode=0)
void SetHisto(const TH1F *histoToFit)
setters
void WriteNtuple(TString path="./") const
write the histogram
Int_t fSideBandr
left side band limit (bin number)
Int_t GetNFinalPars() const
void GetTypeOfFit(Bool_t &background, Int_t &typeb) const
void GetSideBandsBounds(Int_t &lb, Int_t &hb) const
virtual void PlotFit(TVirtualPad *pd, Double_t nsigma=3, Int_t writeFitInfo=1) const
void DrawFit(Double_t nsigma=3) const
void SetInitialGaussianMean(Double_t mean)
Int_t fParsSize
number of bins
virtual void IntS(Float_t *valuewitherror) const
Int_t ftypeOfFit4Sgn
0 = exponential; 1 = linear; 2 = pol2
virtual void SetFixGaussianMean(Double_t mean=1.865, Bool_t fixpar=kTRUE)
virtual void ComputeParSize()
Double_t fmaxMass
lower mass limit
Int_t ftypeOfFit4Bkg
signal+background (kTRUE) or signal only (kFALSE)
TNtuple * GetNtuParam() const
Int_t GetReflectionSigmaFactor() const
Double_t GetFitProbability() const
virtual ~AliHFMassFitter()
Double_t fMassErr
signal gaussian mean value
virtual Double_t IntTot() const
integral of signal given my the fit with error
TF1 * GetBackgroundFullRangeFunc()
TF1 * GetBackgroundRecalcFunc()
virtual Bool_t RefitWithBkgOnly(Bool_t draw=kTRUE)
virtual void AddFunctionsToHisto()
void SetMinRangeFit(Double_t minvalue)
void PrintParTitles() const
Int_t fmaxBinMass
bin corresponding to fminMass
virtual TPaveText * GetYieldBox(Double_t nsigma=3.)
void SetSideBands(Bool_t onlysidebands=kTRUE)
change the default value of the sigma
Double_t fminMass
histogram to fit
Double_t GetRawYieldError() const
virtual void Signal(Double_t nOfSigma, Double_t &signal, Double_t &errsignal) const
return total integral of the histogram
void SetUseLikelihoodWithWeightsFit()
Int_t fNbin
bin corresponding to fmaxMass
void SetRangeFit(Double_t minvalue, Double_t maxvalue)
virtual Double_t FitFunction4Bkg(Double_t *x, Double_t *par)
Double_t fRawYieldErr
signal gaussian integral
Double_t GetMeanUncertainty() const
Double_t fSigmaSgnErr
signal gaussian sigma
Double_t GetChiSquare() const
void SetMaxRangeFit(Double_t maxvalue)
Double_t GetReducedChiSquare() const
Double_t fMass
contains fit parameters
void SetReflectionSigmaFactor(Int_t constant)
Bool_t GetFixThisParam(Int_t thispar) const
void SetFixParam(Bool_t *fixpar)
consider only side bands
void SetBinN(Int_t newbinN)
Int_t fcounter
right side band limit (bin number)
void FillNtuParam()
initialize TNtuple to store the parameters
void SetType(Int_t fittypeb, Int_t fittypes)
Int_t fNFinalPars
size of fFitPars array
void SetUseLikelihoodFit()
void InitNtuParam(TString ntuname="ntupar")
void GetFitPars(Float_t *pars) const
Double_t GetMaxRangeFit() const
virtual void Background(Double_t nOfSigma, Double_t &background, Double_t &errbackground) const
signal in (min, max) with error
Double_t GetRawYield() const
void SetInitialGaussianSigma(Double_t sigma)
change the default value of the mean
virtual Double_t FitFunction4MassDistr(Double_t *x, Double_t *par)
significance in (min, max) with error
Double_t fRawYield
err signal gaussian sigma
TH1F * GetResidualsAndPulls(TH1 *h, TF1 *f, Double_t minrange=0, Double_t maxrange=-1, TH1 *hPulls=0x0, TH1 *hResidualTrend=0x0, TH1 *hPullsTrend=0x0)
virtual void SetFixGaussianSigma(Double_t sigma=0.012, Bool_t fixpar=kTRUE)
void RebinMass(Int_t bingroup=1)
virtual Bool_t MassFitter(Bool_t draw=kTRUE)
Double_t GetMinRangeFit() const
TNtuple * fntuParam
number to multiply to the sigma of the signal to obtain the reflected gaussian
virtual void ComputeNFinalPars()
virtual void SetDefaultFixParam()
Double_t fSigmaSgn
err signal gaussian mean value
TList * fContourGraph
L, LW or Chi2.
Double_t GetBkgChiSquare()
void GetRangeFit(Double_t &minvalue, Double_t &maxvalue) const
return the histogram
void SetFitOption(TString opt)
Double_t GetBkgReducedChiSquare()
virtual TH1F * GetAllRangeResidualsAndPulls(Double_t minrange=0, Double_t maxrange=-1, TH1 *hPulls=0x0, TH1 *hResidualTrend=0x0, TH1 *hPullsTrend=0x0)
Int_t ffactor
0 = gaus; 1 = gaus+gaus broadened
void WriteHisto(TString path="./") const
the three functions above all together
Bool_t * GetFixParam() const
Int_t fminBinMass
upper mass limit
Double_t GetSigma() const
virtual Bool_t SetFixThisParam(Int_t thispar, Bool_t fixpar)
Bool_t fSideBands
err on signal gaussian integral
Int_t fNpfits
internal counter
void Significance(Double_t nOfSigma, Double_t &significance, Double_t &errsignificance) const
backgournd in (min, max) with error
TString fFitOption
Number of points used in the fit.
virtual Double_t FitFunction4Sgn(Double_t *x, Double_t *par)
AliHFMassFitter for the fit of invariant mass distribution of charmed mesons.
Double_t GetSigmaUncertainty() const
virtual void WriteCanvas(TString userIDstring="", TString path="./", Double_t nsigma=3, Int_t writeFitInfo=1, Bool_t draw=kFALSE) const
write the TNtuple
AliHFMassFitter & operator=(const AliHFMassFitter &mfit)
TNtuple * NtuParamOneShot(TString ntuname="ntupar")
return the TNtuple