AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliHFInvMassFitter Class Reference

#include <AliHFInvMassFitter.h>

Inheritance diagram for AliHFInvMassFitter:

Public Types

enum  ETypeOfBkg {
  kExpo =0, kLin =1, kPol2 =2, kNoBk =3,
  kPow =4, kPowEx =5
}
 
enum  ETypeOfSgn { kGaus =0, k2Gaus =1 }
 

Public Member Functions

 AliHFInvMassFitter ()
 
 AliHFInvMassFitter (const TH1F *histoToFit, Double_t minvalue, Double_t maxvalue, Int_t fittypeb=kExpo, Int_t fittypes=kGaus)
 
 ~AliHFInvMassFitter ()
 
void SetRangeFit (Double_t minvalue, Double_t maxvalue)
 
void SetUseLikelihoodFit ()
 
void SetUseLikelihoodWithWeightsFit ()
 
void SetUseChi2Fit ()
 
void SetFitOption (TString opt)
 
void SetInitialGaussianMean (Double_t mean)
 
void SetInitialGaussianSigma (Double_t sigma)
 
void SetFixGaussianMean (Double_t mean)
 
void SetFixGaussianSigma (Double_t sigma)
 
void SetFixSignalYield (Double_t yield)
 
void IncludeSecondGausPeak (Double_t mass, Bool_t fixm, Double_t width, Bool_t fixw)
 
Double_t GetRawYield () const
 
Double_t GetRawYieldError () const
 
Double_t GetMean () const
 
Double_t GetMeanUncertainty () const
 
Double_t GetSigma () const
 
Double_t GetSigmaUncertainty () const
 
TF1 * GetBackgroundFullRangeFunc ()
 
TF1 * GetBackgroundRecalcFunc ()
 
TF1 * GetMassFunc ()
 
Double_t GetChiSquare () const
 
Double_t GetReducedChiSquare () const
 
Double_t GetFitProbability () const
 
Bool_t MassFitter (Bool_t draw=kTRUE)
 
Double_t FitFunction4Sgn (Double_t *x, Double_t *par)
 
Double_t FitFunction4Bkg (Double_t *x, Double_t *par)
 
Double_t FitFunction4SecPeak (Double_t *x, Double_t *par)
 
Double_t FitFunction4Mass (Double_t *x, Double_t *par)
 
virtual void Signal (Double_t nOfSigma, Double_t &signal, Double_t &errsignal) const
 
virtual void Signal (Double_t min, Double_t max, Double_t &signal, Double_t &errsignal) const
 
void Background (Double_t nOfSigma, Double_t &background, Double_t &errbackground) const
 
void Background (Double_t min, Double_t max, Double_t &background, Double_t &errbackground) const
 
void DrawHere (TVirtualPad *c)
 
void Significance (Double_t nOfSigma, Double_t &significance, Double_t &errsignificance) const
 
void Significance (Double_t min, Double_t max, Double_t &significance, Double_t &errsignificance) const
 

Private Member Functions

 AliHFInvMassFitter (const AliHFInvMassFitter &source)
 
AliHFInvMassFitteroperator= (const AliHFInvMassFitter &source)
 
void SetNumberOfParams ()
 
Double_t CheckForSignal (Double_t mean, Double_t sigma)
 
TF1 * CreateBackgroundFitFunction (TString fname, Double_t integral)
 
TF1 * CreateSignalFitFunction (TString fname, Double_t integral)
 
TF1 * CreateSecondPeakFunction (TString fname, Double_t integral)
 
TF1 * CreateTotalFitFunction (TString fname)
 
void DrawFit ()
 

Private Attributes

TH1F * fHistoInvMass
 
Double_t fMinMass
 histogram to fit More...
 
Double_t fMaxMass
 lower mass limit More...
 
Int_t fTypeOfFit4Bkg
 upper mass limit More...
 
Int_t fTypeOfFit4Sgn
 background fit func More...
 
Double_t fMass
 signal fit func More...
 
Double_t fMassErr
 signal gaussian mean value More...
 
Double_t fSigmaSgn
 unc on signal gaussian mean value More...
 
Double_t fSigmaSgnErr
 signal gaussian sigma More...
 
Bool_t fFixedMean
 unc on signal gaussian sigma More...
 
Bool_t fFixedSigma
 switch for fix mean of gaussian More...
 
Double_t fFixedRawYield
 switch for fix Sigma of gaussian More...
 
Int_t fNSigPars
 initialization for wa yield More...
 
Int_t fNBkgPars
 fit parameters in signal fit function More...
 
Bool_t fOnlySideBands
 fit parameters in background fit function More...
 
TString fFitOption
 kTRUE = only side bands considered More...
 
Double_t fRawYield
 L, LW or Chi2. More...
 
Double_t fRawYieldErr
 signal gaussian integral More...
 
TF1 * fSigFunc
 err on signal gaussian integral More...
 
TF1 * fBkgFuncSb
 Signal fit function. More...
 
TF1 * fBkgFunc
 background fit function (1st step) More...
 
TF1 * fBkgFuncRef
 background fit function (1st step) More...
 
Bool_t fSecondPeak
 background fit function (2nd step) More...
 
Double_t fSecMass
 swicth off/on second peak (for D+->KKpi in Ds) More...
 
Double_t fSecWidth
 position of the 2nd peak More...
 
Bool_t fFixSecMass
 width of the 2nd peak More...
 
Bool_t fFixSecWidth
 flag to fix the position of the 2nd peak More...
 
TF1 * fSecFunc
 flag to fix the width of the 2nd peak More...
 
TF1 * fFuncTot
 fit function for second peak More...
 

Detailed Description

Definition at line 9 of file AliHFInvMassFitter.h.

Member Enumeration Documentation

Enumerator
kExpo 
kLin 
kPol2 
kNoBk 
kPow 
kPowEx 

Definition at line 12 of file AliHFInvMassFitter.h.

Enumerator
kGaus 
k2Gaus 

Definition at line 13 of file AliHFInvMassFitter.h.

Constructor & Destructor Documentation

AliHFInvMassFitter::AliHFInvMassFitter ( )

default constructor

Definition at line 19 of file AliHFInvMassFitter.cxx.

AliHFInvMassFitter::AliHFInvMassFitter ( const TH1F *  histoToFit,
Double_t  minvalue,
Double_t  maxvalue,
Int_t  fittypeb = kExpo,
Int_t  fittypes = kGaus 
)

standard constructor

Definition at line 55 of file AliHFInvMassFitter.cxx.

AliHFInvMassFitter::~AliHFInvMassFitter ( )

destructor

Definition at line 93 of file AliHFInvMassFitter.cxx.

AliHFInvMassFitter::AliHFInvMassFitter ( const AliHFInvMassFitter source)
private

Member Function Documentation

void AliHFInvMassFitter::Background ( Double_t  nOfSigma,
Double_t background,
Double_t errbackground 
) const

Definition at line 531 of file AliHFInvMassFitter.cxx.

Referenced by DrawHere(), and Significance().

void AliHFInvMassFitter::Background ( Double_t  min,
Double_t  max,
Double_t background,
Double_t errbackground 
) const

Definition at line 541 of file AliHFInvMassFitter.cxx.

Double_t AliHFInvMassFitter::CheckForSignal ( Double_t  mean,
Double_t  sigma 
)
private

Definition at line 245 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

TF1 * AliHFInvMassFitter::CreateBackgroundFitFunction ( TString  fname,
Double_t  integral 
)
private

Definition at line 267 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

TF1 * AliHFInvMassFitter::CreateSecondPeakFunction ( TString  fname,
Double_t  integral 
)
private

Definition at line 306 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

TF1 * AliHFInvMassFitter::CreateSignalFitFunction ( TString  fname,
Double_t  integral 
)
private

Definition at line 318 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

TF1 * AliHFInvMassFitter::CreateTotalFitFunction ( TString  fname)
private

Definition at line 348 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

void AliHFInvMassFitter::DrawFit ( )
private

Definition at line 198 of file AliHFInvMassFitter.cxx.

Referenced by MassFitter().

void AliHFInvMassFitter::DrawHere ( TVirtualPad *  c)

Definition at line 204 of file AliHFInvMassFitter.cxx.

Referenced by DrawFit().

Double_t AliHFInvMassFitter::FitFunction4Bkg ( Double_t x,
Double_t par 
)

Definition at line 378 of file AliHFInvMassFitter.cxx.

Referenced by CreateBackgroundFitFunction(), and FitFunction4Mass().

Double_t AliHFInvMassFitter::FitFunction4Mass ( Double_t x,
Double_t par 
)

Definition at line 501 of file AliHFInvMassFitter.cxx.

Referenced by CreateTotalFitFunction().

Double_t AliHFInvMassFitter::FitFunction4SecPeak ( Double_t x,
Double_t par 
)

Definition at line 489 of file AliHFInvMassFitter.cxx.

Referenced by CreateSecondPeakFunction(), and FitFunction4Mass().

Double_t AliHFInvMassFitter::FitFunction4Sgn ( Double_t x,
Double_t par 
)

Definition at line 456 of file AliHFInvMassFitter.cxx.

Referenced by CreateSignalFitFunction(), and FitFunction4Mass().

TF1* AliHFInvMassFitter::GetBackgroundFullRangeFunc ( )
inline

Definition at line 49 of file AliHFInvMassFitter.h.

TF1* AliHFInvMassFitter::GetBackgroundRecalcFunc ( )
inline

Definition at line 50 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetChiSquare ( ) const
inline

Definition at line 52 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetFitProbability ( ) const
inline

Definition at line 60 of file AliHFInvMassFitter.h.

TF1* AliHFInvMassFitter::GetMassFunc ( )
inline

Definition at line 51 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetMean ( ) const
inline

Definition at line 45 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetMeanUncertainty ( ) const
inline

Definition at line 46 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetRawYield ( ) const
inline

Definition at line 43 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetRawYieldError ( ) const
inline

Definition at line 44 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetReducedChiSquare ( ) const
inline

Definition at line 56 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetSigma ( ) const
inline

Definition at line 47 of file AliHFInvMassFitter.h.

Double_t AliHFInvMassFitter::GetSigmaUncertainty ( ) const
inline

Definition at line 48 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::IncludeSecondGausPeak ( Double_t  mass,
Bool_t  fixm,
Double_t  width,
Bool_t  fixw 
)
inline

Definition at line 39 of file AliHFInvMassFitter.h.

Bool_t AliHFInvMassFitter::MassFitter ( Bool_t  draw = kTRUE)

Definition at line 144 of file AliHFInvMassFitter.cxx.

AliHFInvMassFitter& AliHFInvMassFitter::operator= ( const AliHFInvMassFitter source)
private
void AliHFInvMassFitter::SetFitOption ( TString  opt)
inline

Definition at line 25 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetFixGaussianMean ( Double_t  mean)
inline

Definition at line 28 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetFixGaussianSigma ( Double_t  sigma)
inline

Definition at line 32 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetFixSignalYield ( Double_t  yield)
inline

Definition at line 36 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetInitialGaussianMean ( Double_t  mean)
inline

Definition at line 26 of file AliHFInvMassFitter.h.

Referenced by SetFixGaussianMean().

void AliHFInvMassFitter::SetInitialGaussianSigma ( Double_t  sigma)
inline

Definition at line 27 of file AliHFInvMassFitter.h.

Referenced by SetFixGaussianSigma().

void AliHFInvMassFitter::SetNumberOfParams ( )
private
void AliHFInvMassFitter::SetRangeFit ( Double_t  minvalue,
Double_t  maxvalue 
)
inline

Definition at line 18 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetUseChi2Fit ( )
inline

Definition at line 24 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetUseLikelihoodFit ( )
inline

Definition at line 22 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::SetUseLikelihoodWithWeightsFit ( )
inline

Definition at line 23 of file AliHFInvMassFitter.h.

void AliHFInvMassFitter::Signal ( Double_t  nOfSigma,
Double_t signal,
Double_t errsignal 
) const
virtual

Definition at line 512 of file AliHFInvMassFitter.cxx.

void AliHFInvMassFitter::Signal ( Double_t  min,
Double_t  max,
Double_t signal,
Double_t errsignal 
) const
virtual

Definition at line 522 of file AliHFInvMassFitter.cxx.

void AliHFInvMassFitter::Significance ( Double_t  nOfSigma,
Double_t significance,
Double_t errsignificance 
) const

Definition at line 578 of file AliHFInvMassFitter.cxx.

Referenced by DrawHere().

void AliHFInvMassFitter::Significance ( Double_t  min,
Double_t  max,
Double_t significance,
Double_t errsignificance 
) const

Definition at line 590 of file AliHFInvMassFitter.cxx.

Member Data Documentation

TF1* AliHFInvMassFitter::fBkgFunc
private

background fit function (1st step)

Definition at line 111 of file AliHFInvMassFitter.h.

Referenced by Background(), CheckForSignal(), CreateTotalFitFunction(), DrawHere(), GetBackgroundFullRangeFunc(), MassFitter(), and ~AliHFInvMassFitter().

TF1* AliHFInvMassFitter::fBkgFuncRef
private

background fit function (1st step)

Definition at line 112 of file AliHFInvMassFitter.h.

Referenced by Background(), DrawHere(), GetBackgroundRecalcFunc(), MassFitter(), and ~AliHFInvMassFitter().

TF1* AliHFInvMassFitter::fBkgFuncSb
private

Signal fit function.

Definition at line 110 of file AliHFInvMassFitter.h.

Referenced by MassFitter().

TString AliHFInvMassFitter::fFitOption
private

kTRUE = only side bands considered

Definition at line 106 of file AliHFInvMassFitter.h.

Referenced by MassFitter(), SetFitOption(), SetUseChi2Fit(), SetUseLikelihoodFit(), and SetUseLikelihoodWithWeightsFit().

Bool_t AliHFInvMassFitter::fFixedMean
private

unc on signal gaussian sigma

Definition at line 100 of file AliHFInvMassFitter.h.

Referenced by CreateSignalFitFunction(), and SetFixGaussianMean().

Double_t AliHFInvMassFitter::fFixedRawYield
private

switch for fix Sigma of gaussian

Definition at line 102 of file AliHFInvMassFitter.h.

Referenced by CreateSignalFitFunction(), and SetFixSignalYield().

Bool_t AliHFInvMassFitter::fFixedSigma
private

switch for fix mean of gaussian

Definition at line 101 of file AliHFInvMassFitter.h.

Referenced by CreateSignalFitFunction(), and SetFixGaussianSigma().

Bool_t AliHFInvMassFitter::fFixSecMass
private

width of the 2nd peak

Definition at line 116 of file AliHFInvMassFitter.h.

Referenced by CreateSecondPeakFunction(), and IncludeSecondGausPeak().

Bool_t AliHFInvMassFitter::fFixSecWidth
private

flag to fix the position of the 2nd peak

Definition at line 117 of file AliHFInvMassFitter.h.

Referenced by CreateSecondPeakFunction(), and IncludeSecondGausPeak().

TF1* AliHFInvMassFitter::fFuncTot
private

fit function for second peak

Definition at line 119 of file AliHFInvMassFitter.h.

Referenced by DrawHere(), GetChiSquare(), GetFitProbability(), GetMassFunc(), GetReducedChiSquare(), MassFitter(), and ~AliHFInvMassFitter().

TH1F* AliHFInvMassFitter::fHistoInvMass
private
Double_t AliHFInvMassFitter::fMass
private
Double_t AliHFInvMassFitter::fMassErr
private

signal gaussian mean value

Definition at line 97 of file AliHFInvMassFitter.h.

Referenced by GetMeanUncertainty(), and MassFitter().

Int_t AliHFInvMassFitter::fNBkgPars
private

fit parameters in signal fit function

Definition at line 104 of file AliHFInvMassFitter.h.

Referenced by CreateBackgroundFitFunction(), CreateTotalFitFunction(), DrawHere(), FitFunction4Mass(), MassFitter(), and SetNumberOfParams().

Int_t AliHFInvMassFitter::fNSigPars
private

initialization for wa yield

Definition at line 103 of file AliHFInvMassFitter.h.

Referenced by CreateSignalFitFunction(), CreateTotalFitFunction(), DrawHere(), FitFunction4Mass(), MassFitter(), and SetNumberOfParams().

Bool_t AliHFInvMassFitter::fOnlySideBands
private

fit parameters in background fit function

Definition at line 105 of file AliHFInvMassFitter.h.

Referenced by FitFunction4Bkg(), and MassFitter().

Double_t AliHFInvMassFitter::fRawYield
private

L, LW or Chi2.

Definition at line 107 of file AliHFInvMassFitter.h.

Referenced by DrawHere(), GetRawYield(), MassFitter(), Signal(), and Significance().

Double_t AliHFInvMassFitter::fRawYieldErr
private

signal gaussian integral

Definition at line 108 of file AliHFInvMassFitter.h.

Referenced by DrawHere(), GetRawYieldError(), MassFitter(), Signal(), and Significance().

TF1* AliHFInvMassFitter::fSecFunc
private

flag to fix the width of the 2nd peak

Definition at line 118 of file AliHFInvMassFitter.h.

Referenced by CreateTotalFitFunction(), MassFitter(), and ~AliHFInvMassFitter().

Double_t AliHFInvMassFitter::fSecMass
private

swicth off/on second peak (for D+->KKpi in Ds)

Definition at line 114 of file AliHFInvMassFitter.h.

Referenced by CreateSecondPeakFunction(), FitFunction4Bkg(), IncludeSecondGausPeak(), and MassFitter().

Bool_t AliHFInvMassFitter::fSecondPeak
private

background fit function (2nd step)

Definition at line 113 of file AliHFInvMassFitter.h.

Referenced by CreateTotalFitFunction(), FitFunction4Bkg(), FitFunction4Mass(), IncludeSecondGausPeak(), and MassFitter().

Double_t AliHFInvMassFitter::fSecWidth
private

position of the 2nd peak

Definition at line 115 of file AliHFInvMassFitter.h.

Referenced by CreateSecondPeakFunction(), FitFunction4Bkg(), IncludeSecondGausPeak(), and MassFitter().

TF1* AliHFInvMassFitter::fSigFunc
private

err on signal gaussian integral

Definition at line 109 of file AliHFInvMassFitter.h.

Referenced by CreateTotalFitFunction(), MassFitter(), Signal(), and ~AliHFInvMassFitter().

Double_t AliHFInvMassFitter::fSigmaSgn
private

unc on signal gaussian mean value

Definition at line 98 of file AliHFInvMassFitter.h.

Referenced by Background(), CreateSignalFitFunction(), FitFunction4Bkg(), GetSigma(), MassFitter(), SetInitialGaussianSigma(), Signal(), and Significance().

Double_t AliHFInvMassFitter::fSigmaSgnErr
private

signal gaussian sigma

Definition at line 99 of file AliHFInvMassFitter.h.

Referenced by GetSigmaUncertainty(), and MassFitter().

Int_t AliHFInvMassFitter::fTypeOfFit4Bkg
private

upper mass limit

Definition at line 94 of file AliHFInvMassFitter.h.

Referenced by CreateBackgroundFitFunction(), FitFunction4Bkg(), and SetNumberOfParams().

Int_t AliHFInvMassFitter::fTypeOfFit4Sgn
private

background fit func

Definition at line 95 of file AliHFInvMassFitter.h.

Referenced by CreateSignalFitFunction(), FitFunction4Sgn(), and SetNumberOfParams().


The documentation for this class was generated from the following files: