AliPhysics  vAN-20150924 (e816f45)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskCFVertexingHFCutVarFDSub.C
Go to the documentation of this file.
1 //DEFINITION OF A FEW CONSTANTS
2 const Double_t ymin = -1.2 ;
3 const Double_t ymax = 1.2 ;
4 const Double_t cosminTS = -1.05;
5 const Double_t cosmaxTS = 1.05;
6 const Double_t cosmin = 0.7;
7 const Double_t cosmax = 1.02;
8 const Double_t cTmin = 0; // micron
9 const Double_t cTmax = 300; // micron
10 const Double_t dcamin = 0; // micron
11 const Double_t dcamax = 600; // micron
12 const Double_t d0xd0min = -80000; // micron
13 const Double_t d0xd0max = 100000; // micron
14 const Double_t phimin = 0.0;
15 const Int_t mintrackrefsTPC = 2 ;
16 const Int_t mintrackrefsITS = 3 ;
17 const Int_t charge = 1 ;
18 const Int_t minclustersTPC = 50 ;
19 // cuts
20 const Double_t ptmin = 0.1;
21 const Double_t ptmax = 9999.;
22 const Double_t etamin = -0.9;
23 const Double_t etamax = 0.9;
24 const Double_t zmin = -15;
25 const Double_t zmax = 15;
26 const Int_t minITSClusters = 5;
27 
28 const Float_t centmin_0_10 = 0.;
29 const Float_t centmax_0_10 = 10.;
30 const Float_t centmin_10_60 = 10.;
31 const Float_t centmax_10_60 = 60.;
32 const Float_t centmin_60_100 = 60.;
33 const Float_t centmax_60_100 = 100.;
34 const Float_t centmax = 100.;
35 const Float_t fakemin = -0.5;
36 const Float_t fakemax = 2.5.;
37 const Float_t cosminXY = 0.95;
38 const Float_t cosmaxXY = 1.0;
39 const Float_t normDecLXYmin = 0;
40 const Float_t normDecLXYmax = 20;
41 const Float_t multmin_0_20 = 0;
42 const Float_t multmax_0_20 = 20;
43 const Float_t multmin_20_50 = 20;
44 const Float_t multmax_20_50 = 50;
45 const Float_t multmin_50_80 = 50;
46 const Float_t multmax_50_80 = 80;
47 const Float_t multmin_80_100 = 80;
48 const Float_t multmax_80_100 = 100;
49 const Float_t multmin_100_400 = 100; // Only for pPb
50 const Float_t multmax_100_400 = 400; // Only for pPb
51 
52 //
53 // useWeight : flag for Pt weights (default are pp 2010 weights, functions per MC production existing)
54 // useFlatPtWeight : flag to test flat Pt weights (computed for LHC10f7a MC)
55 // useZWeight : flag to use z-vtx weight (used for systematics for now)
56 // useNchWeight : flag to use weights on the distribution of simulated primary particles (default pp 2010)
57 // useNtrkWeight : flag to use weights on the distribution of Ntracklets
58 // isFinePtBin : flag for fine pt bin (100 MeV from 0 to 30 GeV)
59 // multiplicityEstimator : varying the multiplicity (and not centrality) estimator
60 // isPPData : flag to switch off centrality checks when runing on pp data (reduces a lot log files)
61 // isPPbData : Flag for pPb data, changes the Ntrk bining
62 // estimatorFilename, refMult : Ntrk vs z-vtx multiplicity correction file name and average value
63 // isFineNtrkBin : gives Ntrk bins of 1 unit from 0-100 (200 for pPb)
64 //----------------------------------------------------
65 
66 AliCFTaskVertexingHFCutVarFDSub *AddTaskCFVertexingHFCutVarFDSub(const char* cutFile = "./D0toKpiCuts.root",
67  TString cutObjectName="D0toKpiCutsStandard",
68  TString suffix="",
69  Int_t configuration = AliCFTaskVertexingHFCutVarFDSub::kCheetah,
70  Bool_t isKeepDfromB=kFALSE,
71  Bool_t isKeepDfromBOnly=kFALSE,
72  Int_t pdgCode = 421,
73  Char_t isSign = 2,
74  Bool_t useWeight=kFALSE,
75  Bool_t useFlatPtWeight=kFALSE,
76  Bool_t useZWeight=kFALSE,
77  Bool_t useNchWeight=kFALSE,
78  Bool_t useNtrkWeight=kFALSE,
79  Bool_t isFinePtBin=kFALSE,
80  TString estimatorFilename="",
81  Int_t multiplicityEstimator = AliCFTaskVertexingHFCutVarFDSub::kNtrk10,
82  Bool_t isPPData=kFALSE,
83  Bool_t isPPbData=kFALSE,
84  Double_t refMult = 9.26,
85  Bool_t isFineNtrkBin=kFALSE)
86 {
87  printf("Adding CF task using cuts from file %s\n",cutFile);
88  if (configuration == AliCFTaskVertexingHFCutVarFDSub::kSnail){
89  printf("The configuration is set to be SLOW --> all the variables will be used to fill the CF\n");
90  }
91  else if (configuration == AliCFTaskVertexingHFCutVarFDSub::kCheetah){
92  printf("The configuration is set to be FAST --> using only pt, y, ct, phi, zvtx, centrality, fake, multiplicity to fill the CF\n");
93  }
94  else{
95  printf("The configuration is not defined! returning\n");
96  return;
97  }
98 
99  gSystem->Sleep(2000);
100 
101  // isSign = 0 --> D0 only
102  // isSign = 1 --> D0bar only
103  // isSign = 2 --> D0 + D0bar
104 
105  TString expected;
106  if (isSign == 0 && pdgCode < 0){
107  AliError(Form("Error setting PDG code (%d) and sign (0 --> D0 only): they are not compatible, returning"));
108  return 0x0;
109  }
110  else if (isSign == 1 && pdgCode > 0){
111  AliError(Form("Error setting PDG code (%d) and sign (1 --> D0bar only): they are not compatible, returning"));
112  return 0x0;
113  }
114  else if (isSign > 2 || isSign < 0){
115  AliError(Form("Sign not valid (%d, possible values are 0, 1, 2), returning"));
116  return 0x0;
117  }
118 
119  TFile* fileCuts = TFile::Open(cutFile);
120  if(!fileCuts || (fileCuts && !fileCuts->IsOpen())){
121  AliError("Wrong cut file");
122  return 0x0;
123  }
124 
125  AliRDHFCutsD0toKpi *cutsD0toKpi = (AliRDHFCutsD0toKpi*)fileCuts->Get(cutObjectName.Data());
126 
127  // check that the fKeepD0fromB flag is set to true when the fKeepD0fromBOnly flag is true
128  // for now the binning is the same than for all D's
129  if(isKeepDfromBOnly) isKeepDfromB = true;
130 
131  Double_t ptmin_0_6;
132  Double_t ptmax_0_6;
133  Double_t ptmin_6_8;
134  Double_t ptmax_6_8;
135  Double_t ptmin_8_16;
136  Double_t ptmax_8_16;
137  Double_t ptmin_16_24;
138  Double_t ptmax_16_24;
139 
140  ptmin_0_6 = 0.0 ;
141  ptmax_0_6 = 6.0 ;
142  ptmin_6_8 = 6.0 ;
143  ptmax_6_8 = 8.0 ;
144  ptmin_8_16 = 8.0 ;
145  ptmax_8_16 = 16.0 ;
146  ptmin_16_24 = 16.0 ;
147  ptmax_16_24 = 24.0 ;
148 
149 
150  //CONTAINER DEFINITION
151  Info("AliCFTaskVertexingHFCutVarFDSub","SETUP CONTAINER");
152  const Double_t phimax = 2*TMath::Pi();
153  UInt_t nstep = 10; //number of selection steps: MC with limited acceptance, MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included), RecoPID
154 
155  //const UInt_t ipT, iy, icosThetaStar, ipTpi, ipTk, icT, idca, id0xd0, ipointing, iphi, izvtx, icent, ifake, ipointingXY, iNormDecayLXY, imult;
156  const Int_t nbiny = 24 ; //bins in y
157  const Int_t nbincosThetaStar = 42 ; //bins in cosThetaStar
158  const Int_t nbincT = 15 ; //bins in cT
159  const Int_t nbindca = 20 ; //bins in dca
160  const Int_t nbind0xd0 = 90 ; //bins in d0xd0
161  const Int_t nbinpointing = 50 ; //bins in cosPointingAngle
162  const Int_t nbinphi = 18 ; //bins in Phi
163  const Int_t nbinzvtx = 30 ; //bins in z vertex
164  const Int_t nbincent = 28; //bins in centrality
165  const Int_t nbincent_0_10 = 4; //bins in centrality between 0 and 10
166  const Int_t nbincent_10_60 = 20; //bins in centrality between 10 and 60
167  const Int_t nbincent_60_100 = 4; //bins in centrality between 60 and 100
168  const Int_t nbinfake = 3; //bins in fake
169  const Int_t nbinpointingXY = 50; //bins in cosPointingAngleXY
170  const Int_t nbinnormDecayLXY = 20; //bins in NormDecayLengthXY
171  const Int_t nbinmult = 49; //bins in multiplicity (total number)
172  const Int_t nbinmult_0_20 = 20; //bins in multiplicity between 0 and 20
173  const Int_t nbinmult_20_50 = 15; //bins in multiplicity between 20 and 50
174  const Int_t nbinmult_50_80 = 10; //bins in multiplicity between 50 and 100
175  const Int_t nbinmult_80_100 = 4; //bins in multiplicity between 50 and 100
176  const Int_t nbinmult_100_400 = 6; // Only on pPb bins in multiplicity between 100 and 400
177  if(isPPbData) nbinmult += nbinmult_100_400;
178 
179  //the sensitive variables, their indices
180 
181  const Int_t nvarTot = 16 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi, z, centrality, fake, cosPointingAngleXY, normDecayLengthXY, multiplicity
182 
183  // variables' indices
184  const UInt_t ipT = 0;
185  const UInt_t iy = 1;
186  const UInt_t icosThetaStar = 2;
187  const UInt_t ipTpi = 3;
188  const UInt_t ipTk = 4;
189  const UInt_t icT = 5;
190  const UInt_t idca = 6;
191  const UInt_t id0xd0 = 7;
192  const UInt_t ipointing = 8;
193  const UInt_t iphi = 9;
194  const UInt_t izvtx = 10;
195  const UInt_t icent = 11;
196  const UInt_t ifake = 12;
197  const UInt_t ipointingXY = 13;
198  const UInt_t inormDecayLXY = 14;
199  const UInt_t imult = 15;
200 
201  //Setting the bins: pt, ptPi, and ptK are considered seprately because for them you can either define the binning by hand, or using the cuts file
202 
203  //arrays for the number of bins in each dimension
204  Int_t iBin[nvarTot];
205 
206  //OPTION 1: defining the pt, ptPi, ptK bins by hand...
207  /*
208  const Int_t nbinpt_0_6 = 6 ; //bins in pt from 0 to 6 GeV
209  const Int_t nbinpt_6_8 = 1 ; //bins in pt from 6 to 8 GeV
210  const Int_t nbinpt_8_16 = 2 ; //bins in pt from 8 to 16 GeV
211  const Int_t nbinpt_16_24 = 1 ; //bins in pt from 16 to 24 GeV
212  const Int_t nbinpTpi_0_6 = 6 ; //bins in ptPi from 0 to 6 GeV
213  const Int_t nbinpTpi_6_8 = 1 ; //bins in ptPi from 6 to 8 GeV
214  const Int_t nbinpTpi_8_16 = 2 ; //bins in ptPi from 8 to 16 GeV
215  const Int_t nbinpTpi_16_24 = 1 ; //bins in ptPi from 16 to 24 GeV
216  const Int_t nbinpTk_0_6 = 6 ; //bins in ptK from 0 to 6 GeV
217  const Int_t nbinpTk_6_8 = 1 ; //bins in ptK from 6 to 8 GeV
218  const Int_t nbinpTk_8_16 = 2 ; //bins in ptK from 8 to 16 GeV
219  const Int_t nbinpTk_16_24 = 1 ; //bins in ptK from 16 to 24 GeV
220  iBin[ipT]=nbinpt_0_6+nbinpt_6_8+nbinpt_8_16+nbinpt_16_24;
221  iBin[ipTpi]=nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16+nbinpTpi_16_24;
222  iBin[ipTk]=nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16+nbinpTk_16_24;
223  Double_t *binLimpT=new Double_t[iBin[0]+1];
224  Double_t *binLimpTpi=new Double_t[iBin[3]+1];
225  Double_t *binLimpTk=new Double_t[iBin[4]+1];
226 
227  // values for bin lower bounds
228  // pt
229  for(Int_t i=0; i<=nbinpt_0_6; i++) binLimpT[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpt_0_6*(Double_t)i ;
230  if (binLimpT[nbinpt_0_6] != ptmin_6_8) {
231  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
232  }
233  for(Int_t i=0; i<=nbinpt_6_8; i++) binLimpT[i+nbinpt_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpt_6_8*(Double_t)i ;
234  if (binLimpT[nbinpt_0_6+nbinpt_6_8] != ptmin_8_16) {
235  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
236  }
237  for(Int_t i=0; i<=nbinpt_8_16; i++) binLimpT[i+nbinpt_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpt_8_16*(Double_t)i ;
238  if (binLimpT[nbinpt_0_6+nbinpt_6_8+nbinpt_8_16] != ptmin_16_24) {
239  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
240  }
241  for(Int_t i=0; i<=nbinpt_16_24; i++) binLimpT[i+nbinpt_0_6+nbinpt_6_8+nbinpt_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpt_16_24*(Double_t)i ;
242 
243  // ptPi
244  for(Int_t i=0; i<=nbinpTpi_0_6; i++) binLimpTpi[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpTpi_0_6*(Double_t)i ;
245  if (binLimpTpi[nbinpTpi_0_6] != ptmin_6_8) {
246  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
247  }
248  for(Int_t i=0; i<=nbinpTpi_6_8; i++) binLimpTpi[i+nbinpTpi_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpTpi_6_8*(Double_t)i ;
249  if (binLimpTpi[nbinpTpi_0_6+nbinpTpi_6_8] != ptmin_8_16) {
250  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
251  }
252  for(Int_t i=0; i<=nbinpTpi_8_16; i++) binLimpTpi[i+nbinpTpi_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpTpi_8_16*(Double_t)i ;
253  if (binLimpTpi[nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16] != ptmin_16_24) {
254  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
255  }
256  for(Int_t i=0; i<=nbinpTpi_16_24; i++) binLimpTpi[i+nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpTpi_16_24*(Double_t)i ;
257 
258  // ptKa
259  for(Int_t i=0; i<=nbinpTk_0_6; i++) binLimpTk[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpTk_0_6*(Double_t)i ;
260  if (binLimpTk[nbinpTk_0_6] != ptmin_6_8) {
261  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
262  }
263  for(Int_t i=0; i<=nbinpTk_6_8; i++) binLimpTk[i+nbinpTk_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpTk_6_8*(Double_t)i ;
264  if (binLimpTk[nbinpTk_0_6+nbinpTk_6_8] != ptmin_8_16) {
265  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
266  }
267  for(Int_t i=0; i<=nbinpTk_8_16; i++) binLimpTk[i+nbinpTk_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpTk_8_16*(Double_t)i ;
268  if (binLimpTk[nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16] != ptmin_16_24) {
269  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
270  }
271  for(Int_t i=0; i<=nbinpTk_16_24; i++) binLimpTk[i+nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpTk_16_24*(Double_t)i ;
272  */
273 
274  //OPTION 2: ...or from the cuts file
275 
276  const Int_t nbinpt = cutsD0toKpi->GetNPtBins(); // bins in pT
277  iBin[ipT]=nbinpt;
278  iBin[ipTpi]=nbinpt;
279  iBin[ipTk]=nbinpt;
280  Double_t *binLimpT=new Double_t[iBin[ipT]+1];
281  Double_t *binLimpTpi=new Double_t[iBin[ipTpi]+1];
282  Double_t *binLimpTk=new Double_t[iBin[ipTk]+1];
283  // values for bin lower bounds
284  Float_t* floatbinLimpT = cutsD0toKpi->GetPtBinLimits();
285  for (Int_t ibin0 = 0 ; ibin0<iBin[ipT]+1; ibin0++){
286  binLimpT[ibin0] = (Double_t)floatbinLimpT[ibin0];
287  binLimpTpi[ibin0] = (Double_t)floatbinLimpT[ibin0];
288  binLimpTk[ibin0] = (Double_t)floatbinLimpT[ibin0];
289  }
290  for(Int_t i=0; i<=nbinpt; i++) printf("binLimpT[%d]=%f\n",i,binLimpT[i]);
291 
292  printf("pT: nbin (from cuts file) = %d\n",nbinpt);
293 
294  Double_t *binLimpTFine=new Double_t[300+1];
295  if(isFinePtBin) {
296  iBin[ipT]=300.;
297  for (Int_t ibin0 = 0 ; ibin0<300+1; ibin0++){
298  binLimpTFine[ibin0] = 0.1*ibin0;
299  }
300  printf("pT: nbins fine = 300\n");
301  }
302 
303  // Fine Ntrk bining setting
304  Double_t *binLimmultFine;
305  Int_t nbinmultTmp=nbinmult;
306  if(isFineNtrkBin){
307  Int_t nbinLimmultFine=100;
308  if(isPPbData) nbinLimmultFine = 200;
309  const UInt_t nbinMultFine = nbinLimmultFine;
310  binLimmultFine = new Double_t[nbinMultFine+1];
311  for (Int_t ibin0 = 0 ; ibin0<nbinMultFine+1; ibin0++){
312  binLimmultFine[ibin0] = ibin0;
313  }
314  nbinmultTmp=nbinLimmultFine;
315  }
316  const Int_t nbinmultTot=nbinmultTmp;
317 
318  // defining now the binning for the other variables:
319 
320  iBin[iy]=nbiny;
321  iBin[icosThetaStar]=nbincosThetaStar;
322  iBin[icT]=nbincT;
323  iBin[idca]=nbindca;
324  iBin[id0xd0]=nbind0xd0;
325  iBin[ipointing]=nbinpointing;
326  iBin[iphi]=nbinphi;
327  iBin[izvtx]=nbinzvtx;
328  iBin[icent]=nbincent;
329  iBin[ifake]=nbinfake;
330  iBin[ipointingXY]=nbinpointingXY;
331  iBin[inormDecayLXY]=nbinnormDecayLXY;
332  iBin[imult]=nbinmultTot;
333 
334  //arrays for lower bounds :
335  Double_t *binLimy=new Double_t[iBin[iy]+1];
336  Double_t *binLimcosThetaStar=new Double_t[iBin[icosThetaStar]+1];
337  Double_t *binLimcT=new Double_t[iBin[icT]+1];
338  Double_t *binLimdca=new Double_t[iBin[idca]+1];
339  Double_t *binLimd0xd0=new Double_t[iBin[id0xd0]+1];
340  Double_t *binLimpointing=new Double_t[iBin[ipointing]+1];
341  Double_t *binLimphi=new Double_t[iBin[iphi]+1];
342  Double_t *binLimzvtx=new Double_t[iBin[izvtx]+1];
343  Double_t *binLimcent=new Double_t[iBin[icent]+1];
344  Double_t *binLimfake=new Double_t[iBin[ifake]+1];
345  Double_t *binLimpointingXY=new Double_t[iBin[ipointingXY]+1];
346  Double_t *binLimnormDecayLXY=new Double_t[iBin[inormDecayLXY]+1];
347  Double_t *binLimmult=new Double_t[iBin[imult]+1];
348 
349 
350  // y
351  for(Int_t i=0; i<=nbiny; i++) binLimy[i]=(Double_t)ymin + (ymax-ymin) /nbiny*(Double_t)i ;
352 
353  // cosThetaStar
354  for(Int_t i=0; i<=nbincosThetaStar; i++) binLimcosThetaStar[i]=(Double_t)cosminTS + (cosmaxTS-cosminTS) /nbincosThetaStar*(Double_t)i ;
355 
356  // cT
357  for(Int_t i=0; i<=nbincT; i++) binLimcT[i]=(Double_t)cTmin + (cTmax-cTmin) /nbincT*(Double_t)i ;
358 
359  // dca
360  for(Int_t i=0; i<=nbindca; i++) binLimdca[i]=(Double_t)dcamin + (dcamax-dcamin) /nbindca*(Double_t)i ;
361 
362  // d0xd0
363  for(Int_t i=0; i<=nbind0xd0; i++) binLimd0xd0[i]=(Double_t)d0xd0min + (d0xd0max-d0xd0min) /nbind0xd0*(Double_t)i ;
364 
365  // cosPointingAngle
366  for(Int_t i=0; i<=nbinpointing; i++) binLimpointing[i]=(Double_t)cosmin + (cosmax-cosmin) /nbinpointing*(Double_t)i ;
367 
368  // Phi
369  for(Int_t i=0; i<=nbinphi; i++) binLimphi[i]=(Double_t)phimin + (phimax-phimin) /nbinphi*(Double_t)i ;
370 
371  // z Primary Vertex
372  for(Int_t i=0; i<=nbinzvtx; i++) {
373  binLimzvtx[i]=(Double_t)zmin + (zmax-zmin) /nbinzvtx*(Double_t)i ;
374  }
375 
376  // centrality
377  for(Int_t i=0; i<=nbincent_0_10; i++) binLimcent[i]=(Double_t)centmin_0_10 + (centmax_0_10-centmin_0_10)/nbincent_0_10*(Double_t)i ;
378  if (binLimcent[nbincent_0_10] != centmin_10_60) {
379  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for cent - 1st range - differs from expected!\n");
380  }
381  for(Int_t i=0; i<=nbincent_10_60; i++) binLimcent[i+nbincent_0_10]=(Double_t)centmin_10_60 + (centmax_10_60-centmin_10_60)/nbincent_10_60*(Double_t)i ;
382  if (binLimcent[nbincent_0_10+nbincent_10_60] != centmin_60_100) {
383  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for cent - 2st range - differs from expected!\n");
384  }
385  for(Int_t i=0; i<=nbincent_60_100; i++) binLimcent[i+nbincent_0_10+nbincent_10_60]=(Double_t)centmin_60_100 + (centmax_60_100-centmin_60_100)/nbincent_60_100*(Double_t)i ;
386 
387  // fake
388  for(Int_t i=0; i<=nbinfake; i++) {
389  binLimfake[i]=(Double_t)fakemin + (fakemax-fakemin)/nbinfake * (Double_t)i;
390  }
391 
392  // cosPointingAngleXY
393  for(Int_t i=0; i<=nbinpointingXY; i++) binLimpointingXY[i]=(Double_t)cosminXY + (cosmaxXY-cosminXY) /nbinpointingXY*(Double_t)i ;
394 
395  // normDecayLXY
396  for(Int_t i=0; i<=nbinnormDecayLXY; i++) binLimnormDecayLXY[i]=(Double_t)normDecLXYmin + (normDecLXYmax-normDecLXYmin) /nbinnormDecayLXY*(Double_t)i ;
397 
398  // multiplicity
399  for(Int_t i=0; i<=nbinmult_0_20; i++) binLimmult[i]=(Double_t)multmin_0_20 + (multmax_0_20-multmin_0_20)/nbinmult_0_20*(Double_t)i ;
400  if (binLimmult[nbinmult_0_20] != multmin_20_50) {
401  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 1st range - differs from expected!\n");
402  }
403  for(Int_t i=0; i<=nbinmult_20_50; i++) binLimmult[i+nbinmult_0_20]=(Double_t)multmin_20_50 + (multmax_20_50-multmin_20_50)/nbinmult_20_50*(Double_t)i ;
404  if (binLimmult[nbinmult_0_20+nbinmult_20_50] != multmin_50_80) {
405  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
406  }
407  for(Int_t i=0; i<=nbinmult_50_80; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50]=(Double_t)multmin_50_80 + (multmax_50_80-multmin_50_80)/nbinmult_50_80*(Double_t)i ;
408  if (binLimmult[nbinmult_0_20+nbinmult_20_50+nbinmult_50_80] != multmin_80_100) {
409  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
410  }
411  for(Int_t i=0; i<=nbinmult_80_100; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50+nbinmult_50_80]=(Double_t)multmin_80_100 + (multmax_80_100-multmin_80_100)/nbinmult_80_100*(Double_t)i ;
412  if (binLimmult[nbinmult_0_20+nbinmult_20_50+nbinmult_50_80+nbinmult_80_100] != multmin_100_400) {
413  Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
414  }
415 
416  if(isPPbData){
417  for(Int_t i=0; i<=nbinmult_100_400; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50+nbinmult_50_80+nbinmult_80_100]=(Double_t)multmin_100_400 + (multmax_100_400-multmin_100_400)/nbinmult_100_400*(Double_t)i ;
418  }
419 
420  if(multiplicityEstimator==AliCFTaskVertexingHFCutVarFDSub::kVZERO) {
421  Int_t items = nbinmult_0_20+nbinmult_20_50+nbinmult_50_80+nbinmult_80_100;
422  if(isPPbData) items = nbinmult_0_20+nbinmult_20_50+nbinmult_50_80+nbinmult_80_100+nbinmult_100_400;
423  for(Int_t i=0; i<=items; i++) binLimmult[i]*= 68./12.;
424  }
425 
426  //one "container" for MC
427  TString nameContainer="";
428  if(!isKeepDfromB) {
429  nameContainer="CFHFccontainer0";
430  }
431  else if(isKeepDfromBOnly){
432  nameContainer="CFHFccontainer0DfromB";
433  }
434  else {
435  nameContainer="CFHFccontainer0allD";
436  }
437  nameContainer += suffix;
438  //Setting up the container grid...
439 
440  AliCFContainer* container;
441 
442  if (configuration == AliCFTaskVertexingHFCutVarFDSub::kSnail){
443  container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvarTot,iBin);
444  //setting the bin limits
445  printf("pt\n");
446  if(isFinePtBin) container -> SetBinLimits(ipT,binLimpTFine);
447  else container -> SetBinLimits(ipT,binLimpT);
448  printf("y\n");
449  container -> SetBinLimits(iy,binLimy);
450  printf("cts\n");
451  container -> SetBinLimits(icosThetaStar,binLimcosThetaStar);
452  printf("ptPi\n");
453  container -> SetBinLimits(ipTpi,binLimpTpi);
454  printf("ptK\n");
455  container -> SetBinLimits(ipTk,binLimpTk);
456  printf("cT\n");
457  container -> SetBinLimits(icT,binLimcT);
458  printf("dca\n");
459  container -> SetBinLimits(idca,binLimdca);
460  printf("d0xd0\n");
461  container -> SetBinLimits(id0xd0,binLimd0xd0);
462  printf("pointing\n");
463  container -> SetBinLimits(ipointing,binLimpointing);
464  printf("phi\n");
465  container -> SetBinLimits(iphi,binLimphi);
466  printf("z\n");
467  container -> SetBinLimits(izvtx,binLimzvtx);
468  printf("cent\n");
469  container -> SetBinLimits(icent,binLimcent);
470  printf("fake\n");
471  container -> SetBinLimits(ifake,binLimfake);
472  printf("pointingXY\n");
473  container -> SetBinLimits(ipointingXY,binLimpointingXY);
474  printf("normDecayLXY\n");
475  container -> SetBinLimits(inormDecayLXY,binLimnormDecayLXY);
476  printf("multiplicity\n");
477  if(isFineNtrkBin) container -> SetBinLimits(imult,binLimmultFine);
478  else container -> SetBinLimits(imult,binLimmult);
479 
480  container -> SetVarTitle(ipT,"pt");
481  container -> SetVarTitle(iy,"y");
482  container -> SetVarTitle(icosThetaStar, "cosThetaStar");
483  container -> SetVarTitle(ipTpi, "ptpi");
484  container -> SetVarTitle(ipTk, "ptK");
485  container -> SetVarTitle(icT, "ct");
486  container -> SetVarTitle(idca, "dca");
487  container -> SetVarTitle(id0xd0, "d0xd0");
488  container -> SetVarTitle(ipointing, "pointing");
489  container -> SetVarTitle(iphi, "phi");
490  container -> SetVarTitle(izvtx, "zvtx");
491  container -> SetVarTitle(icent, "centrality");
492  container -> SetVarTitle(ifake, "fake");
493  container -> SetVarTitle(ipointingXY, "piointingXY");
494  container -> SetVarTitle(inormDecayLXY, "normDecayLXY");
495  container -> SetVarTitle(imult, "multiplicity");
496  }
497  else if (configuration == AliCFTaskVertexingHFCutVarFDSub::kCheetah){
498  //arrays for the number of bins in each dimension
499  const Int_t nvar = 8;
500 
501  const UInt_t ipTFast = 0;
502  const UInt_t iyFast = 1;
503  const UInt_t icTFast = 2;
504  const UInt_t iphiFast = 3;
505  const UInt_t izvtxFast = 4;
506  const UInt_t icentFast = 5;
507  const UInt_t ifakeFast = 6;
508  const UInt_t imultFast = 7;
509 
510  Int_t iBinFast[nvar];
511  iBinFast[ipTFast] = iBin[ipT];
512  iBinFast[iyFast] = iBin[iy];
513  iBinFast[icTFast] = iBin[icT];
514  iBinFast[iphiFast] = iBin[iphi];
515  iBinFast[izvtxFast] = iBin[izvtx];
516  iBinFast[icentFast] = iBin[icent];
517  iBinFast[ifakeFast] = iBin[ifake];
518  iBinFast[imultFast] = iBin[imult];
519 
520  container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBinFast);
521  printf("pt\n");
522  if(isFinePtBin) container -> SetBinLimits(ipTFast,binLimpTFine);
523  else container -> SetBinLimits(ipTFast,binLimpT);
524  printf("y\n");
525  container -> SetBinLimits(iyFast,binLimy);
526  printf("ct\n");
527  container -> SetBinLimits(icTFast,binLimcT);
528  printf("phi\n");
529  container -> SetBinLimits(iphiFast,binLimphi);
530  printf("zvtx\n");
531  container -> SetBinLimits(izvtxFast,binLimzvtx);
532  printf("centrality\n");
533  container -> SetBinLimits(icentFast,binLimcent);
534  printf("fake\n");
535  container -> SetBinLimits(ifakeFast,binLimfake);
536  printf("multiplicity\n");
537  if(isFineNtrkBin) container -> SetBinLimits(imultFast,binLimmultFine);
538  else container -> SetBinLimits(imultFast,binLimmult);
539 
540  container -> SetVarTitle(ipTFast,"pt");
541  container -> SetVarTitle(iyFast,"y");
542  container -> SetVarTitle(icTFast, "ct");
543  container -> SetVarTitle(iphiFast, "phi");
544  container -> SetVarTitle(izvtxFast, "zvtx");
545  container -> SetVarTitle(icentFast, "centrality");
546  container -> SetVarTitle(ifakeFast, "fake");
547  container -> SetVarTitle(imultFast, "multiplicity");
548  }
549 
550  container -> SetStepTitle(0, "MCLimAcc");
551  container -> SetStepTitle(1, "MC");
552  container -> SetStepTitle(2, "MCAcc");
553  container -> SetStepTitle(3, "RecoVertex");
554  container -> SetStepTitle(4, "RecoRefit");
555  container -> SetStepTitle(5, "Reco");
556  container -> SetStepTitle(6, "RecoAcc");
557  container -> SetStepTitle(7, "RecoITSCluster");
558  container -> SetStepTitle(8, "RecoCuts");
559  container -> SetStepTitle(9, "RecoPID");
560 
561  //return container;
562 
563  //CREATE THE CUTS -----------------------------------------------
564 
565  // Gen-Level kinematic cuts
566  AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts");
567 
568  //Particle-Level cuts:
569  AliCFParticleGenCuts* mcGenCuts = new AliCFParticleGenCuts("mcGenCuts","MC particle generation cuts");
570  Bool_t useAbsolute = kTRUE;
571  if (isSign != 2){
572  useAbsolute = kFALSE;
573  }
574  mcGenCuts->SetRequirePdgCode(pdgCode, useAbsolute); // kTRUE set in order to include D0_bar
575  mcGenCuts->SetAODMC(1); //special flag for reading MC in AOD tree (important)
576 
577  // Acceptance cuts:
578  AliCFAcceptanceCuts* accCuts = new AliCFAcceptanceCuts("accCuts", "Acceptance cuts");
579  AliCFTrackKineCuts *kineAccCuts = new AliCFTrackKineCuts("kineAccCuts","Kine-Acceptance cuts");
580  kineAccCuts->SetPtRange(ptmin,ptmax);
581  kineAccCuts->SetEtaRange(etamin,etamax);
582 
583  // Rec-Level kinematic cuts
584  AliCFTrackKineCuts *recKineCuts = new AliCFTrackKineCuts("recKineCuts","rec-level kine cuts");
585 
586  AliCFTrackQualityCuts *recQualityCuts = new AliCFTrackQualityCuts("recQualityCuts","rec-level quality cuts");
587 
588  AliCFTrackIsPrimaryCuts *recIsPrimaryCuts = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts","rec-level isPrimary cuts");
589 
590  printf("CREATE MC KINE CUTS\n");
591  TObjArray* mcList = new TObjArray(0) ;
592  mcList->AddLast(mcKineCuts);
593  mcList->AddLast(mcGenCuts);
594 
595  printf("CREATE ACCEPTANCE CUTS\n");
596  TObjArray* accList = new TObjArray(0) ;
597  accList->AddLast(kineAccCuts);
598 
599  printf("CREATE RECONSTRUCTION CUTS\n");
600  TObjArray* recList = new TObjArray(0) ; // not used!!
601  recList->AddLast(recKineCuts);
602  recList->AddLast(recQualityCuts);
603  recList->AddLast(recIsPrimaryCuts);
604 
605  TObjArray* emptyList = new TObjArray(0);
606 
607  //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK
608  printf("CREATE INTERFACE AND CUTS\n");
609  AliCFManager* man = new AliCFManager() ;
610  man->SetParticleContainer(container);
611  man->SetParticleCutsList(0 , mcList); // MC, Limited Acceptance
612  man->SetParticleCutsList(1 , mcList); // MC
613  man->SetParticleCutsList(2 , accList); // Acceptance
614  man->SetParticleCutsList(3 , emptyList); // Vertex
615  man->SetParticleCutsList(4 , emptyList); // Refit
616  man->SetParticleCutsList(5 , emptyList); // AOD
617  man->SetParticleCutsList(6 , emptyList); // AOD in Acceptance
618  man->SetParticleCutsList(7 , emptyList); // AOD with required n. of ITS clusters
619  man->SetParticleCutsList(8 , emptyList); // AOD Reco (PPR cuts implemented in Task)
620  man->SetParticleCutsList(9 , emptyList); // AOD Reco PID
621 
622  // Get the pointer to the existing analysis manager via the static access method.
623  //==============================================================================
624  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
625  if (!mgr) {
626  ::Error("AddTaskCompareHF", "No analysis manager to connect to.");
627  return NULL;
628  }
629  //CREATE THE TASK
630  printf("CREATE TASK\n");
631 
632  // create the task
633  AliCFTaskVertexingHFCutVarFDSub *task = new AliCFTaskVertexingHFCutVarFDSub("AliCFTaskVertexingHFCutVarFDSub",cutsD0toKpi);
634  task->SetConfiguration(configuration);
635  task->SetFillFromGenerated(kFALSE);
636  task->SetCFManager(man); //here is set the CF manager
637  task->SetDecayChannel(2);
638  task->SetUseFlatPtWeight(useFlatPtWeight);
639  task->SetUseWeight(useWeight);
640  task->SetUseZWeight(useZWeight);
641  task->SetSign(isSign);
642  task->SetCentralitySelection(kFALSE);
643  task->SetFakeSelection(0);
644  task->SetRejectCandidateIfNotFromQuark(kTRUE); // put to false if you want to keep HIJING D0!!
645  task->SetUseMCVertex(kFALSE); // put to true if you want to do studies on pp
646  task->SetMultiplicityEstimator(multiplicityEstimator);
647  task->SetIsPPData(isPPData);
648 
649  if (isKeepDfromB && !isKeepDfromBOnly) task->SetDselection(2);
650  if (isKeepDfromB && isKeepDfromBOnly) task->SetDselection(1);
651 
652  TF1* funcWeight = 0x0;
653  if (task->GetUseWeight()) {
654  funcWeight = (TF1*)fileCuts->Get("funcWeight");
655  if (funcWeight == 0x0){
656  Printf("FONLL Weights will be used");
657  }
658  else {
659  task->SetWeightFunction(funcWeight);
660  Printf("User-defined Weights will be used.");
661  }
662  }
663 
664  if(useNchWeight || useNtrkWeight){
665  TH1F *hNchPrimaries;
666  TH1F *hNchMeasured;
667  if(isPPbData) hNchPrimaries = (TH1F*)fileCuts->Get("hNtrUnCorrEvWithCandWeight");
668  else hNchPrimaries = (TH1F*)fileCuts->Get("hGenPrimaryParticlesInelGt0");
669  hNchMeasured = (TH1F*)fileCuts->Get("hNchMeasured");
670  if(hNchPrimaries) {
671  task->SetUseNchWeight(kTRUE);
672  task->SetMCNchHisto(hNchPrimaries);
673  if(isPPbData) task->SetUseNchTrackletsWeight();
674  } else {
675  AliFatal("Histogram for multiplicity weights not found");
676  return 0x0;
677  }
678  if(hNchMeasured) task->SetMeasuredNchHisto(hNchMeasured);
679  if(useNtrkWeight) task->SetUseNchTrackletsWeight();
680  }
681 
682  if(isPPbData) {
683  task->SetIsPPbData(kTRUE);
684  }
685 
686  if(estimatorFilename.EqualTo("") ) {
687  printf("Estimator file not provided, multiplicity corrected histograms will not be filled\n");
688  task->SetUseZvtxCorrectedNtrkEstimator(kFALSE);
689  } else{
690 
691  TFile* fileEstimator=TFile::Open(estimatorFilename.Data());
692  if(!fileEstimator) {
693  AliFatal("File with multiplicity estimator not found");
694  return;
695  }
696 
698  task->SetReferenceMultiplcity(refMult);
699 
700  if (isPPbData) { //Use LHC13 periods for mult correction if pPb data
701  const Char_t* periodNames[2] = {"LHC13b", "LHC13c"};
702  TProfile* multEstimatorAvg[2];
703  for(Int_t ip=0; ip<2; ip++) {
704  multEstimatorAvg[ip] = (TProfile*)(fileEstimator->Get(Form("SPDmult10_%s",periodNames[ip]))->Clone(Form("SPDmult10_%s_clone",periodNames[ip])));
705  if (!multEstimatorAvg[ip]) {
706  AliFatal(Form("Multiplicity estimator for %s not found! Please check your estimator file",periodNames[ip]));
707  return;
708  }
709  }
710  task->SetMultiplVsZProfileLHC13b(multEstimatorAvg[0]);
711  task->SetMultiplVsZProfileLHC13c(multEstimatorAvg[1]);
712  }
713  else {
714  const Char_t* periodNames[4] = {"LHC10b", "LHC10c", "LHC10d", "LHC10e"}; //else, assume pp (LHC10)
715  TProfile* multEstimatorAvg[4];
716  for(Int_t ip=0; ip<4; ip++) {
717  multEstimatorAvg[ip] = (TProfile*)(fileEstimator->Get(Form("SPDmult10_%s",periodNames[ip]))->Clone(Form("SPDmult10_%s_clone",periodNames[ip])));
718  if (!multEstimatorAvg[ip]) {
719  AliFatal(Form("Multiplicity estimator for %s not found! Please check your estimator file",periodNames[ip]));
720  return;
721  }
722  }
723  task->SetMultiplVsZProfileLHC10b(multEstimatorAvg[0]);
724  task->SetMultiplVsZProfileLHC10c(multEstimatorAvg[1]);
725  task->SetMultiplVsZProfileLHC10d(multEstimatorAvg[2]);
726  task->SetMultiplVsZProfileLHC10e(multEstimatorAvg[3]);
727  }
728 
729  }
730 
731 
732  Printf("***************** CONTAINER SETTINGS *****************");
733  Printf("decay channel = %d",(Int_t)task->GetDecayChannel());
734  Printf("FillFromGenerated = %d",(Int_t)task->GetFillFromGenerated());
735  Printf("Dselection = %d",(Int_t)task->GetDselection());
736  Printf("UseWeight = %d",(Int_t)task->GetUseWeight());
737  if (task->GetUseWeight()) {
738  if(funcWeight) Printf("User-defined Weight function");
739  else Printf("FONLL will be used for the weights");
740  }
741 
742  Printf("Use Nch weight = %d",(Int_t)task->GetUseNchWeight());
743  Printf("Sign = %d",(Int_t)task->GetSign());
744  Printf("Centrality selection = %d",(Int_t)task->GetCentralitySelection());
745  Printf("Fake selection = %d",(Int_t)task->GetFakeSelection());
746  Printf("RejectCandidateIfNotFromQuark selection = %d",(Int_t)task->GetRejectCandidateIfNotFromQuark());
747  Printf("UseMCVertex selection = %d",(Int_t)task->GetUseMCVertex());
748  Printf("***************END CONTAINER SETTINGS *****************\n");
749 
750  //-----------------------------------------------------------//
751  // create correlation matrix for unfolding - only eta-pt //
752  //-----------------------------------------------------------//
753 
754  Bool_t AcceptanceUnf = kTRUE; // unfold at acceptance level, otherwise PPR
755 
756  Int_t thnDim[4];
757 
758  //first half : reconstructed
759  //second half : MC
760 
761  thnDim[0] = iBin[0];
762  thnDim[2] = iBin[0];
763  thnDim[1] = iBin[1];
764  thnDim[3] = iBin[1];
765 
766  TString nameCorr="";
767  if(!isKeepDfromB) {
768  nameCorr="CFHFcorr0";
769  }
770  else if(isKeepDfromBOnly){
771  nameCorr= "CFHFcorr0KeepDfromBOnly";
772  }
773  else {
774  nameCorr="CFHFcorr0allD";
775 
776  }
777  nameCorr += suffix;
778 
779  THnSparseD* correlation = new THnSparseD(nameCorr,"THnSparse with correlations",4,thnDim);
780  Double_t** binEdges = new Double_t[2];
781 
782  // set bin limits
783 
784  binEdges[0]= binLimpT;
785  if(isFinePtBin) binEdges[0] = binLimpTFine;
786  binEdges[1]= binLimy;
787 
788  correlation->SetBinEdges(0,binEdges[0]);
789  correlation->SetBinEdges(2,binEdges[0]);
790 
791  correlation->SetBinEdges(1,binEdges[1]);
792  correlation->SetBinEdges(3,binEdges[1]);
793 
794  correlation->Sumw2();
795 
796  // correlation matrix ready
797  //------------------------------------------------//
798 
799  task->SetCorrelationMatrix(correlation); // correlation matrix for unfolding
800 
801  // Create and connect containers for input/output
802 
803  // ------ input data ------
804  AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
805 
806  // ----- output data -----
807 
808  TString outputfile = AliAnalysisManager::GetCommonFileName();
809  TString output1name="", output2name="", output3name="",output4name="", output5name="", output6name="", output7name="", output8name="", output9name="", output10name="";
810  output2name=nameContainer;
811  output3name=nameCorr;
812  output4name= "Cuts";
813  output5name= "coutProf";
814  output6name= "SparseCutVarStudies";
815  output7name= "PtCutVarStudies";
816  output8name= "BptCutVarStudies";
817  output9name= "BdecayList";
818  output10name="QAHists";
819  if(!isKeepDfromB) {
820  outputfile += ":PWG3_D2H_CFtaskD0toKpi";
821  output1name="CFHFchist0";
822  output3name+="_cOnly";
823  output4name+="_cOnly";
824  output5name+="_cOnly";
825  output6name+="_cOnly";
826  output7name+="_cOnly";
827  output8name+="_cOnly";
828  output9name+="_cOnly";
829  output10name+="_cOnly";
830  }
831  else if(isKeepDfromBOnly){
832  outputfile += ":PWG3_D2H_CFtaskD0toKpiKeepDfromBOnly";
833  output1name="CFHFchist0DfromB";
834  output3name+="_bOnly";
835  output4name+="_bOnly";
836  output5name+="_bOnly";
837  output6name+="_bOnly";
838  output7name+="_bOnly";
839  output8name+="_bOnly";
840  output9name+="_bOnly";
841  output10name+="_bOnly";
842  }
843  else{
844  outputfile += ":PWG3_D2H_CFtaskD0toKpiKeepDfromB";
845  output1name="CFHFchist0allD";
846  output3name+="_all";
847  output4name+="_all";
848  output5name+="_all";
849  output6name+="_all";
850  output7name+="_all";
851  output8name+="_all";
852  output9name+="_all";
853  output10name+="_all";
854  }
855 
856  outputfile += suffix;
857  output1name += suffix;
858  output4name += suffix;
859  output5name += suffix;
860  output6name += suffix;
861  output7name += suffix;
862  output8name += suffix;
863  output9name += suffix;
864  output10name+= suffix;
865 
866  //now comes user's output objects :
867  // output TH1I for event counting
868  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(output1name, TH1I::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
869  // output Correction Framework Container (for acceptance & efficiency calculations)
870  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(output2name, AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
871  // Unfolding - correlation matrix
872  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(output3name, THnSparseD::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
873  // cuts
874  AliAnalysisDataContainer *coutput4 = mgr->CreateContainer(output4name, AliRDHFCuts::Class(),AliAnalysisManager::kOutputContainer, outputfile.Data());
875  // estimators list
876  AliAnalysisDataContainer *coutput5 = mgr->CreateContainer(output5name, TList::Class(),AliAnalysisManager::kOutputContainer, outputfile.Data());
877  AliAnalysisDataContainer *coutput6 = mgr->CreateContainer(output6name, THnSparseF::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
878  AliAnalysisDataContainer *coutput7 = mgr->CreateContainer(output7name, TH3F::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
879  AliAnalysisDataContainer *coutput8 = mgr->CreateContainer(output8name, TH1F::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
880  AliAnalysisDataContainer *coutput9 = mgr->CreateContainer(output9name, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
881  AliAnalysisDataContainer *coutput10 = mgr->CreateContainer(output10name, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
882 
883 
884  mgr->AddTask(task);
885 
886  mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
887  mgr->ConnectOutput(task, 1,coutput1);
888  mgr->ConnectOutput(task, 2,coutput2);
889  mgr->ConnectOutput(task, 3,coutput3);
890  mgr->ConnectOutput(task, 4,coutput4);
891  mgr->ConnectOutput(task, 5,coutput5);
892  mgr->ConnectOutput(task, 6,coutput6);
893  mgr->ConnectOutput(task, 7,coutput7);
894  mgr->ConnectOutput(task, 8,coutput8);
895  mgr->ConnectOutput(task, 9,coutput9);
896  mgr->ConnectOutput(task,10,coutput10);
897 
898  return task;
899 }
const Double_t dcamax
void SetCentralitySelection(Bool_t centSelec=kTRUE)
const Float_t multmax_50_80
void SetFillFromGenerated(Bool_t flag)
get corr manager
const Double_t cTmax
const Float_t multmin_0_20
const Float_t fakemax
const Int_t minclustersTPC
const Float_t multmin_100_400
TSystem * gSystem
const Double_t phimin
const Double_t cosmaxTS
const Double_t ptmin
const Float_t multmax_0_20
const Float_t centmin_10_60
void SetUseNchTrackletsWeight(Bool_t useWeight=kTRUE)
const Float_t centmin_0_10
const Int_t mintrackrefsTPC
const Float_t normDecLXYmax
const Float_t multmin_80_100
const Float_t multmax_80_100
const Float_t cosmaxXY
const Float_t normDecLXYmin
const Float_t fakemin
const Double_t ymax
const Float_t centmax
void SetCorrelationMatrix(THnSparse *h)
UNFOLDING.
const Double_t etamin
const Double_t cTmin
const Int_t mintrackrefsITS
const Float_t multmin_20_50
const Float_t centmax_60_100
const Double_t zmin
const Float_t cosminXY
const Double_t etamax
const Double_t cosmin
const Int_t charge
const Double_t cosmax
const Float_t multmin_50_80
const Double_t dcamin
const Float_t multmax_100_400
AliCFTaskVertexingHFCutVarFDSub * AddTaskCFVertexingHFCutVarFDSub(const char *cutFile="./D0toKpiCuts.root", TString cutObjectName="D0toKpiCutsStandard", TString suffix="", Int_t configuration=AliCFTaskVertexingHFCutVarFDSub::kCheetah, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode=421, Char_t isSign=2, Bool_t useWeight=kFALSE, Bool_t useFlatPtWeight=kFALSE, Bool_t useZWeight=kFALSE, Bool_t useNchWeight=kFALSE, Bool_t useNtrkWeight=kFALSE, Bool_t isFinePtBin=kFALSE, TString estimatorFilename="", Int_t multiplicityEstimator=AliCFTaskVertexingHFCutVarFDSub::kNtrk10, Bool_t isPPData=kFALSE, Bool_t isPPbData=kFALSE, Double_t refMult=9.26, Bool_t isFineNtrkBin=kFALSE)
Float_t * GetPtBinLimits() const
Definition: AliRDHFCuts.h:232
const Double_t cosminTS
const Float_t centmax_0_10
void SetDselection(UShort_t originDselection)
const Float_t multmax_20_50
Int_t GetNPtBins() const
Definition: AliRDHFCuts.h:233
const Int_t minITSClusters
const Double_t ymin
const Float_t centmin_60_100
const Double_t ptmax
const Double_t d0xd0max
const Double_t d0xd0min
const Float_t centmax_10_60
const Double_t zmax