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