AliPhysics  608b256 (608b256)
AverageDmesonRaa.C
Go to the documentation of this file.
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include "TFile.h"
3 #include "TH1.h"
4 #include "TH1D.h"
5 #include "TH2.h"
6 #include "TH2D.h"
7 #include "TH3.h"
8 #include "TH3D.h"
9 #include "TNtuple.h"
10 #include "TGraphAsymmErrors.h"
11 #include "TMath.h"
12 #include "TCanvas.h"
13 #include "TLegend.h"
14 #include "TROOT.h"
15 #include "TStyle.h"
16 #include "TLine.h"
17 #include "TLatex.h"
18 
19 #include "AliHFSystErr.h"
20 #include <Riostream.h>
21 #endif
22 
23 //------------------------------------------------------------------------------------------
24 //
25 // MACRO TO COMPUTE THE AVERAGE D0, D+ and D*+ meson RAA
26 //
27 // Different options considered as weights (relative stat, relative stat+uncorr-syst,
28 // relative stat+global-syst, absolute stat) as option of the macro
29 //
30 // Output: merged RAA root file, plus a tex file with the results
31 //
32 // Usage:
33 // 1. First set the average pt bining (variables nbins and ptbinlimits on top of the macro)
34 // 2. Load the libraries and compile the macro
35 // 3. Macro parameters:
36 // a: D0 RAA file, b: D0 pp reference file
37 // d: D+ RAA file, d: D+ pp reference file
38 // e: D*+ RAA file, f: D*+ pp reference file
39 // g: output filename
40 // h: average option (weights)
41 // i: centrality range, j: centrality estimator
42 // k: flag in case the pp reference has the split separated uncertainties
43 // l,m,n: flag in case D0/D+/D*+ pp reference has some extrapolated bin
44 //
45 //
46 // Author: Z. Conesa del Valle
47 //
48 //------------------------------------------------------------------------------------------
49 
50 
52 // Compilation instructions
53 //
54 // gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_PHYSICS -I$ALICE_PHYSICS/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER/STEER -I$ALICE_ROOT/STEER/STEERBase -I$ALICE_ROOT/STEER/ESD -I$ALICE_ROOT/STEER/AOD -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_PHYSICS/OADB -I$ALICE_PHYSICS/PWGHF -I$ALICE_PHYSICS/PWGHF/base -I$ALICE_PHYSICS/PWGHF/vertexingHF -I$ALICE_PHYSICS/PWG/FLOW/Base -I$ALICE_PHYSICS/PWG/FLOW/Tasks -I$ALICE_PHYSICS/PWG -g");
55 // .x $ALICE_PHYSICS/PWGHF/vertexingHF/macros/LoadLibraries.C
56 // .L $ALICE_PHYSICS/PWGHF/vertexingHF/macros/AverageDmesonRaa.C+
57 //
59 
60 //const Int_t nbins=10;
61 //Double_t ptbinlimits[nbins+1]={1.,2.,3.,4.,5.,6.,7.,8.,12.,16.,24.};
62 //Double_t ptbinlimits[nbins+1]={1.,2.,3.,4.,5.,6.,8.,12.,16.,24.,36.};
63 const Int_t nbins=7;
64 Double_t ptbinlimits[nbins+1]={1.,2.,4.,6.,8.,12.,16.,24.};
67 
68 //const Int_t ptmaxPPRefData[3] = { 16., 24., 24. };
69 
71 
74 
75 //____________________________________________________________
77 {
78  Int_t istart =0;
79  Int_t npoints = gr->GetN();
80  for(Int_t i=0; i<=npoints; i++){
81  Double_t x=0.,y=0.;
82  gr->GetPoint(i,x,y);
83  if ( TMath::Abs ( x - pt ) < 0.4 ) {
84  istart = i;
85  break;
86  }
87  }
88  return istart;
89 }
90 //____________________________________________________________
92 {
93  Int_t istart =-1;
94  Int_t npoints = gr->GetN();
95  Double_t x=0.,y=0.;
96  for(Int_t i=0; i<=npoints; i++){
97  gr->GetPoint(i,x,y);
98  if ( TMath::Abs ( x - pt ) < 0.4 ) {
99  istart = i;
100  break;
101  }
102  }
103 
104  uncLow=0.; uncHigh=0.;
105 
106  if(istart>-1){
107  uncLow = gr->GetErrorYlow(istart)/y;
108  uncHigh = gr->GetErrorYhigh(istart)/y;
109  // cout<<" pt="<<pt<<" -"<<uncLow<<" +"<<uncHigh<<endl;
110  }
111 }
112 
113 //____________________________________________________________
114 Double_t GetWeight(Int_t averageoption, Double_t pt,
115  TH1D* hRaa, Double_t raaSystLow, Double_t raaSystHigh,
116  Double_t ppSystRawYield,
117  Double_t ppSystRawYieldCutVar, Double_t ppSystRawYieldCutVarPid,
118  Double_t ABSystRawYield,
119  Double_t ABSystRawYieldCutVar, Double_t ABSystRawYieldCutVarPid)
120 {
121  Double_t weight=1.0;
122  Int_t hbin = hRaa->FindBin(pt);
123 
124  Double_t stat = hRaa->GetBinError(hbin);
125  Double_t relativeStat = stat / hRaa->GetBinContent(hbin);
126  Double_t weightStat=0.;
127  Double_t relativeSyst = 0.;
128  if(averageoption==kRelativeStatUnc) {
129  weightStat = relativeStat;
130  }
131  else if(averageoption==kAbsoluteStatUnc) {
132  weightStat = stat;
133  }
134  else if(averageoption==kRelativeStatUncorrWoPidSyst) {
135  weightStat = relativeStat;
136  relativeSyst = TMath::Sqrt( ppSystRawYieldCutVar*ppSystRawYieldCutVar + ABSystRawYieldCutVar*ABSystRawYieldCutVar );
137  }
138  else if(averageoption==kRelativeStatUncorrWPidSyst) {
139  weightStat = relativeStat;
140  relativeSyst = TMath::Sqrt( ppSystRawYieldCutVarPid*ppSystRawYieldCutVarPid + ABSystRawYieldCutVar*ABSystRawYieldCutVarPid );
141  }
142  else if(averageoption==kRelativeStatRawYieldSyst){
143  weightStat = relativeStat;
144  relativeSyst = TMath::Sqrt( ppSystRawYield*ppSystRawYield + ABSystRawYield*ABSystRawYield );
145  }
146  else if(averageoption==kRelativeStatGlobalSyst) {
147  weightStat = relativeStat;
148  relativeSyst = raaSystHigh>raaSystLow ? raaSystHigh : raaSystLow;
149  }
150 
151  // weight = TMath::Sqrt( relativeStat*relativeStat + relativeSyst*relativeSyst );
152  weight = TMath::Sqrt( weightStat*weightStat + relativeSyst*relativeSyst );
153  // cout<< endl<<" rel stat "<< relativeStat<<" rel syst "<< relativeSyst<<" weight="<<(1.0/(weight*weight))<<endl;
154 
155  return (1.0/(weight*weight));
156 }
157 
158 
159 //____________________________________________________________
160 void AverageDmesonRaa( const char* fD0Raa="", const char* fD0ppRef="",
161  const char* fDplusRaa="", const char* fDplusppRef="",
162  const char* fDstarRaa="", const char* fDstarppRef="",
163  const char* outfile="", Int_t averageOption=kRelativeStatUnc, Int_t cc=kpPb0100, Int_t ccestimator=kV0M,
164  Bool_t isReadAllPPUnc=false, Bool_t isPPRefExtrapD0=false, Bool_t isPPRefExtrapDplus=false, Bool_t isPPRefExtrapDstar=false)
165 {
166 
167  FILE *resultFile;
168  TString foutname = "Average";
169  if(fD0Raa) foutname += "Dzero";
170  if(fDplusRaa) foutname += "Dplus";
171  if(fDstarRaa) foutname += "Dstar";
172  if(averageOption==kRelativeStatUnc) foutname+= "_RelStatUncWeight";
173  else if(averageOption==kAbsoluteStatUnc) foutname+= "_AbsStatUncWeight";
174  else if(averageOption==kRelativeStatUncorrWoPidSyst) foutname+= "_RelStatUncorrWeight";
175  else if(averageOption==kRelativeStatRawYieldSyst) foutname+= "_RelStatRawYieldSystWeight";
176  if(!useExtrapPPref) foutname+= "_NoExtrapBins";
177  TDatime d;
178  TString ndate = Form("%02d%02d%04d",d.GetDay(),d.GetMonth(),d.GetYear());
179  resultFile = fopen( Form("%s_result_%s.txt",foutname.Data(),ndate.Data()),"w");
180  fprintf(resultFile,"Ptmin (GeV/c) Ptmax (GeV/c) Raa(Daverage) +-(stat) +(syst) - (syst) \n\n");
181 
182 
183  // Define here all needed histograms/graphs to be retrieved
184  TH1D *hDmesonRaa[3];
185  TH1I *hCombinedReferenceFlag[3];
186  TGraphAsymmErrors *gDataSystematicsPP[3], *gDataSystematicsAB[3];
187  TGraphAsymmErrors *gScalingUncPP[3];
188  TGraphAsymmErrors *gRABFeedDownSystematicsElossHypothesis[3];
189  TGraphAsymmErrors *gRAB_GlobalSystematics[3];
190  TH1D *hDmesonPPRef[3], *hDmesonPPYieldExtrUnc[3], *hDmesonPPCutVarUnc[3], *hDmesonPPIDPUnc[3], *hDmesonPPMCPtUnc[3];
191 
192  // Define here all output histograms/graphs
193  TH1D *hDmesonAverageRAB = new TH1D("hDmesonAverageRAB","D meson average Raa ; p_{T} (GeV/c)",nbins,ptbinlimits);
194  TGraphAsymmErrors *gRABNorm;
195  TGraphAsymmErrors *gRAB_DmesonAverage_GlobalSystematics = new TGraphAsymmErrors(0);
196  TGraphAsymmErrors *gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis = new TGraphAsymmErrors(0);
197  TGraphAsymmErrors *gRAB_DmesonAverage_ScalingSystematicsPP = new TGraphAsymmErrors(0);
198  TGraphAsymmErrors *gRAB_DmesonAverage_DataSystematicsPP = new TGraphAsymmErrors(0);
199  TGraphAsymmErrors *gRAB_DmesonAverage_DataSystematicsAB = new TGraphAsymmErrors(0);
200  TGraphAsymmErrors *gRAB_DmesonAverage_TrackingSystematicsPP = new TGraphAsymmErrors(0);
201  TGraphAsymmErrors *gRAB_DmesonAverage_TrackingSystematicsAB = new TGraphAsymmErrors(0);
202  gRAB_DmesonAverage_GlobalSystematics->SetNameTitle("gRAB_DmesonAverage_GlobalSystematics","DmesonAverage GlobalSystematics");
203  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->SetNameTitle("gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis","DmesonAverage FeedDownSystematicsElossHypothesis");
204  gRAB_DmesonAverage_ScalingSystematicsPP->SetNameTitle("gRAB_DmesonAverage_ScalingSystematicsPP","DmesonAverage Scaling uncertainty PP");
205  gRAB_DmesonAverage_DataSystematicsPP->SetNameTitle("gRAB_DmesonAverage_DataSystematicsPP","DmesonRaaAverage DataSystematicsPP - tracking uncertainty PP");
206  gRAB_DmesonAverage_DataSystematicsAB->SetNameTitle("gRAB_DmesonAverage_DataSystematicsAB","DmesonRaaAverage DataSystematicsAB - tracking uncertainty AB");
207  gRAB_DmesonAverage_TrackingSystematicsPP->SetNameTitle("gRAB_DmesonAverage_TrackingSystematicsPP","DmesonRaaAverage tracking uncertainty PP");
208  gRAB_DmesonAverage_TrackingSystematicsAB->SetNameTitle("gRAB_DmesonAverage_TrackingSystematicsAB","DmesonRaaAverage tracking uncertainty AB");
209 
210 
211  const char *filenamesRaa[3] = { fD0Raa, fDplusRaa, fDstarRaa };
212  const char *filenamesReference[3] = { fD0ppRef, fDplusppRef, fDstarppRef };
213  const char *filenamesSuffixes[3] = { "Dzero", "Dplus", "Dstar" };
214  Bool_t isDmeson[3] = { true, true, true };
215 
216  if(strcmp(filenamesRaa[0],"")==0) { cout<<" Dzero not set, error"<<endl; return; }
217 
218  //
219  // Get Raa file histos and graphs
220  //
221  AliHFSystErr *ppSyst[3];
222  AliHFSystErr *ABSyst[3];
223  Double_t ppTracking[3][nbins], ppSystRawYield[3][nbins], ppSystCutVar[3][nbins], ppSystPid[3][nbins];
224  Double_t ABTracking[3][nbins], ABSystRawYield[3][nbins], ABSystCutVar[3][nbins], ABSystPid[3][nbins];
225  for(Int_t j=0; j<3; j++) {
226  if(strcmp(filenamesRaa[j],"")==0) { isDmeson[j]=false; continue; }
227  cout<<" Reading file "<<filenamesRaa[j]<<"..."<<endl;
228  TFile *fDRaa = TFile::Open(filenamesRaa[j],"read");
229  if(!fDRaa){ cout<<" Error on file !!!!!"<<filenamesRaa[j]<<endl; return; }
230  hDmesonRaa[j] = (TH1D*)fDRaa->Get("hRABvsPt");
231  hDmesonRaa[j]->SetName(Form("%s_%s",hDmesonRaa[j]->GetName(),filenamesSuffixes[j]));
232 
233  // cout<< hDmesonRaa[j]<< " bins="<< hDmesonRaa[j]->GetNbinsX()<<", value bin 1 ="<<hDmesonRaa[j]->GetBinContent(1)<<endl;
234 
235  if(j==0) gRABNorm = (TGraphAsymmErrors*)fDRaa->Get("gRAB_Norm");
236  //
237  gDataSystematicsPP[j] = (TGraphAsymmErrors*)fDRaa->Get("gRAB_DataSystematicsPP");
238  gDataSystematicsPP[j]->SetName(Form("%s_%s",gDataSystematicsPP[j]->GetName(),filenamesSuffixes[j]));
239  gDataSystematicsAB[j] = (TGraphAsymmErrors*)fDRaa->Get("gRAB_DataSystematicsAB");
240  gDataSystematicsAB[j]->SetName(Form("%s_%s",gDataSystematicsAB[j]->GetName(),filenamesSuffixes[j]));
241  gRABFeedDownSystematicsElossHypothesis[j] = (TGraphAsymmErrors*)fDRaa->Get("gRAB_FeedDownSystematicsElossHypothesis");
242  gRABFeedDownSystematicsElossHypothesis[j]->SetName(Form("%s_%s",gRABFeedDownSystematicsElossHypothesis[j]->GetName(),filenamesSuffixes[j]));
243  gRAB_GlobalSystematics[j] = (TGraphAsymmErrors*)fDRaa->Get("gRAB_GlobalSystematics");
244  gRAB_GlobalSystematics[j]->SetName(Form("%s_%s",gRAB_GlobalSystematics[j]->GetName(),filenamesSuffixes[j]));
245  Bool_t shouldDelete=kFALSE;
246  if(fDRaa->Get("AliHFSystErrPP")){
247  ppSyst[j]=(AliHFSystErr*)fDRaa->Get("AliHFSystErrPP");
248  printf("AliHFSystErr object for meson %d in pp (%s) read from HFPtSpectrumRaa output file\n",j,ppSyst[j]->GetTitle());
249  }else{
250  printf("Create instance of AliHFSystErr for meson %d in pp \n",j);
251  ppSyst[j] = new AliHFSystErr(Form("ppSyst_%d",j),Form("ppSyst_%d",j));
252  ppSyst[j]->SetIsPass4Analysis(kTRUE);
253  ppSyst[j]->Init(j+1);
254  shouldDelete=kTRUE;
255  }
256  for(Int_t ipt=0; ipt<nbins; ipt++) {
257  Double_t ptval = ptbinlimits[ipt] + (ptbinlimits[ipt+1]-ptbinlimits[ipt])/2.;
258  ppTracking[j][ipt]=0.; ppSystRawYield[j][ipt]=0; ppSystCutVar[j][ipt]=0; ppSystPid[j][ipt]=0.;
259  ppTracking[j][ipt] =ppSyst[j]->GetTrackingEffErr(ptval);
260  ppSystRawYield[j][ipt]=ppSyst[j]->GetRawYieldErr(ptval);
261  ppSystCutVar[j][ipt] =ppSyst[j]->GetCutsEffErr(ptval);
262  ppSystPid[j][ipt] =ppSyst[j]->GetPIDEffErr(ptval);
263  }
264  if(shouldDelete) delete ppSyst[j];
265  shouldDelete=kFALSE;
266  if(fDRaa->Get("AliHFSystErrAA")){
267  ABSyst[j]=(AliHFSystErr*)fDRaa->Get("AliHFSystErrAA");
268  printf("AliHFSystErr object for meson %d in AA (%s) read from HFPtSpectrumRaa output file\n",j,ppSyst[j]->GetTitle());
269  }else{
270  printf("Create instance of AliHFSystErr for meson %d in AA \n",j);
271  ABSyst[j] = new AliHFSystErr(Form("ABSyst_%d",j),Form("ABSyst_%d",j));
272  ABSyst[j]->SetCollisionType(1); // PbPb by default
273  if ( cc == k010 ) ABSyst[j]->SetCentrality("010");
274  else if ( cc == k1020 ) ABSyst[j]->SetCentrality("1020");
275  else if ( cc == k2040 || cc == k2030 || cc == k3040 ) {
276  ABSyst[j]->SetCentrality("2040");
277  ABSyst[j]->SetIsPbPb2010EnergyScan(true);
278  }
279  else if ( cc == k3050 ) ABSyst[j]->SetCentrality("3050");
280  else if ( cc == k4060 || cc == k4050 || cc == k5060 ) ABSyst[j]->SetCentrality("4060");
281  else if ( cc == k6080 || cc == k5080 ) ABSyst[j]->SetCentrality("6080");
282  else if ( cc == k4080 ) ABSyst[j]->SetCentrality("4080");
283  // Going to pPb systematics
284  else if ( cc == kpPb0100 || cc == kpPb020 || cc == kpPb2040 || cc == kpPb4060 || cc == kpPb60100 ) {
285  ABSyst[j]->SetCollisionType(2);
286  ABSyst[j]->SetRunNumber(16);
287  if(ccestimator==kV0A) {
288  if(cc == kpPb020) ABSyst[j]->SetCentrality("020V0A");
289  else if(cc == kpPb2040) ABSyst[j]->SetCentrality("2040V0A");
290  else if(cc == kpPb4060) ABSyst[j]->SetCentrality("4060V0A");
291  else if(cc == kpPb60100) ABSyst[j]->SetCentrality("60100V0A");
292  } else if (ccestimator==kZNA) {
293  if(cc == kpPb020) ABSyst[j]->SetCentrality("020ZNA");
294  else if(cc == kpPb2040) ABSyst[j]->SetCentrality("2040ZNA");
295  else if(cc == kpPb4060) ABSyst[j]->SetCentrality("4060ZNA");
296  else if(cc == kpPb60100) ABSyst[j]->SetCentrality("60100ZNA");
297  } else if (ccestimator==kCL1) {
298  if(cc == kpPb020) ABSyst[j]->SetCentrality("020CL1");
299  else if(cc == kpPb2040) ABSyst[j]->SetCentrality("2040CL1");
300  else if(cc == kpPb4060) ABSyst[j]->SetCentrality("4060CL1");
301  else if(cc == kpPb60100) ABSyst[j]->SetCentrality("60100CL1");
302  } else {
303  if(!(cc == kpPb0100)) {
304  cout <<" Error on the pPb options"<<endl;
305  return;
306  }
307  }
308  }
309  ABSyst[j]->Init(j+1);
310  shouldDelete=kTRUE;
311  }
312  for(Int_t ipt=0; ipt<nbins; ipt++) {
313  Double_t ptval = ptbinlimits[ipt] + (ptbinlimits[ipt+1]-ptbinlimits[ipt])/2.;
314  ABTracking[j][ipt]=0.; ABSystRawYield[j][ipt]=0; ABSystCutVar[j][ipt]=0; ABSystPid[j][ipt]=0.;
315  ABTracking[j][ipt] =ABSyst[j]->GetTrackingEffErr(ptval);
316  ABSystRawYield[j][ipt]=ABSyst[j]->GetRawYieldErr(ptval);
317  ABSystCutVar[j][ipt] =ABSyst[j]->GetCutsEffErr(ptval);
318  ABSystPid[j][ipt] =ABSyst[j]->GetPIDEffErr(ptval);
319  }
320  if(shouldDelete) delete ABSyst[j];
321  }
322 
323  //
324  // Get pp-reference file histos and graphs
325  //
326  const char *pprefhgnames[6] = { "fhScaledData","gScaledDataSystExtrap",
327  "fhScaledSystRebinYieldExtraction","fhScaledSystRebinCutVariation","fhScaledSystRebinPIDUnc","fhScaledSystRebinMCPt"};
328  Bool_t isPPRefExtrap[3] = { isPPRefExtrapD0, isPPRefExtrapDplus, isPPRefExtrapDstar };
329  for(Int_t j=0; j<3; j++) {
330  if(strcmp(filenamesReference[j],"")==0) { isDmeson[j]=false; continue; }
331  cout<<" Reading file "<<filenamesReference[j]<<"..."<<endl;
332  TFile *fRef = TFile::Open(filenamesReference[j],"read");
333  gScalingUncPP[j] = (TGraphAsymmErrors*)fRef->Get(pprefhgnames[1]);
334  gScalingUncPP[j]->SetName(Form("%s_%s",gScalingUncPP[j]->GetName(),filenamesSuffixes[j]));
335  if(isPPRefExtrap[j]) {
336  hCombinedReferenceFlag[j] = (TH1I*)fRef->Get("hCombinedReferenceFlag");
337  hCombinedReferenceFlag[j]->SetName(Form("%s_%s",hCombinedReferenceFlag[j]->GetName(),filenamesSuffixes[j]));
338  }
339  if(isReadAllPPUnc){
340  const char*hname="fhScaledData";
341  if(isPPRefExtrap[j]) hname="hReference";
342  hDmesonPPRef[j] = (TH1D*)fRef->Get(hname);
343  hDmesonPPRef[j]->SetName(Form("%s_%s",hDmesonPPRef[j]->GetName(),filenamesSuffixes[j]));
344  hDmesonPPYieldExtrUnc[j] = (TH1D*)fRef->Get(pprefhgnames[2]);
345  hDmesonPPYieldExtrUnc[j]->SetName(Form("%s_%s",hDmesonPPYieldExtrUnc[j]->GetName(),filenamesSuffixes[j]));
346  hDmesonPPCutVarUnc[j] = (TH1D*)fRef->Get(pprefhgnames[3]);
347  hDmesonPPCutVarUnc[j]->SetName(Form("%s_%s",hDmesonPPCutVarUnc[j]->GetName(),filenamesSuffixes[j]));
348  hDmesonPPIDPUnc[j] = (TH1D*)fRef->Get(pprefhgnames[4]);
349  hDmesonPPIDPUnc[j]->SetName(Form("%s_%s",hDmesonPPIDPUnc[j]->GetName(),filenamesSuffixes[j]));
350  hDmesonPPMCPtUnc[j] = (TH1D*)fRef->Get(pprefhgnames[5]);
351  hDmesonPPMCPtUnc[j]->SetName(Form("%s_%s",hDmesonPPMCPtUnc[j]->GetName(),filenamesSuffixes[j]));
352  }
353  }
354 
355 
356  //
357  // Loop per pt bin
358  //
359  for(Int_t ipt=0; ipt<nbins; ipt++) {
360 
361  cout<<" Calculation for pt bin ("<<ptbinlimits[ipt]<<","<<ptbinlimits[ipt+1]<<")"<<endl;
362 
363  Double_t ptval = ptbinlimits[ipt] + (ptbinlimits[ipt+1]-ptbinlimits[ipt])/2.;
364  Double_t RaaDmeson[3]={0.,0.,0.};
365  Double_t RaaDmesonStat[3]={0.,0.,0.};
366  Double_t RaaDmesonSystLow[3]={0.,0.,0.};
367  Double_t RaaDmesonSystHigh[3]={0.,0.,0.};
368  Double_t weight[3]={0.,0.,0.};
369  Double_t ppSystLow[3]={0.,0.,0.};
370  Double_t ppSystHigh[3]={0.,0.,0.};
371  Double_t ppSystUncorrLow[3]={0.,0.,0.};
372  Double_t ppSystUncorrHigh[3]={0.,0.,0.};
373  // Double_t ppTracking[3]={0.,0.,0.};
374  Double_t ScalingLow[3]={0.,0.,0.};
375  Double_t ScalingHigh[3]={0.,0.,0.};
376  Double_t ppSystRawYieldOnly[3]={0.,0.,0.};
377  Double_t ppSystRawYieldCutVar[3]={0.,0.,0.};
378  Double_t ppSystRawYieldCutVarPid[3]={0.,0.,0.};
379  Double_t ABSystLow[3]={0.,0.,0.};
380  Double_t ABSystHigh[3]={0.,0.,0.};
381  Double_t ABSystUncorrLow[3]={0.,0.,0.};
382  Double_t ABSystUncorrHigh[3]={0.,0.,0.};
383  Double_t ABSystRawYieldOnly[3]={0.,0.,0.};
384  Double_t ABSystRawYieldCutVar[3]={0.,0.,0.};
385  Double_t ABSystRawYieldCutVarPid[3]={0.,0.,0.};
386  // Double_t ABTracking[3]={0.,0.,0.};
387  Double_t RabFdElossLow[3]={0.,0.,0.};
388  Double_t RabFdElossHigh[3]={0.,0.,0.};
389  Double_t RabGlobalLow[3]={0.,0.,0.};
390  Double_t RabGlobalHigh[3]={0.,0.,0.};
391 
392  Double_t average=0., averageStat=0.;
393  Double_t weightTot=0.;
394  Double_t ppTrackingAv=0., ABTrackingAv=0.;
395  Double_t ppDataSystAvLow=0., ppDataSystAvHigh=0.;
396  Double_t ABDataSystAvLow=0., ABDataSystAvHigh=0.;
397  Double_t scalingLowAv=0., scalingHighAv=0.;
398  Double_t raaSystUncorrLow=0., raaSystUncorrHigh=0.;
399  Double_t raabeautyLow=0., raabeautyHigh=0.;
400 
401  Int_t histoBin=-1;
402 
403  // Get tracking uncertainties and raw yield and cut-variation and pid-systematics
404  if(isDebug) cout<<" Retrieving tracking + rawyield systematics"<<endl;
405  for(Int_t j=0; j<3; j++) {
406  if(!isDmeson[j]) continue;
407  ppSystRawYieldOnly[j] = ppSystRawYield[j][ipt];
408  ppSystRawYieldCutVar[j] = TMath::Sqrt( ppSystRawYield[j][ipt]*ppSystRawYield[j][ipt]
409  + ppSystCutVar[j][ipt]*ppSystCutVar[j][ipt] );
410  ppSystRawYieldCutVarPid[j] = TMath::Sqrt( ppSystRawYield[j][ipt]*ppSystRawYield[j][ipt]
411  + ppSystCutVar[j][ipt]*ppSystCutVar[j][ipt]
412  + ppSystPid[j][ipt]*ppSystPid[j][ipt] );
413  ABSystRawYieldOnly[j] = ABSystRawYield[j][ipt];
414  ABSystRawYieldCutVar[j] = TMath::Sqrt( ABSystRawYield[j][ipt]*ABSystRawYield[j][ipt]
415  + ABSystCutVar[j][ipt]*ABSystCutVar[j][ipt] );
416  ABSystRawYieldCutVarPid[j] = TMath::Sqrt( ABSystRawYield[j][ipt]*ABSystRawYield[j][ipt]
417  + ABSystCutVar[j][ipt]*ABSystCutVar[j][ipt]
418  + ABSystPid[j][ipt]*ABSystPid[j][ipt] );
419  if(isDebug) cout<<" j="<<j<<" pt="<< ptval<<" ppref unc RY+CV="<<ppSystRawYieldCutVar[j]<<" RY+CV+PID="<<ppSystRawYieldCutVarPid[j]<<endl;
420  if(isDebug) cout<<" j="<<j<<" pt="<< ptval<<" AB unc RY+CV="<<ABSystRawYieldCutVar[j]<<" RY+CV+PID="<<ABSystRawYieldCutVarPid[j]<<endl;
421  }
422 
423  if(isReadAllPPUnc){
424  if(isDebug) cout<<" Retrieving all pp reference systematics from the rebinned file"<<endl;
425  for(Int_t j=0; j<3; j++) {
426  if(!isDmeson[j]) continue;
427  Int_t ibin = hDmesonPPRef[j]->FindBin(ptval);
428  Double_t ppval = hDmesonPPRef[j]->GetBinContent(ibin);
429  Double_t rawyield = hDmesonPPYieldExtrUnc[j]->GetBinContent( hDmesonPPYieldExtrUnc[j]->FindBin(ptval) )/ppval;
430  Double_t cutvar = hDmesonPPCutVarUnc[j]->GetBinContent( hDmesonPPCutVarUnc[j]->FindBin(ptval) )/ppval;
431  Double_t pid = hDmesonPPIDPUnc[j]->GetBinContent( hDmesonPPIDPUnc[j]->FindBin(ptval) )/ppval;
432  ppSystRawYieldCutVar[j] = TMath::Sqrt( rawyield*rawyield + cutvar*cutvar );
433  ppSystRawYieldCutVarPid[j] = TMath::Sqrt( rawyield*rawyield + cutvar*cutvar + pid*pid );
434  if(isDebug) cout<<"redo j="<<j<<" pt="<< ptval<<" ppref unc RY+CV="<<ppSystRawYieldCutVar[j]<<" RY+CV+PID="<<ppSystRawYieldCutVarPid[j]<<endl;
435  }
436  }
437  // Check for the pp reference systematics for extrapolated pt bins
438  for(Int_t j=0; j<3; j++) {
439  if(isPPRefExtrap[j]){
440  // if(ptval>ptmaxPPRefData[j]) {
441  Int_t ippbin = hCombinedReferenceFlag[j]->FindBin(ptval);
442  Bool_t flag = hCombinedReferenceFlag[j]->GetBinContent(ippbin);
443  if(!flag) continue;
444  // cout<<" pp ref flag="<<flag<<" >>> ";
445  // Get pp reference relative systematics
446  Double_t ppSystTotLow=0., ppSystTotHigh=0.;
447  FindGraphRelativeUnc(gDataSystematicsPP[j],ptval,ppSystTotLow,ppSystTotHigh);
448  ppSystRawYieldCutVar[j] = ppSystTotLow > ppSystTotHigh ? ppSystTotLow : ppSystTotHigh ;
449  ppSystRawYieldCutVarPid[j] = ppSystRawYieldCutVar[j];
450  ppSystRawYieldOnly[j] = ppSystRawYieldCutVar[j];
451  }
452  }
453  //
454  // Loop per meson to get the Raa values and uncertainties for the given pt bin
455  //
456  if(isDebug) cout<<" Retrieving all Raa values and uncertainties"<<endl;
457  for(Int_t j=0; j<3; j++) {
458  // Get value, stat unc and weight
459  if(!isDmeson[j]) continue;
460  if(!hDmesonRaa[j]) continue;
461  histoBin = hDmesonRaa[j]->FindBin(ptval);
462  RaaDmeson[j] = hDmesonRaa[j]->GetBinContent( histoBin );
463  if (RaaDmeson[j]<=0) continue;
464  RaaDmesonStat[j] = hDmesonRaa[j]->GetBinError( histoBin );
465  // Get global systematics
466  FindGraphRelativeUnc(gRAB_GlobalSystematics[j],ptval,RaaDmesonSystLow[j],RaaDmesonSystHigh[j]);
467  // Evaluate the weight
468  weight[j] = GetWeight(averageOption,ptval,hDmesonRaa[j],
469  RaaDmesonSystLow[j],RaaDmesonSystHigh[j],
470  ppSystRawYieldOnly[j],ppSystRawYieldCutVar[j],ppSystRawYieldCutVarPid[j],
471  ABSystRawYieldOnly[j],ABSystRawYieldCutVar[j],ABSystRawYieldCutVarPid[j]);
472  cout<<" raa "<<filenamesSuffixes[j]<<" meson = "<<RaaDmeson[j]<<" +-"<<RaaDmesonStat[j]<<"(stat) -> (weight="<<weight[j]<<") ,";
473  // Get pp reference relative systematics
474  FindGraphRelativeUnc(gDataSystematicsPP[j],ptval,ppSystLow[j],ppSystHigh[j]);
475  // Get pp-extrapolation relative uncertainty
476  FindGraphRelativeUnc(gScalingUncPP[j],ptval,ScalingHigh[j],ScalingLow[j]); // exchanging low-high bc has oposite influence on Raa
477  if(isPPRefExtrap[j]){
478  Int_t ippbin = hCombinedReferenceFlag[j]->FindBin(ptval);
479  Bool_t flag = hCombinedReferenceFlag[j]->GetBinContent(ippbin);
480  if(isDebug) cout<< " bin="<<j<<" pp ref flag on? "<<flag;
481  if(flag){ ScalingHigh[j]=0.; ScalingLow[j]=0.; ppTracking[j][ipt]=0.; }
482  if(flag && !useExtrapPPref){
483  weight[j] =0;
484  cout<<"weight set to 0";
485  }
486  }
487  // Get pp reference systematics minus tracking systematics minus extrapolation uncertainties
488  ppSystUncorrLow[j] = TMath::Sqrt( ppSystLow[j]*ppSystLow[j]
489  - ScalingLow[j]*ScalingLow[j]
490  - ppTracking[j][ipt]*ppTracking[j][ipt] );
491  ppSystUncorrHigh[j] = TMath::Sqrt( ppSystHigh[j]*ppSystHigh[j]
492  - ScalingHigh[j]*ScalingHigh[j]
493  - ppTracking[j][ipt]*ppTracking[j][ipt] );
494  // Get AB relative systematics
495  FindGraphRelativeUnc(gDataSystematicsAB[j],ptval,ABSystLow[j],ABSystHigh[j]);
496  // Get AB relative systematics minus tracking systematics
497  ABSystUncorrLow[j] = TMath::Sqrt( ABSystLow[j]*ABSystLow[j]
498  - ABTracking[j][ipt]*ABTracking[j][ipt] );
499  ABSystUncorrHigh[j] = TMath::Sqrt( ABSystHigh[j]*ABSystHigh[j]
500  - ABTracking[j][ipt]*ABTracking[j][ipt] );
501  // Get Feed-Down and Eloss relative uncertainties on the Raa
502  FindGraphRelativeUnc(gRABFeedDownSystematicsElossHypothesis[j],ptval,RabFdElossLow[j],RabFdElossHigh[j]);
503  //
504  // Check with global Raa uncertainties
505  FindGraphRelativeUnc(gRAB_GlobalSystematics[j],ptval,RabGlobalLow[j],RabGlobalHigh[j]);
506  Double_t testLow = TMath::Sqrt( RabFdElossLow[j]*RabFdElossLow[j] + ABSystLow[j]*ABSystLow[j]
507  + ppSystLow[j]*ppSystLow[j] + ScalingLow[j]*ScalingLow[j] );
508  Double_t testHigh = TMath::Sqrt( RabFdElossHigh[j]*RabFdElossHigh[j] + ABSystHigh[j]*ABSystHigh[j]
509  + ppSystHigh[j]*ppSystHigh[j] + ScalingHigh[j]*ScalingHigh[j] );
510  if (TMath::Abs( testLow - RabGlobalLow[j] ) > 0.015) {
511  cout << endl<<" >>>> Error on the global Raa uncertainties low : test-sum = "<< testLow<<", global = "<< RabGlobalLow[j]<<" ppref="<<ppSystLow[j]<<endl;
512  }
513  if (TMath::Abs( testHigh - RabGlobalHigh[j] ) > 0.015) {
514  cout << endl<<" >>>> Error on the global Raa uncertainties high : test-sum = "<< testHigh<<", global = "<< RabGlobalHigh[j]<<" ppref="<<ppSystHigh[j]<<endl<<endl;
515  }
516  //
517  histoBin = -1;
518  cout<<endl;
519  }
520  cout<<endl;
521 
522  //
523  // Evaluate Dmeson average
524  //
525  if(isDebug) cout<<" Evaluating the average"<<endl;
526  for(Int_t j=0; j<3; j++){
527  if(!isDmeson[j]) continue;
528  if( !(RaaDmeson[j]>0.) ) continue;
529  weightTot += weight[j];
530  // weighted average
531  average += RaaDmeson[j]*weight[j];
532  // stat absolute uncertainty (uncorrelated) : sum in quadrature
533  averageStat += (RaaDmesonStat[j]*weight[j])*(RaaDmesonStat[j]*weight[j]);
534  // pp tracking relative uncertainty (correlated) : linear sum
535  ppTrackingAv += ppTracking[j][ipt]*RaaDmeson[j]*weight[j];
536  // AB tracking relative uncertainty (correlated) : linear sum
537  ABTrackingAv += ABTracking[j][ipt]*RaaDmeson[j]*weight[j];
538  // pp scaling relative uncertainty (correlated) : linear sum
539  scalingLowAv += ScalingLow[j]*RaaDmeson[j]*weight[j];
540  scalingHighAv += ScalingHigh[j]*RaaDmeson[j]*weight[j];
541  // Get pp and AB relative uncorrelated systematics : sum in quadrature
542  raaSystUncorrLow += (ppSystUncorrLow[j]*RaaDmeson[j]*weight[j])*(ppSystUncorrLow[j]*RaaDmeson[j]*weight[j])
543  + (ABSystUncorrLow[j]*RaaDmeson[j]*weight[j])*(ABSystUncorrLow[j]*RaaDmeson[j]*weight[j]);
544  raaSystUncorrHigh += (ppSystUncorrHigh[j]*RaaDmeson[j]*weight[j])*(ppSystUncorrHigh[j]*RaaDmeson[j]*weight[j])
545  + (ABSystUncorrHigh[j]*RaaDmeson[j]*weight[j])*(ABSystUncorrHigh[j]*RaaDmeson[j]*weight[j]);
546  ppDataSystAvLow += (ppSystUncorrLow[j]*RaaDmeson[j]*weight[j])*(ppSystUncorrLow[j]*RaaDmeson[j]*weight[j]);
547  ABDataSystAvLow += (ABSystUncorrLow[j]*RaaDmeson[j]*weight[j])*(ABSystUncorrLow[j]*RaaDmeson[j]*weight[j]);
548  ppDataSystAvHigh += (ppSystUncorrHigh[j]*RaaDmeson[j]*weight[j])*(ppSystUncorrHigh[j]*RaaDmeson[j]*weight[j]);
549  ABDataSystAvHigh += (ABSystUncorrHigh[j]*RaaDmeson[j]*weight[j])*(ABSystUncorrHigh[j]*RaaDmeson[j]*weight[j]);
550  // Beauty uncertainties: evaluate Raa average for the upper / lower bands
551  raabeautyLow += (1-RabFdElossLow[j])*RaaDmeson[j]*weight[j];
552  raabeautyHigh += (1+RabFdElossHigh[j])*RaaDmeson[j]*weight[j];
553  }
554  average /= weightTot;
555  averageStat = TMath::Sqrt(averageStat)/weightTot;
556  ppTrackingAv /= weightTot;
557  ABTrackingAv /= weightTot;
558  scalingLowAv /= weightTot;
559  scalingHighAv /= weightTot;
560  raaSystUncorrLow = TMath::Sqrt(raaSystUncorrLow)/weightTot;
561  raaSystUncorrHigh = TMath::Sqrt(raaSystUncorrHigh)/weightTot;
562  ppDataSystAvLow = TMath::Sqrt(ppDataSystAvLow)/weightTot;
563  ppDataSystAvHigh = TMath::Sqrt(ppDataSystAvHigh)/weightTot;
564  ABDataSystAvLow = TMath::Sqrt(ABDataSystAvLow)/weightTot;
565  ABDataSystAvHigh = TMath::Sqrt(ABDataSystAvHigh)/weightTot;
566 
567  // finalization beauty uncertainties
568  raabeautyLow /= weightTot;
569  raabeautyHigh /= weightTot;
570  Double_t RaaBeauty[3] = { average, raabeautyLow, raabeautyHigh };
571  Double_t beautyUncLow = average-TMath::MinElement(3,RaaBeauty);
572  Double_t beautyUncHigh = TMath::MaxElement(3,RaaBeauty)-average;
573 
574  // finalization global uncertainties
575  Double_t totalUncLow = TMath::Sqrt( raaSystUncorrLow*raaSystUncorrLow
576  + ppTrackingAv*ppTrackingAv + ABTrackingAv*ABTrackingAv
577  + scalingLowAv*scalingLowAv
578  + beautyUncLow*beautyUncLow );
579  Double_t totalUncHigh = TMath::Sqrt( raaSystUncorrHigh*raaSystUncorrHigh
580  + ppTrackingAv*ppTrackingAv + ABTrackingAv*ABTrackingAv
581  + scalingHighAv*scalingHighAv
582  + beautyUncHigh*beautyUncHigh );
583  if(isDebug) cout<<" Raa="<<average<<" +-"<<averageStat<<"(stat) +"<<ppDataSystAvHigh<<" -"<<ppDataSystAvLow<<" (pp-data) +-"<<ppTrackingAv<<" (pp-track) +"<<ABDataSystAvHigh<<" -"<<ABDataSystAvLow<<" (ab-data) +-"<<ABTrackingAv<<" (ab-track) +"<<scalingHighAv<<" -"<<scalingLowAv<<" (scal) +"<<beautyUncHigh<<" -"<<beautyUncLow<<" (fd)"<<endl;
584  //
585  // Fill output histos/graphs
586  //
587  histoBin = hDmesonAverageRAB->FindBin(ptval);
588  hDmesonAverageRAB->SetBinContent(histoBin,average);
589  hDmesonAverageRAB->SetBinError(histoBin,averageStat);
590  Double_t ept = hDmesonAverageRAB->GetBinWidth(histoBin)/2.;
591  ept=0.3;
592  gRAB_DmesonAverage_GlobalSystematics->SetPoint(ipt,ptval,average);
593  gRAB_DmesonAverage_GlobalSystematics->SetPointError(ipt,ept,ept,totalUncLow,totalUncHigh);
594  ept=0.2;
595  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->SetPoint(ipt,ptval,average);
596  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->SetPointError(ipt,ept,ept,beautyUncLow,beautyUncHigh);
597  //
598  ept=0.1;
599  gRAB_DmesonAverage_TrackingSystematicsPP->SetPoint(ipt,ptval,average);
600  gRAB_DmesonAverage_TrackingSystematicsPP->SetPointError(ipt,ept,ept,ppTrackingAv,ppTrackingAv);
601  gRAB_DmesonAverage_TrackingSystematicsAB->SetPoint(ipt,ptval,average);
602  gRAB_DmesonAverage_TrackingSystematicsAB->SetPointError(ipt,ept,ept,ABTrackingAv,ABTrackingAv);
603  gRAB_DmesonAverage_ScalingSystematicsPP->SetPoint(ipt,ptval,average);
604  gRAB_DmesonAverage_ScalingSystematicsPP->SetPointError(ipt,ept,ept,scalingLowAv,scalingHighAv);
605  gRAB_DmesonAverage_DataSystematicsPP->SetPoint(ipt,ptval,average);
606  gRAB_DmesonAverage_DataSystematicsPP->SetPointError(ipt,ept,ept,ppDataSystAvLow,ppDataSystAvHigh);
607  gRAB_DmesonAverage_DataSystematicsAB->SetPoint(ipt,ptval,average);
608  gRAB_DmesonAverage_DataSystematicsAB->SetPointError(ipt,ept,ept,ABDataSystAvLow,ABDataSystAvHigh);
609  histoBin = -1;
610  //
611  // Printout
612  cout<< " pt min (GeV/c), pt max (GeV/c), Raa(Daverage), +- (stat), + (syst) , - (syst) "<<endl;
613  cout<< ptbinlimits[ipt] <<" "<< ptbinlimits[ipt+1]<< " "<< average<< " "<< averageStat<< " "<< totalUncHigh<<" "<<totalUncLow<<endl;
614  fprintf(resultFile,"%02.0f %02.0f %5.3f %5.3f %5.3f %5.3f\n",ptbinlimits[ipt],ptbinlimits[ipt+1],average,averageStat,totalUncHigh,totalUncLow);
615  } // end loop on pt bins
616 
617  fclose(resultFile);
618 
619  //
620  // Now can start drawing
621  //
622  TH2F* hempty=new TH2F("hempty"," ; p_{T} (GeV/c} ; Nucl. modif. fact.",100,0.,ptbinlimits[nbins],100,0.,2.);
623  hempty->SetStats(0);
624 
625  TCanvas *cAvCheck = new TCanvas("cAvCheck","Average Dmeson check");
626  hempty->Draw();
627  hDmesonAverageRAB->SetLineColor(kBlack);
628  hDmesonAverageRAB->SetMarkerStyle(20);
629  hDmesonAverageRAB->SetMarkerColor(kBlack);
630  hDmesonAverageRAB->Draw("esame");
631  for(Int_t j=0; j<3; j++) {
632  if(!isDmeson[j]) continue;
633  hDmesonRaa[j]->SetLineColor(kBlack);
634  hDmesonRaa[j]->SetMarkerColor(2+j);
635  hDmesonRaa[j]->SetMarkerStyle(21+j);
636  gRAB_GlobalSystematics[j]->SetFillStyle(0);
637  gRAB_GlobalSystematics[j]->SetLineColor(2+j);
638  gRAB_GlobalSystematics[j]->Draw("2");
639  hDmesonRaa[j]->Draw("esame");
640  }
641  gRAB_DmesonAverage_GlobalSystematics->SetFillStyle(0);
642  gRAB_DmesonAverage_GlobalSystematics->SetLineColor(kBlack);
643  gRAB_DmesonAverage_GlobalSystematics->Draw("2");
644  hDmesonAverageRAB->Draw("esame");
645  cAvCheck->Update();
646  cAvCheck->SaveAs(Form("%s_result_%s.gif",foutname.Data(),ndate.Data()));
647 
648  TCanvas *cAv = new TCanvas("cAv","Average Dmeson");
649  hDmesonAverageRAB->Draw("e");
650  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->SetFillStyle(1001);
651  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->SetFillColor(kMagenta-7);
652  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->Draw("2");
653  gRAB_DmesonAverage_GlobalSystematics->Draw("2");
654  hDmesonAverageRAB->Draw("esame");
655  cAv->Update();
656 
657  //
658  // Now can start saving the output
659  //
660  TFile *fout = new TFile(Form("HFPtSpectrumRaa_%s_%s.root",foutname.Data(),ndate.Data()),"recreate");
661  hDmesonAverageRAB->Write();
662  gRABNorm->Write();
663  gRAB_DmesonAverage_GlobalSystematics->Write();
664  gRAB_DmesonAverage_FeedDownSystematicsElossHypothesis->Write();
665  gRAB_DmesonAverage_TrackingSystematicsPP->Write();
666  gRAB_DmesonAverage_TrackingSystematicsAB->Write();
667  gRAB_DmesonAverage_ScalingSystematicsPP->Write();
668  gRAB_DmesonAverage_DataSystematicsPP->Write();
669  gRAB_DmesonAverage_DataSystematicsAB->Write();
670  fout->Write();
671 
672 }
const Color_t cc[]
Definition: DrawKs.C:1
double Double_t
Definition: External.C:58
Definition: External.C:236
Double_t ptbinlimits[nbins+1]
void FindGraphRelativeUnc(TGraphAsymmErrors *gr, Double_t pt, Double_t &uncLow, Double_t &uncHigh)
centrality
void SetCentrality(TString centrality)
Definition: AliHFSystErr.h:75
void SetIsPbPb2010EnergyScan(Bool_t flag)
Definition: AliHFSystErr.h:104
Double_t GetCutsEffErr(Double_t pt) const
Int_t FindGraphBin(TGraphAsymmErrors *gr, Double_t pt)
Bool_t isDebug
int Int_t
Definition: External.C:63
Definition: External.C:204
centestimator
Double_t GetTrackingEffErr(Double_t pt) const
Definition: External.C:212
void AverageDmesonRaa(const char *fD0Raa="", const char *fD0ppRef="", const char *fDplusRaa="", const char *fDplusppRef="", const char *fDstarRaa="", const char *fDstarppRef="", const char *outfile="", Int_t averageOption=kRelativeStatUnc, Int_t cc=kpPb0100, Int_t ccestimator=kV0M, Bool_t isReadAllPPUnc=false, Bool_t isPPRefExtrapD0=false, Bool_t isPPRefExtrapDplus=false, Bool_t isPPRefExtrapDstar=false)
void SetIsPass4Analysis(Bool_t flag)
Definition: AliHFSystErr.h:87
Double_t GetWeight(Int_t averageoption, Double_t pt, TH1D *hRaa, Double_t raaSystLow, Double_t raaSystHigh, Double_t ppSystRawYield, Double_t ppSystRawYieldCutVar, Double_t ppSystRawYieldCutVarPid, Double_t ABSystRawYield, Double_t ABSystRawYieldCutVar, Double_t ABSystRawYieldCutVarPid)
void Init(Int_t decay)
Function to initialize the variables/histograms.
Bool_t useExtrapPPref
Double_t GetRawYieldErr(Double_t pt) const
void SetCollisionType(Int_t type)
Definition: AliHFSystErr.h:66
AverageOption
const Int_t nbins
bool Bool_t
Definition: External.C:53
TFile * fout
input train file
void SetRunNumber(Int_t number)
Definition: AliHFSystErr.h:59
Double_t GetPIDEffErr(Double_t pt) const