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