AliPhysics  master (3d17d9d)
AliHFInvMassMultiTrialFit.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 2008-2019, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include <TMath.h>
17 #include <TPad.h>
18 #include <TCanvas.h>
19 #include <TH1F.h>
20 #include <TH2F.h>
21 #include <TNtuple.h>
22 #include <TF1.h>
23 #include <TLatex.h>
24 #include <TFile.h>
25 #include "AliHFInvMassFitter.h"
27 #include "AliVertexingHFUtils.h"
28 
32 
33 
34 //_________________________________________________________________________
36  TNamed(),
37  fNumOfRebinSteps(4),
38  fRebinSteps(0x0),
39  fNumOfFirstBinSteps(1),
40  fNumOfLowLimFitSteps(6),
41  fLowLimFitSteps(0x0),
42  fNumOfUpLimFitSteps(6),
43  fUpLimFitSteps(0x0),
44  fNumOfnSigmaBinCSteps(11),
45  fnSigmaBinCSteps(0x0),
46  fnSigmaForBkgEval(3),
47  fSigmaGausMC(0.010),
48  fSigmaMCVariationUp(0.1),
49  fSigmaMCVariationDw(0.1),
50  fMassD(1.86484),
51  fUpperMassToFix(1.868),
52  fLowerMassToFix(1.862),
53  fSuffix(""),
54  fFitOption(0),
55  fUseExpoBkg(kTRUE),
56  fUseLinBkg(kTRUE),
57  fUsePol2Bkg(kTRUE),
58  fUsePol3Bkg(kTRUE),
59  fUsePol4Bkg(kTRUE),
60  fUsePol5Bkg(kFALSE),
61  fUsePowLawBkg(kFALSE),
62  fUsePowLawTimesExpoBkg(kFALSE),
63  fUse2GausSignal(kFALSE),
64  fUse2GausSigmaRatioSignal(kFALSE),
65  fFixSecondGausSig(-1.),
66  fFixSecondGausFrac(-1.),
67  fFixSecondGausSigRat(-1.),
68  fUseFixSigUpFreeMean(kTRUE),
69  fUseFixSigDownFreeMean(kTRUE),
70  fUseFreeS(kTRUE),
71  fUseFixedMeanFreeS(kTRUE),
72  fUseFixSigFreeMean(kTRUE),
73  fUseFixSigFixMean(kTRUE),
74  fUseFixSigFixMeanUp(kTRUE),
75  fUseFixSigFixMeanDown(kTRUE),
76  fUseFreeSigFixMeanUp(kTRUE),
77  fUseFreeSigFixMeanDown(kTRUE),
78  fUseFixSigVarWithFixMean(kTRUE),
79  fUseSecondPeak(kFALSE),
80  fMassSecondPeak(1.86958),
81  fSigmaSecondPeak(0.01),
82  fFixMassSecondPeak(kFALSE),
83  fFixSigmaSecondPeak(kFALSE),
84  fSaveBkgVal(kFALSE),
85  fDrawIndividualFits(kFALSE),
86  fHistoRawYieldDistAll(0x0),
87  fHistoRawYieldTrialAll(0x0),
88  fHistoSigmaTrialAll(0x0),
89  fHistoMeanTrialAll(0x0),
90  fHistoChi2TrialAll(0x0),
91  fHistoSignifTrialAll(0x0),
92  fHistoBkgTrialAll(0x0),
93  fHistoBkgInBinEdgesTrialAll(0x0),
94  fHistoRawYieldDistBinC0All(0x0),
95  fHistoRawYieldTrialBinC0All(0x0),
96  fHistoRawYieldDistBinC1All(0x0),
97  fHistoRawYieldTrialBinC1All(0x0),
98  fHistoRawYieldDist(0x0),
99  fHistoRawYieldTrial(0x0),
100  fHistoSigmaTrial(0x0),
101  fHistoMeanTrial(0x0),
102  fHistoChi2Trial(0x0),
103  fHistoSignifTrial(0x0),
104  fHistoBkgTrial(0x0),
105  fHistoBkgInBinEdgesTrial(0x0),
106  fHistoRawYieldDistBinC0(0x0),
107  fHistoRawYieldTrialBinC0(0x0),
108  fHistoRawYieldDistBinC1(0x0),
109  fHistoRawYieldTrialBinC1(0x0),
110  fhTemplRefl(0x0),
111  fhTemplSign(0x0),
112  fFixRefloS(1.),
113  fNtupleMultiTrials(0x0),
114  fNtupleBinCount(0x0),
115  fMinYieldGlob(0),
116  fMaxYieldGlob(0),
117  fMassFitters()
118 {
119  // constructor
120  Int_t rebinStep[4]={3,4,5,6};
121  Double_t minMassStep[6]={1.68,1.70,1.72,1.74,1.76,1.78};
122  Double_t maxMassStep[6]={2.06,2.04,2.02,2.00,1.98,1.96};
123  Double_t nSigmasBC[11]={2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0};
124  ConfigureRebinSteps(4,rebinStep);
125  ConfigureLowLimFitSteps(6,minMassStep);
126  ConfigureUpLimFitSteps(6,maxMassStep);
127  ConfigurenSigmaBinCSteps(11,nSigmasBC);
128 }
129 
130 //________________________________________________________________________
132  // destructor
133  delete [] fRebinSteps;
134  delete [] fLowLimFitSteps;
135  delete [] fUpLimFitSteps;
136  if(fhTemplRefl) delete fhTemplRefl;
137  if(fhTemplSign) delete fhTemplSign;
138  for (auto fitter : fMassFitters) delete fitter;
139  delete fHistoRawYieldDistAll;
140  delete fHistoRawYieldTrialAll;
141  delete fHistoSigmaTrialAll;
142  delete fHistoMeanTrialAll;
143  delete fHistoChi2TrialAll;
144  delete fHistoSignifTrialAll;
145  delete fHistoBkgTrialAll;
151  for(Int_t typeb=0; typeb<kNBkgFuncCases; typeb++){
152  for(Int_t types=0; types<kNSigFuncCases; types++){
153  for(Int_t igs=0; igs<kNGausSigCases; igs++){
154  for(Int_t igm=0; igm<kNGausMeanCases; igm++){
155  Int_t theCase=igm*kNGausSigCases*kNBkgFuncCases*kNSigFuncCases+igs*kNBkgFuncCases*kNSigFuncCases+types*kNBkgFuncCases+typeb;
156  delete fHistoRawYieldDist[theCase];
157  delete fHistoRawYieldDistBinC0[theCase];
158  delete fHistoRawYieldDistBinC1[theCase];
159  delete fHistoRawYieldTrial[theCase];
160  delete fHistoRawYieldTrialBinC0[theCase];
161  delete fHistoRawYieldTrialBinC1[theCase];
162  delete fHistoSigmaTrial[theCase];
163  delete fHistoMeanTrial[theCase];
164  delete fHistoChi2Trial[theCase];
165  delete fHistoSignifTrial[theCase];
166  if(fHistoBkgTrial) delete fHistoBkgTrial[theCase];
168  }
169  }
170  }
171  }
172  delete [] fHistoRawYieldDist;
173  delete [] fHistoRawYieldDistBinC0;
174  delete [] fHistoRawYieldDistBinC1;
175  delete [] fHistoRawYieldTrial;
176  delete [] fHistoRawYieldTrialBinC0;
177  delete [] fHistoRawYieldTrialBinC1;
178  delete [] fHistoSigmaTrial;
179  delete [] fHistoMeanTrial;
180  delete [] fHistoChi2Trial;
181  delete [] fHistoSignifTrial;
182  delete [] fHistoBkgTrial;
183  delete [] fHistoBkgInBinEdgesTrial;
184 
185  delete fNtupleMultiTrials;
186  delete fNtupleBinCount;
187 }
188 
189 //________________________________________________________________________
191  // creates output histograms
192 
194 
195  TString funcBkg[kNBkgFuncCases]={"Expo","Lin","Pol2","Pol3","Pol4","Pol5","PowLaw","PowLawExpo"};
196  TString funcSig[kNSigFuncCases]={"","2Gaus","2GausSigmaRatio"};
197  TString gausSig[kNGausSigCases]={"FixedSig","FixedSigUp","FixedSigDw","FreeSig"};
198  TString gausMean[kNGausMeanCases]={"FixedMean","FixedMeanUp","FixedMeanDw","FreeMean"};
199 
201 
202  fHistoRawYieldDistAll = new TH1F(Form("hRawYieldDistAll%s",fSuffix.Data())," ; Raw Yield",5000,0.,50000.);
203  fHistoRawYieldTrialAll = new TH1F(Form("hRawYieldTrialAll%s",fSuffix.Data())," ; Trial # ; Raw Yield",nCases*totTrials,-0.5,nCases*totTrials-0.5);
204  fHistoSigmaTrialAll = new TH1F(Form("hSigmaTrialAll%s",fSuffix.Data())," ; Trial # ; Sigma (GeV/c^{2})",nCases*totTrials,-0.5,nCases*totTrials-0.5);
205  fHistoMeanTrialAll = new TH1F(Form("hMeanTrialAll%s",fSuffix.Data())," ; Trial # ; Mean (GeV/c^{2})",nCases*totTrials,-0.5,nCases*totTrials-0.5);
206  fHistoChi2TrialAll = new TH1F(Form("hChi2TrialAll%s",fSuffix.Data())," ; Trial # ; #chi^{2}",nCases*totTrials,-0.5,nCases*totTrials-0.5);
207  fHistoSignifTrialAll = new TH1F(Form("hSignifTrialAll%s",fSuffix.Data())," ; Trial # ; Significance",nCases*totTrials,-0.5,nCases*totTrials-0.5);
208  if(fSaveBkgVal) {
209  fHistoBkgTrialAll = new TH1F(Form("hBkgTrialAll%s",fSuffix.Data())," ; Background",nCases*totTrials,-0.5,nCases*totTrials-0.5);
210  fHistoBkgInBinEdgesTrialAll = new TH1F(Form("hBkgInBinEdgesTrialAll%s",fSuffix.Data())," ; Background in bin edges",nCases*totTrials,-0.5,nCases*totTrials-0.5);
211  }
212 
213 
214  fHistoRawYieldDistBinC0All = new TH1F(Form("hRawYieldDistBinC0All%s",fSuffix.Data())," ; Raw Yield (bin count)",5000,0.,50000.);
215  fHistoRawYieldTrialBinC0All = new TH2F(Form("hRawYieldTrialBinC0All%s",fSuffix.Data())," ; Trial # ; Range for count ; Raw Yield (bin count)",totTrials,-0.5,totTrials-0.5,fNumOfnSigmaBinCSteps,-0.5,fNumOfnSigmaBinCSteps-0.5);
216  fHistoRawYieldDistBinC1All = new TH1F(Form("hRawYieldDistBinC1All%s",fSuffix.Data())," ; Raw Yield (bin count)",5000,0.,50000.);
217  fHistoRawYieldTrialBinC1All = new TH2F(Form("hRawYieldTrialBinC1All%s",fSuffix.Data())," ; Trial # ; Range for count ; Raw Yield (bin count)",totTrials,-0.5,totTrials-0.5,fNumOfnSigmaBinCSteps,-0.5,fNumOfnSigmaBinCSteps-0.5);
218 
219  fHistoRawYieldDist = new TH1F*[nCases];
220  fHistoRawYieldTrial = new TH1F*[nCases];
221  fHistoSigmaTrial = new TH1F*[nCases];
222  fHistoMeanTrial = new TH1F*[nCases];
223  fHistoChi2Trial = new TH1F*[nCases];
224  fHistoSignifTrial = new TH1F*[nCases];
225  if(fSaveBkgVal) {
226  fHistoBkgTrial = new TH1F*[nCases];
227  fHistoBkgInBinEdgesTrial = new TH1F*[nCases];
228  }
229 
230  fHistoRawYieldDistBinC0 = new TH1F*[nCases];
231  fHistoRawYieldTrialBinC0 = new TH2F*[nCases];
232  fHistoRawYieldDistBinC1 = new TH1F*[nCases];
233  fHistoRawYieldTrialBinC1 = new TH2F*[nCases];
234 
235  for(Int_t typeb=0; typeb<kNBkgFuncCases; typeb++){
236  for(Int_t types=0; types<kNSigFuncCases; types++){
237  for(Int_t igs=0; igs<kNGausSigCases; igs++){
238  for(Int_t igm=0; igm<kNGausMeanCases; igm++){
239  Int_t theCase=igm*kNGausSigCases*kNBkgFuncCases*kNSigFuncCases+igs*kNBkgFuncCases*kNSigFuncCases+types*kNBkgFuncCases+typeb;
240  printf("typeb= %d types = %d igs = %d igm=%d theCase=%d out of %d\n",typeb,types,igs,igm,theCase,nCases);
241  fHistoRawYieldDist[theCase]=new TH1F(Form("hRawYieldDist%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Raw Yield",5000,0.,50000.);
242  fHistoRawYieldDistBinC0[theCase]=new TH1F(Form("hRawYieldDistBinC0%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Raw Yield (bin count)",5000,0.,50000.);
243  fHistoRawYieldDistBinC1[theCase]=new TH1F(Form("hRawYieldDistBinC1%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Raw Yield (bin count)",5000,0.,50000.);
244  fHistoRawYieldTrial[theCase]=new TH1F(Form("hRawYieldTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Raw Yield",totTrials,-0.5,totTrials-0.5);
245  fHistoRawYieldTrialBinC0[theCase]=new TH2F(Form("hRawYieldTrialBinC0%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Range for count ; Raw Yield (bin count)",totTrials,-0.5,totTrials-0.5,fNumOfnSigmaBinCSteps,-0.5,fNumOfnSigmaBinCSteps-0.5);
246  fHistoRawYieldTrialBinC1[theCase]=new TH2F(Form("hRawYieldTrialBinC1%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Range for count ; Raw Yield (bin count)",totTrials,-0.5,totTrials-0.5,fNumOfnSigmaBinCSteps,-0.5,fNumOfnSigmaBinCSteps-0.5);
247  fHistoSigmaTrial[theCase]=new TH1F(Form("hSigmaTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Sigma (GeV/c^{2})",totTrials,-0.5,totTrials-0.5);
248  fHistoMeanTrial[theCase]=new TH1F(Form("hMeanTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Mean (GeV/c^{2})",totTrials,-0.5,totTrials-0.5);
249  fHistoChi2Trial[theCase]=new TH1F(Form("hChi2Trial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; #chi^{2}",totTrials,-0.5,totTrials-0.5);
250  fHistoSignifTrial[theCase]=new TH1F(Form("hSignifTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Trial # ; Significance",totTrials,-0.5,totTrials-0.5);
251  if(fSaveBkgVal) {
252  fHistoBkgTrial[theCase] = new TH1F(Form("hBkgTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Background",totTrials,-0.5,totTrials-0.5);
253  fHistoBkgInBinEdgesTrial[theCase] = new TH1F(Form("hBkgInBinEdgesTrial%s%s%s%s%s",funcBkg[typeb].Data(),funcSig[types].Data(),gausSig[igs].Data(),gausMean[igm].Data(),fSuffix.Data())," ; Background in bin edges",totTrials,-0.5,totTrials-0.5);
254  }
255 
256  fHistoChi2Trial[theCase]->SetMarkerStyle(7);
257  fHistoSignifTrial[theCase]->SetMarkerStyle(7);
258  fHistoSigmaTrial[theCase]->SetMarkerStyle(7);
259  fHistoMeanTrial[theCase]->SetMarkerStyle(7);
260  if(fSaveBkgVal) {
261  fHistoBkgTrial[theCase]->SetMarkerStyle(7);
262  fHistoBkgInBinEdgesTrial[theCase]->SetMarkerStyle(7);
263  }
264  }
265  }
266  }
267  }
268  fNtupleMultiTrials = new TNtuple(Form("ntuMultiTrial%s",fSuffix.Data()),Form("ntuMultiTrial%s",fSuffix.Data()),"rebin:firstb:minfit:maxfit:bkgfunc:sigfunc:confsig:confmean:chi2:signif:mean:emean:sigma:esigma:rawy:erawy",128000);
269  fNtupleMultiTrials->SetDirectory(nullptr);
270  fNtupleBinCount = new TNtuple(Form("ntuBinCount%s",fSuffix.Data()),Form("ntuBinCount%s",fSuffix.Data()),"rebin:firstb:minfit:maxfit:bkgfunc:sigfunc:confsig:confmean:chi2:nSigmaBC:rawyBC0:erawyBC0:rawyBC1:erawyBC1",128000);
271  fNtupleBinCount->SetDirectory(nullptr);
272  return kTRUE;
273 
274 }
275 
276 //________________________________________________________________________
278  // perform the multiple fits
279 
280  Bool_t hOK=CreateHistos();
281  if(!hOK) return kFALSE;
282 
283  Int_t itrial=0;
284  Int_t itrialBC=0;
286 
287  fMinYieldGlob=999999.;
288  fMaxYieldGlob=0.;
289  Float_t xnt[16];
290  Float_t xntBC[14];
291 
292  for(Int_t ir=0; ir<fNumOfRebinSteps; ir++){
293  Int_t rebin=fRebinSteps[ir];
294  for(Int_t iFirstBin=1; iFirstBin<=fNumOfFirstBinSteps; iFirstBin++) {
295  TH1F* hRebinned=0x0;
296  if(fNumOfFirstBinSteps==1) hRebinned=(TH1F*)AliVertexingHFUtils::RebinHisto(hInvMassHisto,rebin,-1);
297  else hRebinned=(TH1F*)AliVertexingHFUtils::RebinHisto(hInvMassHisto,rebin,iFirstBin);
298  for(Int_t iMinMass=0; iMinMass<fNumOfLowLimFitSteps; iMinMass++){
300  Double_t hmin=TMath::Max(minMassForFit,hRebinned->GetBinLowEdge(2));
301  for(Int_t iMaxMass=0; iMaxMass<fNumOfUpLimFitSteps; iMaxMass++){
303  Double_t hmax=TMath::Min(maxMassForFit,hRebinned->GetBinLowEdge(hRebinned->GetNbinsX()));
304  ++itrial;
305  for(Int_t typeb=0; typeb<kNBkgFuncCases; typeb++){
306  if(typeb==kExpoBkg && !fUseExpoBkg) continue;
307  if(typeb==kLinBkg && !fUseLinBkg) continue;
308  if(typeb==kPol2Bkg && !fUsePol2Bkg) continue;
309  if(typeb==kPol3Bkg && !fUsePol3Bkg) continue;
310  if(typeb==kPol4Bkg && !fUsePol4Bkg) continue;
311  if(typeb==kPol5Bkg && !fUsePol5Bkg) continue;
312  if(typeb==kPowBkg && !fUsePowLawBkg) continue;
313  if(typeb==kPowTimesExpoBkg && !fUsePowLawTimesExpoBkg) continue;
314  for(Int_t types=0; types<kNSigFuncCases; types++){
315  if(types==k2Gaus && !fUse2GausSignal) continue;
317  for(Int_t igs=0; igs<kNGausSigCases; igs++){
318  if (igs==kFreeSig && !fUseFreeS) continue;
319  for(Int_t igm=0; igm<kNGausMeanCases; igm++){
320  if (igs==kFixSig){
321  if (igm==kFreeMean && !fUseFixSigFreeMean) continue;
322  if (igm==kFixMean && !fUseFixSigFixMean) continue;
323  if (igm==kFixMeanUp && !fUseFixSigFixMeanUp) continue;
324  if (igm==kFixMeanDown && !fUseFixSigFixMeanDown) continue;
325  }
326  if (igs==kFreeSig){
327  if (igm==kFixMean && !fUseFixedMeanFreeS) continue;
328  if (igm==kFixMeanUp && !fUseFreeSigFixMeanUp) continue;
329  if (igm==kFixMeanDown && !fUseFreeSigFixMeanDown) continue;
330  }
331  if (igs==kFixSigUp){
332  if (igm==kFreeMean && !fUseFixSigUpFreeMean) continue;
333  if (igm==kFixMean && !fUseFixSigVarWithFixMean) continue;
334  if (igm==kFixMeanUp && !fUseFixSigVarWithFixMean) continue;
335  if (igm==kFixMeanDown && !fUseFixSigVarWithFixMean) continue;
336  }
337  if (igs==kFixSigDown){
338  if (igm==kFreeMean && !fUseFixSigDownFreeMean) continue;
339  if (igm==kFixMean && !fUseFixSigVarWithFixMean) continue;
340  if (igm==kFixMeanUp && !fUseFixSigVarWithFixMean) continue;
341  if (igm==kFixMeanDown && !fUseFixSigVarWithFixMean) continue;
342  }
343 
344  Int_t theCase=igm*kNGausSigCases*kNBkgFuncCases*kNSigFuncCases+igs*kNBkgFuncCases*kNSigFuncCases+types*kNBkgFuncCases+typeb;
345  Int_t globBin=itrial+theCase*totTrials;
346  for(Int_t j=0; j<16; j++) xnt[j]=0.;
347 
348  Bool_t mustDeleteFitter = kTRUE;
350  if(typeb==kExpoBkg){
351  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, AliHFInvMassFitter::kExpo, types);
352  }else if(typeb==kLinBkg){
353  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, AliHFInvMassFitter::kLin, types);
354  }else if(typeb==kPol2Bkg){
355  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, AliHFInvMassFitter::kPol2, types);
356  }else if(typeb==kPowBkg){
357  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, AliHFInvMassFitter::kPow, types);
358  }else if(typeb==kPowTimesExpoBkg){
359  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, AliHFInvMassFitter::kPowEx, types);
360  }else{
361  fitter=new AliHFInvMassFitter(hRebinned, hmin, hmax, 6, types);
362  if(typeb==kPol3Bkg) fitter->SetPolDegreeForBackgroundFit(3);
363  if(typeb==kPol4Bkg) fitter->SetPolDegreeForBackgroundFit(4);
364  if(typeb==kPol5Bkg) fitter->SetPolDegreeForBackgroundFit(5);
365  }
366  if(types==k2Gaus){
369  }else if(types==k2GausSigmaRatioPar){
372  }
373  // D0 Reflection
374  if(fhTemplRefl && fhTemplSign){
375  TH1F *hReflModif=(TH1F*)AliVertexingHFUtils::AdaptTemplateRangeAndBinning(fhTemplRefl,hRebinned,minMassForFit,maxMassForFit);
376  TH1F *hSigModif=(TH1F*)AliVertexingHFUtils::AdaptTemplateRangeAndBinning(fhTemplSign,hRebinned,minMassForFit,maxMassForFit);
377  TH1F* hrfl=fitter->SetTemplateReflections(hReflModif,"2gaus",minMassForFit,maxMassForFit);
378  if(!hrfl) printf("ERROR in SetTemplateReflections\n");
379  if(fFixRefloS>0){
380  Double_t fixSoverRefAt=fFixRefloS*(hReflModif->Integral(hReflModif->FindBin(minMassForFit*1.0001),hReflModif->FindBin(maxMassForFit*0.999))/hSigModif->Integral(hSigModif->FindBin(minMassForFit*1.0001),hSigModif->FindBin(maxMassForFit*0.999)));
381  fitter->SetFixReflOverS(fixSoverRefAt);
382  }
383  delete hReflModif;
384  delete hSigModif;
385  }
386  if(fUseSecondPeak){
388  }
389  if(fFitOption==1) fitter->SetUseChi2Fit();
392  xnt[0]=rebin;
393  xnt[1]=iFirstBin;
394  xnt[2]=minMassForFit;
395  xnt[3]=maxMassForFit;
396  xnt[4]=typeb;
397  xnt[5]=types;
398  if(igs==kFixSig){
400  xnt[6]=1;
401  }else if(igs==kFixSigUp){
403  xnt[6]=2;
404  }else if(igs==kFixSigDown){
406  xnt[6]=3;
407  }else{ // igs==kFreeSig
408  xnt[6]=0;
409  }
410  if(igm==kFixMean){
411  fitter->SetFixGaussianMean(fMassD);
412  xnt[7]=1;
413  }else if(igm==kFixMeanUp){
415  xnt[7]=2;
416  }else if(igm==kFixMeanDown){
418  xnt[7]=3;
419  }else{ // igm==kFreeMean){
420  xnt[7]=0;
421  }
422 
423  Bool_t out=kFALSE;
424  Double_t chisq=-1.;
425  Double_t sigma=0.;
426  Double_t esigma=0.;
427  Double_t pos=.0;
428  Double_t epos=.0;
429  Double_t ry=.0;
430  Double_t ery=.0;
431  Double_t significance=0.;
432  Double_t erSignif=0.;
433  Double_t bkg=0.;
434  Double_t erbkg=0.;
435  Double_t bkgBEdge=0;
436  Double_t erbkgBEdge=0;
437  if(typeb<kNBkgFuncCases){
438  printf("****** START FIT OF HISTO %s WITH REBIN %d FIRST BIN %d MASS RANGE %f-%f BACKGROUND FIT FUNCTION=%d CONFIG SIGMA/MEAN=%d %d\n",hInvMassHisto->GetName(),rebin,iFirstBin,minMassForFit,maxMassForFit,typeb,igs,igm);
439  out=fitter->MassFitter(0);
440  chisq=fitter->GetReducedChiSquare();
441  fitter->Significance(fnSigmaForBkgEval,significance,erSignif);
442  sigma=fitter->GetSigma();
443  pos=fitter->GetMean();
444  esigma=fitter->GetSigmaUncertainty();
445  if(esigma<0.00001) esigma=0.0001;
446  epos=fitter->GetMeanUncertainty();
447  if(epos<0.00001) epos=0.0001;
448  ry=fitter->GetRawYield();
449  ery=fitter->GetRawYieldError();
450  fitter->Background(fnSigmaForBkgEval,bkg,erbkg);
451  Double_t minval = hInvMassHisto->GetXaxis()->GetBinLowEdge(hInvMassHisto->FindBin(pos-fnSigmaForBkgEval*sigma));
452  Double_t maxval = hInvMassHisto->GetXaxis()->GetBinUpEdge(hInvMassHisto->FindBin(pos+fnSigmaForBkgEval*sigma));
453  fitter->Background(minval,maxval,bkgBEdge,erbkgBEdge);
454  if(out && fDrawIndividualFits && thePad){
455  thePad->Clear();
456  fitter->DrawHere(thePad, fnSigmaForBkgEval);
457  fMassFitters.push_back(fitter);
458  mustDeleteFitter = kFALSE;
459  for (auto format : fInvMassFitSaveAsFormats) {
460  thePad->SaveAs(Form("FitOutput_%s_Trial%d.%s",hInvMassHisto->GetName(),globBin, format.c_str()));
461  }
462  }
463  }
464  xnt[8]=chisq;
465  if(out && chisq>0. && sigma>0.5*fSigmaGausMC && sigma<2.0*fSigmaGausMC){
466  xnt[9]=significance;
467  xnt[10]=pos;
468  xnt[11]=epos;
469  xnt[12]=sigma;
470  xnt[13]=esigma;
471  xnt[14]=ry;
472  xnt[15]=ery;
473  fHistoRawYieldDistAll->Fill(ry);
474  fHistoRawYieldTrialAll->SetBinContent(globBin,ry);
475  fHistoRawYieldTrialAll->SetBinError(globBin,ery);
476  fHistoSigmaTrialAll->SetBinContent(globBin,sigma);
477  fHistoSigmaTrialAll->SetBinError(globBin,esigma);
478  fHistoMeanTrialAll->SetBinContent(globBin,pos);
479  fHistoMeanTrialAll->SetBinError(globBin,epos);
480  fHistoChi2TrialAll->SetBinContent(globBin,chisq);
481  fHistoChi2TrialAll->SetBinError(globBin,0.00001);
482  fHistoSignifTrialAll->SetBinContent(globBin,significance);
483  fHistoSignifTrialAll->SetBinError(globBin,erSignif);
484  if(fSaveBkgVal) {
485  fHistoBkgTrialAll->SetBinContent(globBin,bkg);
486  fHistoBkgTrialAll->SetBinError(globBin,erbkg);
487  fHistoBkgInBinEdgesTrialAll->SetBinContent(globBin,bkgBEdge);
488  fHistoBkgInBinEdgesTrialAll->SetBinError(globBin,erbkgBEdge);
489  }
490 
491  if(ry<fMinYieldGlob) fMinYieldGlob=ry;
492  if(ry>fMaxYieldGlob) fMaxYieldGlob=ry;
493  fHistoRawYieldDist[theCase]->Fill(ry);
494  fHistoRawYieldTrial[theCase]->SetBinContent(itrial,ry);
495  fHistoRawYieldTrial[theCase]->SetBinError(itrial,ery);
496  fHistoSigmaTrial[theCase]->SetBinContent(itrial,sigma);
497  fHistoSigmaTrial[theCase]->SetBinError(itrial,esigma);
498  fHistoMeanTrial[theCase]->SetBinContent(itrial,pos);
499  fHistoMeanTrial[theCase]->SetBinError(itrial,epos);
500  fHistoChi2Trial[theCase]->SetBinContent(itrial,chisq);
501  fHistoChi2Trial[theCase]->SetBinError(itrial,0.00001);
502  fHistoSignifTrial[theCase]->SetBinContent(itrial,significance);
503  fHistoSignifTrial[theCase]->SetBinError(itrial,erSignif);
504  if(fSaveBkgVal) {
505  fHistoBkgTrial[theCase]->SetBinContent(itrial,bkg);
506  fHistoBkgTrial[theCase]->SetBinError(itrial,erbkg);
507  fHistoBkgInBinEdgesTrial[theCase]->SetBinContent(itrial,bkgBEdge);
508  fHistoBkgInBinEdgesTrial[theCase]->SetBinError(itrial,erbkgBEdge);
509  }
510  fNtupleMultiTrials->Fill(xnt);
511  if(types==0){
512  // bin counting done only for 1 case of signal line shape
513  for(Int_t j=0; j<9; j++) xntBC[j]=xnt[j];
514 
515 
516  for(Int_t iStepBC=0; iStepBC<fNumOfnSigmaBinCSteps; iStepBC++){
517  Double_t minMassBC=fMassD-fnSigmaBinCSteps[iStepBC]*sigma;
518  Double_t maxMassBC=fMassD+fnSigmaBinCSteps[iStepBC]*sigma;
519  if(minMassBC>minMassForFit &&
520  maxMassBC<maxMassForFit &&
521  minMassBC>(hRebinned->GetXaxis()->GetXmin()) &&
522  maxMassBC<(hRebinned->GetXaxis()->GetXmax())){
523  Double_t cnts0,ecnts0;
524  Double_t cnts1,ecnts1;
525  cnts0=fitter->GetRawYieldBinCounting(ecnts0,fnSigmaBinCSteps[iStepBC],0,0);
526  cnts1=fitter->GetRawYieldBinCounting(ecnts1,fnSigmaBinCSteps[iStepBC],1,0);
527  xntBC[9]=fnSigmaBinCSteps[iStepBC];
528  xntBC[10]=cnts0;
529  xntBC[11]=ecnts0;
530  xntBC[12]=cnts1;
531  xntBC[13]=ecnts1;
532  ++itrialBC;
533  fHistoRawYieldDistBinC0All->Fill(cnts0);
534  fHistoRawYieldTrialBinC0All->SetBinContent(globBin,iStepBC+1,cnts0);
535  fHistoRawYieldTrialBinC0All->SetBinError(globBin,iStepBC+1,ecnts0);
536  fHistoRawYieldTrialBinC0[theCase]->SetBinContent(itrial,iStepBC+1,cnts0);
537  fHistoRawYieldTrialBinC0[theCase]->SetBinError(itrial,iStepBC+1,ecnts0);
538  fHistoRawYieldDistBinC0[theCase]->Fill(cnts0);
539  fHistoRawYieldDistBinC1All->Fill(cnts1);
540  fHistoRawYieldTrialBinC1All->SetBinContent(globBin,iStepBC+1,cnts1);
541  fHistoRawYieldTrialBinC1All->SetBinError(globBin,iStepBC+1,ecnts1);
542  fHistoRawYieldTrialBinC1[theCase]->SetBinContent(itrial,iStepBC+1,cnts1);
543  fHistoRawYieldTrialBinC1[theCase]->SetBinError(itrial,iStepBC+1,ecnts1);
544  fHistoRawYieldDistBinC1[theCase]->Fill(cnts1);
545  fNtupleBinCount->Fill(xntBC);
546  }
547  }
548  }
549  }
550  if (mustDeleteFitter) delete fitter;
551  }
552  }
553  }
554  }
555  }
556  }
557  delete hRebinned;
558  }
559  }
560  return kTRUE;
561 }
562 
563 //________________________________________________________________________
565  // save histos in a root file for further analysis
567  TFile outHistos(fileName.Data(),option.Data());
568  if (outHistos.IsZombie()) {
569  Printf("Could not open file '%s'!", fileName.Data());
570  return;
571  }
572  outHistos.cd();
573  fHistoRawYieldTrialAll->Write();
574  fHistoSigmaTrialAll->Write();
575  fHistoMeanTrialAll->Write();
576  fHistoChi2TrialAll->Write();
577  fHistoSignifTrialAll->Write();
578  if(fSaveBkgVal) {
579  fHistoBkgTrialAll->Write();
581  }
586  for(Int_t ic=0; ic<nCases; ic++){
587  fHistoRawYieldTrial[ic]->Write();
588  fHistoSigmaTrial[ic]->Write();
589  fHistoMeanTrial[ic]->Write();
590  fHistoChi2Trial[ic]->Write();
591  fHistoSignifTrial[ic]->Write();
592  if(fSaveBkgVal) {
593  fHistoBkgTrial[ic]->Write();
594  fHistoBkgInBinEdgesTrial[ic]->Write();
595  }
596  fHistoRawYieldTrialBinC0[ic]->Write();
597  fHistoRawYieldDistBinC0[ic]->Write();
598  fHistoRawYieldTrialBinC1[ic]->Write();
599  fHistoRawYieldDistBinC1[ic]->Write();
600  }
601  fNtupleMultiTrials->SetDirectory(&outHistos);
602  fNtupleMultiTrials->Write();
603  fNtupleBinCount->SetDirectory(&outHistos);
604  fNtupleBinCount->Write();
605  outHistos.Close();
606 }
607 
608 //________________________________________________________________________
609 void AliHFInvMassMultiTrialFit::DrawHistos(TCanvas* cry) const{
610  // draw histos
611  cry->Divide(2,2);
612  cry->cd(1);
613  fHistoSigmaTrialAll->Draw();
614  cry->cd(3);
615  fHistoChi2TrialAll->Draw();
616  cry->cd(2);
617  fHistoRawYieldTrialAll->Draw();
618  cry->cd(4);
619  fHistoRawYieldDistAll->Draw();
620  TLatex* tmean=new TLatex(0.15,0.8,Form("mean=%.1f",fHistoRawYieldDistAll->GetMean()));
621  tmean->SetNDC();
622  tmean->Draw();
623  TLatex* thrms=new TLatex(0.15,0.72,Form("rms=%.1f",fHistoRawYieldDistAll->GetRMS()));
624  thrms->SetNDC();
625  thrms->Draw();
626  TLatex* tmax=new TLatex(0.6,0.8,Form("max=%.1f",fMaxYieldGlob));
627  tmax->SetNDC();
628  tmax->Draw();
629  TLatex* tmin=new TLatex(0.6,0.72,Form("min=%.1f",fMinYieldGlob));
630  tmin->SetNDC();
631  tmin->Draw();
632  TLatex* trms=new TLatex(0.6,0.64,Form("(max-min)/sqrt(12)=%.1f",(fMaxYieldGlob-fMinYieldGlob)/sqrt(12)));
633  trms->SetNDC();
634  trms->Draw();
635 
636 }
637 //________________________________________________________________________
639  Int_t iCase){
640  //
641 
642  TH1F *hCutTmp=(TH1F*)histoToFit->Clone("hCutTmp");
643  for(Int_t ib=1; ib<=hCutTmp->GetNbinsX(); ib++){
644  Double_t xc=hCutTmp->GetBinCenter(ib);
645  if(xc>(fMassD-5.*fSigmaGausMC) && xc<(fMassD+5.*fSigmaGausMC)){
646  hCutTmp->SetBinContent(ib,0.);
647  hCutTmp->SetBinError(ib,0.);
648  }
649  }
650 
651  hCutTmp->Fit("pol2","E0","",hmin,hmax);
652  TF1* f2=(TF1*)hCutTmp->GetListOfFunctions()->FindObject("pol2");
653  TF1* f3=new TF1("myPol3","pol3");
654  for(Int_t i=0; i<3;i++) f3->SetParameter(i,f2->GetParameter(i));
655  hCutTmp->Fit(f3,"E0","",hmin,hmax);
656  Double_t quickCount=0.;
657  for(Int_t ib=1; ib<=histoToFit->GetNbinsX(); ib++){
658  Double_t xc=hCutTmp->GetBinCenter(ib);
659  if(xc>(fMassD-3.*fSigmaGausMC) && xc<(fMassD+3.*fSigmaGausMC)){
660  quickCount+=(histoToFit->GetBinContent(ib)-f3->Eval(xc));
661  }
662  }
663  TF1* fSB=new TF1("fSB","[0]*1./(TMath::Sqrt(2.*TMath::Pi())*[2])*TMath::Exp(-(x-[1])*(x-[1])/(2.*[2]*[2]))+[3]+[4]*x+[5]*x*x+[6]*x*x*x");
664  fSB->SetParameter(0,quickCount);
665  fSB->SetParameter(1,fMassD);
666  fSB->SetParameter(2,fSigmaGausMC);
667  for(Int_t j=0; j<4; j++) fSB->SetParameter(j+3,f3->GetParameter(j));
668  if(iCase==0) fSB->FixParameter(2,fSigmaGausMC);
669  else if(iCase==1) fSB->FixParameter(2,fSigmaGausMC*(1.+fSigmaMCVariationUp));
670  else if(iCase==2) fSB->FixParameter(2,fSigmaGausMC*(1.-fSigmaMCVariationDw));
671  else if(iCase==4){
672  fSB->FixParameter(1,fMassD);
673  fSB->FixParameter(2,fSigmaGausMC);
674  } else if(iCase==5){
675  fSB->FixParameter(1,fMassD);
676  }
677  histoToFit->Fit(fSB,"ME0","",hmin,hmax);
678  // quality cuts
679  if(fSB->GetParError(0)<0.01*fSB->GetParameter(0)) return kFALSE;
680  if(fSB->GetParError(0)>0.6*fSB->GetParameter(0)) return kFALSE;
681 
682  delete hCutTmp;
683  return kTRUE;
684 }
685 //__________________________________________________________________________________
686 void AliHFInvMassMultiTrialFit::SetTemplatesForReflections(const TH1F *hr, const TH1F *hs) {
688  if(fhTemplSign) delete fhTemplSign;
689  if(fhTemplRefl) delete fhTemplRefl;
690  fhTemplRefl=(TH1F*)hr->Clone("hTemplRefl");
691  fhTemplSign=(TH1F*)hs->Clone("hTemplSign");
692  return;
693 }
694 
Bool_t fUsePol4Bkg
switch for pol3 background
Double_t GetMeanUncertainty() const
Int_t * fRebinSteps
number of rebin steps
static TH1D * RebinHisto(TH1 *hOrig, Int_t reb, Int_t firstUse=-1)
Rebinning of invariant mass histograms.
Bool_t fDrawIndividualFits
switch for saving bkg values in nsigma
TH1F ** fHistoChi2Trial
histo with gauss mean from subsamples of trials
TH1F * fHistoBkgInBinEdgesTrialAll
histo with bkg from all trials
Bool_t fUsePowLawTimesExpoBkg
switch for power law background
double Double_t
Definition: External.C:58
void SetFixReflOverS(Double_t rovers)
Bool_t fUseFixSigFixMean
switch for FixSigFreeMean
void IncludeSecondGausPeak(Double_t mass, Bool_t fixm, Double_t width, Bool_t fixw)
Definition: External.C:236
Double_t fSigmaSecondPeak
position of the 2nd peak
TString fileName
Float_t fFixRefloS
template of signal contribution
TString format
file names tag, basically the trigger and calorimeter combination
TH1F ** fHistoRawYieldDist
histo with bin counts from all trials
TH2F ** fHistoRawYieldTrialBinC1
histo with bin counts from subsamples of trials
TH1F ** fHistoBkgInBinEdgesTrial
histo with bkg from subsamples of trials
Double_t * fnSigmaBinCSteps
number of steps on the bin counting
Int_t MassFitter(Bool_t draw=kTRUE)
Double_t fSigmaMCVariationUp
sigma of D meson peak from MC
TH1F * fHistoBkgTrialAll
histo with chi2 from all trials
Bool_t fUse2GausSignal
switch for power law background
TString fSuffix
varation of mass (down)
AliHFInvMassFitter class for the fit of invariant mass distribution of charm hadrons.
void SetFixSecondGaussianSigma(Double_t sigma)
void ConfigureLowLimFitSteps(Int_t nSteps, Double_t *values)
std::vector< AliHFInvMassFitter * > fMassFitters
maximum yield
Int_t types
static TH1 * AdaptTemplateRangeAndBinning(const TH1 *hRef, TH1 *hData, Double_t minFit, Double_t maxFit)
TH1F * fHistoChi2TrialAll
histo with gauss mean from all trials
void SetFixFrac2Gaus(Double_t frac)
Double_t GetSigma() const
void SetPolDegreeForBackgroundFit(Int_t deg)
void ConfigureUpLimFitSteps(Int_t nSteps, Double_t *values)
TH1F ** fHistoSignifTrial
histo with chi2 from subsamples of trials
Double_t fMaxYieldGlob
minimum yield
Bool_t fUseFixSigFreeMean
switch for FixedMeanFreeS
TH1F ** fHistoRawYieldDistBinC0
histo with bkg in mass bin edges from subsamples of trials
Bool_t fUsePol3Bkg
switch for pol2 background
void SetFixGaussianSigma(Double_t sigma)
Double_t fFixSecondGausSigRat
value to fix 2nd gaus area
Bool_t fUseFixSigUpFreeMean
value to fix ratio os sigmas
TH1F * fHistoMeanTrialAll
histo with gauss sigma from all trials
Double_t fMassD
relative variation of the sigma
Int_t typeb
Bool_t fFixSigmaSecondPeak
flag to fix the position of the 2nd peak
Double_t * sigma
TH1F * fHistoRawYieldDistBinC0All
histo with bkg in mass bin edges from all trials
TH1F * fHistoSignifTrialAll
histo with chi2 from all trials
Bool_t fUseSecondPeak
switch for various cases
Bool_t fFixMassSecondPeak
width of the 2nd peak
void SetFixGaussianMean(Double_t mean)
int Int_t
Definition: External.C:63
TH1F ** fHistoRawYieldTrial
histo with yield from subsamples of trials
Double_t GetMean() const
void SetTemplatesForReflections(const TH1F *hTemplRefl, const TH1F *hTemplSig)
Int_t fNumOfLowLimFitSteps
number of steps in the first bin for rebin
float Float_t
Definition: External.C:68
Bool_t fUseFixSigFixMeanUp
switch for FixSigFixMean
TH1F * fHistoRawYieldDistBinC1All
histo with bin counts from all trials
Bool_t DoFitWithPol3Bkg(TH1F *histoToFit, Double_t hmin, Double_t hmax, Int_t theCase)
TH1F * fHistoRawYieldTrialAll
histo with yield from all trials
void SetFixRatio2GausSigma(Double_t sigmafrac)
Double_t * fUpLimFitSteps
number of steps on the max. mass for fit
Double_t GetReducedChiSquare() const
Double_t fMassSecondPeak
switch off/on second peak (for D+->KKpi in Ds)
Bool_t DoMultiTrials(TH1D *hInvMassHisto, TPad *thePad=0x0)
Definition: External.C:212
Double_t fFixSecondGausFrac
value to fix 2nd gaus sigma
Int_t totTrials
TH1F ** fHistoRawYieldDistBinC1
histo with bin counts from subsamples of trials
Double_t GetRawYieldBinCounting(Double_t &errRyBC, Double_t nSigma=3., Int_t option=0, Int_t pdgCode=0) const
void ConfigureRebinSteps(Int_t nSteps, Int_t *values)
TH1F * fHistoSigmaTrialAll
histo with yield from all trials
void SaveToRoot(TString fileName, TString option="recreate") const
TH1F * fhTemplRefl
histo with bin counts from subsamples of trials
TH1F * SetTemplateReflections(const TH1 *h, TString opt, Double_t minRange, Double_t maxRange)
TH1F * fHistoRawYieldDistAll
flag for drawing fits
TH2F ** fHistoRawYieldTrialBinC0
histo with bin counts from subsamples of trials
TH1F ** fHistoSigmaTrial
histo with yield from subsamples of trials
TList * fitter
Definition: DrawAnaELoss.C:26
Bool_t fUsePowLawBkg
switch for pol5 background
Bool_t fUseFreeS
switch for FixSigDownFreeMean
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t fUpperMassToFix
mass of D meson
Int_t fFitOption
name to characterize analysis case
Bool_t fUsePol5Bkg
switch for pol4 background
Bool_t fSaveBkgVal
flag to fix the width of the 2nd peak
Bool_t fUse2GausSigmaRatioSignal
swicth for 2 gaus line shape for S
Bool_t fUseFixedMeanFreeS
switch for FreeSigma
Double_t GetSigmaUncertainty() const
void Significance(Double_t nOfSigma, Double_t &significance, Double_t &errsignificance) const
Bool_t fUseFreeSigFixMeanDown
switch for FreeSigFixMeanUp
Double_t fFixSecondGausSig
swicth for 2 gaus line shape for S
TH1F * fhTemplSign
template of reflection contribution
Bool_t fUseLinBkg
switch for exponential background
Double_t GetRawYieldError() const
Bool_t fUseFixSigDownFreeMean
switch for FixSigUpFreeMean
void Background(Double_t nOfSigma, Double_t &background, Double_t &errbackground) const
void SetInitialGaussianSigma(Double_t sigma)
void SetInitialGaussianMean(Double_t mean)
Bool_t fUseExpoBkg
LL or chi2 fit.
Int_t fNumOfRebinSteps
saves the invariant mass fit canvases in the file formats listed in this vector (if empty...
Bool_t fUsePol2Bkg
switch for linear background
Int_t rebin
Double_t * fLowLimFitSteps
number of steps on the min. mass for fit
void DrawHistos(TCanvas *cry) const
Double_t fSigmaMCVariationDw
relative variation of the sigma
TH1F ** fHistoMeanTrial
histo with gauss sigma from subsamples of trials
bool Bool_t
Definition: External.C:53
Bool_t fUseFreeSigFixMeanUp
switch for FixSigFixMeanDown
std::set< std::string > fInvMassFitSaveAsFormats
void ConfigurenSigmaBinCSteps(Int_t nSteps, Double_t *values)
TH1F ** fHistoBkgTrial
histo with chi2 from subsamples of trials
TH2F * fHistoRawYieldTrialBinC0All
histo with bin counts from all trials
Bool_t fUseFixSigFixMeanDown
switch for FixSigFixMeanUp
Bool_t fUseFixSigVarWithFixMean
switch for FreeSigFixMeanDown
void DrawHere(TVirtualPad *c, Double_t nsigma=3, Int_t writeFitInfo=2)
Double_t minMassForFit
Double_t GetRawYield() const
TH2F * fHistoRawYieldTrialBinC1All
histo with bin counts from all trials
Double_t maxMassForFit
Double_t fLowerMassToFix
varation of mass (up)