AliPhysics  ec707b8 (ec707b8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
3 /* Copyright(c) 2008-2019, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
6 #include <TNamed.h>
7 #include <TString.h>
8 #include <TPad.h>
12 class AliHFMultiTrials : public TNamed {
14  public:
16  virtual ~AliHFMultiTrials();
18  void ConfigureRebinSteps(Int_t nSteps, Int_t* values){
19  if(fRebinSteps) delete [] fRebinSteps;
20  fNumOfRebinSteps=nSteps;
21  fRebinSteps = new Int_t[fNumOfRebinSteps];
22  for(Int_t ib=0; ib<fNumOfRebinSteps; ib++) fRebinSteps[ib]=values[ib];
23  }
25  void ConfigureLowLimFitSteps(Int_t nSteps, Double_t* values){
26  if(fLowLimFitSteps) delete [] fLowLimFitSteps;
27  fNumOfLowLimFitSteps=nSteps;
28  fLowLimFitSteps = new Double_t[fNumOfLowLimFitSteps];
29  for(Int_t ib=0; ib<fNumOfLowLimFitSteps; ib++) fLowLimFitSteps[ib]=values[ib];
30  }
32  void ConfigureUpLimFitSteps(Int_t nSteps, Double_t* values){
33  if(fUpLimFitSteps) delete [] fUpLimFitSteps;
34  fNumOfUpLimFitSteps=nSteps;
35  fUpLimFitSteps = new Double_t[fNumOfUpLimFitSteps];
36  for(Int_t ib=0; ib<fNumOfUpLimFitSteps; ib++) fUpLimFitSteps[ib]=values[ib];
37  }
39  void ConfigurenSigmaBinCSteps(Int_t nSteps, Double_t* values){
40  if(fnSigmaBinCSteps) delete [] fnSigmaBinCSteps;
41  fNumOfnSigmaBinCSteps=nSteps;
43  for(Int_t ib=0; ib<fNumOfnSigmaBinCSteps; ib++) fnSigmaBinCSteps[ib]=values[ib];
44  }
46  void GetGlobalMinMaxYield(Double_t& min, Double_t& max) {
47  min = fMinYieldGlob;
48  max = fMaxYieldGlob;
49  }
51  void SetMass(Double_t mass){fMassD=mass;}
52  void SetSigmaGaussMC(Double_t sig){fSigmaGausMC=sig;}
53  void SetSigmaMCVariation(Double_t var=0.15){fSigmaMCVariation=var;}
55  void SetSuffixForHistoNames(const Char_t* name){
56  fSuffix=name;
57  }
60  void SetUseExpoBackground(Bool_t opt=kTRUE){fUseExpoBkg=opt;}
61  void SetUseLinBackground(Bool_t opt=kTRUE){fUseLinBkg=opt;}
62  void SetUsePol2Background(Bool_t opt=kTRUE){fUsePol2Bkg=opt;}
63  void SetUsePol3Background(Bool_t opt=kTRUE){fUsePol3Bkg=opt;}
64  void SetUsePol4Background(Bool_t opt=kTRUE){fUsePol4Bkg=opt;}
65  void SetUsePol5Background(Bool_t opt=kTRUE){fUsePol5Bkg=opt;}
67  void SetDrawIndividualFits(Bool_t opt=kTRUE){fDrawIndividualFits=opt;}
69  Bool_t DoMultiTrials(TH1D* hInvMassHisto, TPad* thePad=0x0);
70  void SaveToRoot(TString fileName, TString option="recreate") const;
71  void DrawHistos(TCanvas* cry) const;
76  private:
78  Bool_t CreateHistos();
79  TH1F* RebinHisto(TH1D* hOrig, Int_t reb, Int_t firstUse) const;
80  void BinCount(TH1F* h, TF1* fB, Int_t rebin, Double_t minMass, Double_t maxMass, Double_t& count, Double_t& ecount) const;
81  Bool_t DoFitWithPol3Bkg(TH1F* histoToFit, Double_t hmin, Double_t hmax,
82  Int_t theCase);
84  AliHFMultiTrials(const AliHFMultiTrials &source);
88  Int_t* fRebinSteps; //[fNumOfRebinSteps] values of rebin
90  Double_t* fLowLimFitSteps; //[fNumOfLowLimFitSteps] values of low limits for fit
92  Double_t* fUpLimFitSteps; //[fNumOfUpLimFitSteps] values of up limits for fit
94  Double_t* fnSigmaBinCSteps; //[fNumOfnSigmaBinCSteps] values of nsigma for bin count
96  Double_t fSigmaGausMC;
97  Double_t fSigmaMCVariation;
98  Double_t fMassD;
99  TString fSuffix;
100  Int_t fFitOption;
101  Bool_t fUseExpoBkg;
102  Bool_t fUseLinBkg;
103  Bool_t fUsePol2Bkg;
104  Bool_t fUsePol3Bkg;
105  Bool_t fUsePol4Bkg;
106  Bool_t fUsePol5Bkg;
130  Double_t fMinYieldGlob;
131  Double_t fMaxYieldGlob;
134  ClassDef(AliHFMultiTrials,1);
135 };
138 #endif
void GetGlobalMinMaxYield(Double_t &min, Double_t &max)
Double_t fMaxYieldGlob
minimum yield
void SetUsePol2Background(Bool_t opt=kTRUE)
TH1F * fHistoSigmaTrialAll
histo with yield from all trials
TNtuple * fNtupleMultiTrials
histo with bin counts from subsamples of trials
Double_t fMinYieldGlob
TH1F * fHistoRawYieldDistAll
flag for drawing fits
Bool_t fUseLinBkg
switch for exponential background
void SetUsePol4Background(Bool_t opt=kTRUE)
TString fileName
void SetUseLogLikelihoodFit()
Double_t mass
Double_t * fLowLimFitSteps
number of steps on the min. mass for fit
void ConfigurenSigmaBinCSteps(Int_t nSteps, Double_t *values)
TString fSuffix
mass of D meson
TH1F * fHistoMeanTrialAll
histo with gauss sigma from all trials
AliHFMultiTrials & operator=(const AliHFMultiTrials &source)
TH1F ** fHistoRawYieldTrial
histo with yield from subsamples of trials
Double_t fMassD
relative variation of the sigma
Int_t * fRebinSteps
number of rebin steps
TH2F ** fHistoRawYieldTrialBinC
histo with bin counts from subsamples of trials
TH1F ** fHistoSigmaTrial
histo with yield from subsamples of trials
void DrawHistos(TCanvas *cry) const
TH1F ** fHistoRawYieldDist
histo with bin counts from all trials
Double_t * fnSigmaBinCSteps
number of steps on the bin counting
Int_t fFitOption
name to characterize analysis case
void ConfigureLowLimFitSteps(Int_t nSteps, Double_t *values)
Bool_t fDrawIndividualFits
switch for pol5 background
Bool_t fUsePol2Bkg
switch for linear background
Bool_t fUsePol5Bkg
switch for pol4 background
void SetUseExpoBackground(Bool_t opt=kTRUE)
void SetMass(Double_t mass)
TH1F ** fHistoRawYieldDistBinC
histo with chi2 from subsamples of trials
void SetDrawIndividualFits(Bool_t opt=kTRUE)
void SetSigmaGaussMC(Double_t sig)
TH1F * fHistoRawYieldDistBinCAll
histo with chi2 from all trials
Bool_t DoFitWithPol3Bkg(TH1F *histoToFit, Double_t hmin, Double_t hmax, Int_t theCase)
void SetSuffixForHistoNames(const Char_t *name)
TH1F ** fHistoMeanTrial
histo with gauss sigma from subsamples of trials
void SetSigmaMCVariation(Double_t var=0.15)
void SetUsePol5Background(Bool_t opt=kTRUE)
TH1F * RebinHisto(TH1D *hOrig, Int_t reb, Int_t firstUse) const
void BinCount(TH1F *h, TF1 *fB, Int_t rebin, Double_t minMass, Double_t maxMass, Double_t &count, Double_t &ecount) const
void SetUseLinBackground(Bool_t opt=kTRUE)
TH2F * fHistoRawYieldTrialBinCAll
histo with bin counts from all trials
Double_t fSigmaMCVariation
sigma of D meson peak from MC
Bool_t fUsePol3Bkg
switch for pol2 background
Bool_t fUsePol4Bkg
switch for pol3 background
Double_t minMass
Int_t rebin
TH1F ** fHistoChi2Trial
histo with gauss mean from subsamples of trials
void SetUsePol3Background(Bool_t opt=kTRUE)
TH1F * fHistoRawYieldTrialAll
histo with yield from all trials
void ConfigureRebinSteps(Int_t nSteps, Int_t *values)
void ConfigureUpLimFitSteps(Int_t nSteps, Double_t *values)
void SaveToRoot(TString fileName, TString option="recreate") const
Double_t maxMass
virtual ~AliHFMultiTrials()
Bool_t fUseExpoBkg
LL or chi2 fit.
Bool_t DoMultiTrials(TH1D *hInvMassHisto, TPad *thePad=0x0)
Double_t * fUpLimFitSteps
number of steps on the max. mass for fit
TH1F * fHistoChi2TrialAll
histo with gauss mean from all trials