]>
Commit | Line | Data |
---|---|---|
f5ec6c30 | 1 | //DEFINITION OF A FEW CONSTANTS |
2 | const Double_t ymin = -2.1 ; | |
3 | const Double_t ymax = 2.1 ; | |
f6d06004 | 4 | // const Double_t ptmin_0_4 = 0.0 ; |
5 | // const Double_t ptmax_0_4 = 4.0 ; | |
6 | // const Double_t ptmin_4_8 = 4.0 ; | |
7 | // const Double_t ptmax_4_8 = 8.0 ; | |
8 | // const Double_t ptmin_8_10 = 8.0 ; | |
9 | // const Double_t ptmax_8_10 = 10.0 ; | |
f5ec6c30 | 10 | const Double_t cosmin = -1.05; |
11 | const Double_t cosmax = 1.05; | |
12 | const Double_t cTmin = 0; // micron | |
13 | const Double_t cTmax = 500; // micron | |
14 | const Double_t dcamin = 0; // micron | |
15 | const Double_t dcamax = 500; // micron | |
16 | const Double_t d0min = -1000; // micron | |
17 | const Double_t d0max = 1000; // micron | |
18 | const Double_t d0xd0min = -100000; // micron | |
19 | const Double_t d0xd0max = 100000; // micron | |
2c9d065f | 20 | const Double_t phimin = 0.0; |
21 | //const Double_t phimax = 2Pi; // defined in the macro!!!!!!!!!!!!!! | |
f5ec6c30 | 22 | const Int_t mintrackrefsTPC = 2 ; |
23 | const Int_t mintrackrefsITS = 3 ; | |
24 | const Int_t charge = 1 ; | |
25 | const Int_t PDG = 421; | |
26 | const Int_t minclustersTPC = 50 ; | |
27 | // cuts | |
28 | const Double_t ptmin = 0.1; | |
29 | const Double_t ptmax = 9999.; | |
30 | const Double_t etamin = -0.9; | |
31 | const Double_t etamax = 0.9; | |
a8b9a95a | 32 | const Double_t zmin = -15; |
33 | const Double_t zmax = 15; | |
f5ec6c30 | 34 | const Int_t minITSClusters = 5; |
35 | ||
36 | //---------------------------------------------------- | |
37 | ||
f6d06004 | 38 | AliCFHeavyFlavourTaskMultiVarMultiStep *AddTaskCFMultiVarMultiStep(Bool_t isKeepD0fromB=kFALSE) |
f5ec6c30 | 39 | { |
40 | ||
f6d06004 | 41 | Double_t ptmin_0_4; |
42 | Double_t ptmax_0_4; | |
43 | Double_t ptmin_4_8; | |
44 | Double_t ptmax_4_8; | |
45 | Double_t ptmin_8_10; | |
46 | Double_t ptmax_8_10; | |
47 | ||
48 | if(!isKeepD0fromB){ | |
49 | ptmin_0_4 = 0.0 ; | |
50 | ptmax_0_4 = 4.0 ; | |
51 | ptmin_4_8 = 4.0 ; | |
52 | ptmax_4_8 = 8.0 ; | |
53 | ptmin_8_10 = 8.0 ; | |
54 | ptmax_8_10 = 10.0 ; | |
55 | } else{ | |
56 | ptmin_0_4 = 0.0 ; | |
57 | ptmax_0_4 = 3.0 ; | |
58 | ptmin_4_8 = 3.0 ; | |
59 | ptmax_4_8 = 5.0 ; | |
60 | ptmin_8_10 = 5.0 ; | |
61 | ptmax_8_10 = 10.0 ; | |
62 | } | |
63 | ||
64 | ||
65 | ||
f5ec6c30 | 66 | //CONTAINER DEFINITION |
67 | Info("AliCFHeavyFlavourTaskMultiVarMultiStep","SETUP CONTAINER"); | |
a8b9a95a | 68 | //the sensitive variables, their indices |
f5ec6c30 | 69 | UInt_t ipt = 0; |
70 | UInt_t iy = 1; | |
71 | UInt_t icosThetaStar = 2; | |
72 | UInt_t ipTpi = 3; | |
73 | UInt_t ipTk = 4; | |
74 | UInt_t icT = 5; | |
75 | UInt_t idca = 6; | |
76 | UInt_t id0pi = 7; | |
77 | UInt_t id0K = 8; | |
78 | UInt_t id0xd0 = 9; | |
79 | UInt_t ipointing = 10; | |
2c9d065f | 80 | UInt_t iphi = 11; |
a8b9a95a | 81 | UInt_t iz = 12; |
f5ec6c30 | 82 | |
de8a50ac | 83 | const Double_t phimax = 2*TMath::Pi(); |
2c451591 | 84 | |
f5ec6c30 | 85 | //Setting up the container grid... |
ae3e319c | 86 | UInt_t nstep = 8; //number of selection steps: MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included) |
a8b9a95a | 87 | const Int_t nvar = 13 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi |
f6d06004 | 88 | // const Int_t nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV |
89 | // const Int_t nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV | |
90 | // const Int_t nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV | |
91 | ||
92 | Int_t nbin0_0_4; | |
93 | Int_t nbin0_4_8; | |
94 | Int_t nbin0_8_10; | |
95 | if (!isKeepD0fromB){ | |
96 | nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV | |
97 | nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV | |
98 | nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV | |
99 | }else{ | |
100 | nbin0_0_4 = 3 ; //bins in pt from 0 to 3 GeV | |
101 | nbin0_4_8 = 1 ; //bins in pt from 3 to 5 GeV | |
102 | nbin0_8_10 = 1 ; //bins in pt from 5 to 10 GeV | |
103 | } | |
104 | ||
f5ec6c30 | 105 | const Int_t nbin1 = 42 ; //bins in y |
106 | const Int_t nbin2 = 42 ; //bins in cosThetaStar | |
107 | const Int_t nbin3_0_4 = 8 ; //bins in ptPi from 0 to 4 GeV | |
108 | const Int_t nbin3_4_8 = 4 ; //bins in ptPi from 4 to 8 GeV | |
109 | const Int_t nbin3_8_10 = 1 ; //bins in ptPi from 8 to 10 GeV | |
110 | const Int_t nbin4_0_4 = 8 ; //bins in ptKa from 0 to 4 GeV | |
111 | const Int_t nbin4_4_8 = 4 ; //bins in ptKa from 4 to 8 GeV | |
112 | const Int_t nbin4_8_10 = 1 ; //bins in ptKa from 8 to 10 GeV | |
113 | const Int_t nbin5 = 24 ; //bins in cT | |
114 | const Int_t nbin6 = 24 ; //bins in dca | |
115 | const Int_t nbin7 = 100 ; //bins in d0pi | |
116 | const Int_t nbin8 = 100 ; //bins in d0K | |
117 | const Int_t nbin9 = 80 ; //bins in d0xd0 | |
118 | const Int_t nbin10 = 1050 ; //bins in cosPointingAngle | |
4bad9b4e | 119 | const Int_t nbin11 = 20 ; //bins in Phi |
a8b9a95a | 120 | const Int_t nbin12 = 60 ; //bins in z vertex |
2c9d065f | 121 | |
f5ec6c30 | 122 | //arrays for the number of bins in each dimension |
123 | Int_t iBin[nvar]; | |
124 | iBin[0]=nbin0_0_4+nbin0_4_8+nbin0_8_10; | |
125 | iBin[1]=nbin1; | |
126 | iBin[2]=nbin2; | |
127 | iBin[3]=nbin3_0_4+nbin3_4_8+nbin3_8_10; | |
128 | iBin[4]=nbin4_0_4+nbin4_4_8+nbin4_8_10; | |
129 | iBin[5]=nbin5; | |
130 | iBin[6]=nbin6; | |
131 | iBin[7]=nbin7; | |
132 | iBin[8]=nbin8; | |
133 | iBin[9]=nbin9; | |
134 | iBin[10]=nbin10; | |
2c9d065f | 135 | iBin[11]=nbin11; |
a8b9a95a | 136 | iBin[12]=nbin12; |
f5ec6c30 | 137 | |
138 | //arrays for lower bounds : | |
139 | Double_t *binLim0=new Double_t[iBin[0]+1]; | |
140 | Double_t *binLim1=new Double_t[iBin[1]+1]; | |
141 | Double_t *binLim2=new Double_t[iBin[2]+1]; | |
142 | Double_t *binLim3=new Double_t[iBin[3]+1]; | |
143 | Double_t *binLim4=new Double_t[iBin[4]+1]; | |
144 | Double_t *binLim5=new Double_t[iBin[5]+1]; | |
145 | Double_t *binLim6=new Double_t[iBin[6]+1]; | |
146 | Double_t *binLim7=new Double_t[iBin[7]+1]; | |
147 | Double_t *binLim8=new Double_t[iBin[8]+1]; | |
148 | Double_t *binLim9=new Double_t[iBin[9]+1]; | |
149 | Double_t *binLim10=new Double_t[iBin[10]+1]; | |
2c9d065f | 150 | Double_t *binLim11=new Double_t[iBin[11]+1]; |
a8b9a95a | 151 | Double_t *binLim12=new Double_t[iBin[12]+1]; |
2c9d065f | 152 | |
f5ec6c30 | 153 | // checking limits |
154 | if (ptmax_0_4 != ptmin_4_8) { | |
155 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!"); | |
156 | } | |
157 | if (ptmax_4_8 != ptmin_8_10) { | |
158 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!"); | |
159 | } | |
160 | ||
161 | // values for bin lower bounds | |
162 | // pt | |
163 | for(Int_t i=0; i<=nbin0_0_4; i++) binLim0[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin0_0_4*(Double_t)i ; | |
164 | if (binLim0[nbin0_0_4] != ptmin_4_8) { | |
165 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n"); | |
166 | } | |
167 | for(Int_t i=0; i<=nbin0_4_8; i++) binLim0[i+nbin0_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin0_4_8*(Double_t)i ; | |
168 | if (binLim0[nbin0_0_4+nbin0_4_8] != ptmin_8_10) { | |
169 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n"); | |
170 | } | |
171 | for(Int_t i=0; i<=nbin0_8_10; i++) binLim0[i+nbin0_0_4+nbin0_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin0_8_10*(Double_t)i ; | |
172 | ||
173 | // y | |
174 | for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin + (ymax-ymin) /nbin1*(Double_t)i ; | |
175 | ||
176 | // cosThetaStar | |
177 | for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin2*(Double_t)i ; | |
178 | ||
179 | // ptPi | |
180 | for(Int_t i=0; i<=nbin3_0_4; i++) binLim3[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin3_0_4*(Double_t)i ; | |
181 | if (binLim3[nbin3_0_4] != ptmin_4_8) { | |
182 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!"); | |
183 | } | |
184 | for(Int_t i=0; i<=nbin3_4_8; i++) binLim3[i+nbin3_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin3_4_8*(Double_t)i ; | |
185 | if (binLim3[nbin3_0_4+nbin3_4_8] != ptmin_8_10) { | |
186 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n"); | |
187 | } | |
188 | for(Int_t i=0; i<=nbin3_8_10; i++) binLim3[i+nbin3_0_4+nbin3_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin3_8_10*(Double_t)i ; | |
189 | ||
190 | // ptKa | |
191 | for(Int_t i=0; i<=nbin4_0_4; i++) binLim4[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin4_0_4*(Double_t)i ; | |
192 | if (binLim4[nbin4_0_4] != ptmin_4_8) { | |
193 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!"); | |
194 | } | |
195 | for(Int_t i=0; i<=nbin4_4_8; i++) binLim4[i+nbin4_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin4_4_8*(Double_t)i ; | |
196 | if (binLim4[nbin4_0_4+nbin4_4_8] != ptmin_8_10) { | |
197 | Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n"); | |
198 | } | |
199 | for(Int_t i=0; i<=nbin4_8_10; i++) binLim4[i+nbin4_0_4+nbin4_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin4_8_10*(Double_t)i ; | |
200 | ||
201 | // cT | |
202 | for(Int_t i=0; i<=nbin5; i++) binLim5[i]=(Double_t)cTmin + (cTmax-cTmin) /nbin5*(Double_t)i ; | |
203 | ||
204 | // dca | |
205 | for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin + (dcamax-dcamin) /nbin6*(Double_t)i ; | |
206 | ||
207 | // d0pi | |
208 | for(Int_t i=0; i<=nbin7; i++) binLim7[i]=(Double_t)d0min + (d0max-d0min) /nbin7*(Double_t)i ; | |
209 | ||
210 | // d0K | |
211 | for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min + (d0max-d0min) /nbin8*(Double_t)i ; | |
212 | ||
213 | // d0xd0 | |
214 | for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0xd0min + (d0xd0max-d0xd0min) /nbin9*(Double_t)i ; | |
215 | ||
216 | // cosPointingAngle | |
217 | for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin10*(Double_t)i ; | |
218 | ||
2c9d065f | 219 | // Phi |
220 | for(Int_t i=0; i<=nbin11; i++) binLim11[i]=(Double_t)phimin + (phimax-phimin) /nbin11*(Double_t)i ; | |
221 | ||
a8b9a95a | 222 | // z Primary Vertex |
223 | for(Int_t i=0; i<=nbin12; i++) { | |
224 | binLim12[i]=(Double_t)zmin + (zmax-zmin) /nbin12*(Double_t)i ; | |
225 | // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim12[i])); | |
226 | } | |
227 | ||
f5ec6c30 | 228 | // debugging printings |
229 | //Info("AliCFHeavyFlavourTaskMultiVarMultiStep","Printing lower limits for bins in pt"); | |
230 | //for (Int_t i =0; i<= iBin[0]; i++){ | |
231 | // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim0[i])); | |
232 | //} | |
233 | //Info("Printing lower limits for bins in ptPi"); | |
234 | //for (Int_t i =0; i<= iBin[3]; i++){ | |
235 | // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim3[i])); | |
236 | //} | |
237 | //Info("Printing lower limits for bins in ptKa"); | |
238 | //for (Int_t i =0; i<= iBin[4]; i++){ | |
239 | // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim4[i])); | |
240 | // } | |
241 | ||
242 | //one "container" for MC | |
243 | AliCFContainer* container = new AliCFContainer("container","container for tracks",nstep,nvar,iBin); | |
244 | //setting the bin limits | |
245 | container -> SetBinLimits(ipt,binLim0); | |
246 | container -> SetBinLimits(iy,binLim1); | |
247 | container -> SetBinLimits(icosThetaStar,binLim2); | |
248 | container -> SetBinLimits(ipTpi,binLim3); | |
249 | container -> SetBinLimits(ipTk,binLim4); | |
250 | container -> SetBinLimits(icT,binLim5); | |
251 | container -> SetBinLimits(idca,binLim6); | |
252 | container -> SetBinLimits(id0pi,binLim7); | |
253 | container -> SetBinLimits(id0K,binLim8); | |
254 | container -> SetBinLimits(id0xd0,binLim9); | |
255 | container -> SetBinLimits(ipointing,binLim10); | |
2c9d065f | 256 | container -> SetBinLimits(iphi,binLim11); |
a8b9a95a | 257 | container -> SetBinLimits(iz,binLim12); |
f5ec6c30 | 258 | |
c0ea95db | 259 | container -> SetStepTitle(0, "MC"); |
260 | container -> SetStepTitle(1, "MCAcc"); | |
261 | container -> SetStepTitle(2, "RecoVertex"); | |
262 | container -> SetStepTitle(3, "RecoRefit"); | |
263 | container -> SetStepTitle(4, "Reco"); | |
264 | container -> SetStepTitle(5, "RecoAcc"); | |
265 | container -> SetStepTitle(6, "RecoITSCluster"); | |
266 | container -> SetStepTitle(7, "RecoCuts"); | |
267 | ||
268 | container -> SetVarTitle(ipt,"pt"); | |
269 | container -> SetVarTitle(iy,"y"); | |
270 | container -> SetVarTitle(icosThetaStar, "cosThetaStar"); | |
271 | container -> SetVarTitle(ipTpi, "ptpi"); | |
272 | container -> SetVarTitle(ipTk, "ptK"); | |
273 | container -> SetVarTitle(icT, "ct"); | |
274 | container -> SetVarTitle(idca, "dca"); | |
275 | container -> SetVarTitle(id0pi, "d0pi"); | |
276 | container -> SetVarTitle(id0K, "d0K"); | |
277 | container -> SetVarTitle(id0xd0, "d0xd0"); | |
278 | container -> SetVarTitle(ipointing, "piointing"); | |
279 | container -> SetVarTitle(iphi, "phi"); | |
280 | container -> SetVarTitle(iz, "z"); | |
281 | ||
282 | ||
f5ec6c30 | 283 | //CREATE THE CUTS ----------------------------------------------- |
284 | ||
285 | // Gen-Level kinematic cuts | |
286 | AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts"); | |
f5ec6c30 | 287 | |
288 | //Particle-Level cuts: | |
289 | AliCFParticleGenCuts* mcGenCuts = new AliCFParticleGenCuts("mcGenCuts","MC particle generation cuts"); | |
f5ec6c30 | 290 | mcGenCuts->SetRequirePdgCode(PDG, kTRUE); // kTRUE set in order to include D0_bar |
291 | mcGenCuts->SetAODMC(1); //special flag for reading MC in AOD tree (important) | |
292 | ||
293 | // Acceptance cuts: | |
294 | AliCFAcceptanceCuts* accCuts = new AliCFAcceptanceCuts("accCuts", "Acceptance cuts"); | |
f5ec6c30 | 295 | AliCFTrackKineCuts *kineAccCuts = new AliCFTrackKineCuts("kineAccCuts","Kine-Acceptance cuts"); |
296 | kineAccCuts->SetPtRange(ptmin,ptmax); | |
297 | kineAccCuts->SetEtaRange(etamin,etamax); | |
298 | ||
299 | // Rec-Level kinematic cuts | |
300 | AliCFTrackKineCuts *recKineCuts = new AliCFTrackKineCuts("recKineCuts","rec-level kine cuts"); | |
f5ec6c30 | 301 | |
302 | AliCFTrackQualityCuts *recQualityCuts = new AliCFTrackQualityCuts("recQualityCuts","rec-level quality cuts"); | |
f5ec6c30 | 303 | |
304 | AliCFTrackIsPrimaryCuts *recIsPrimaryCuts = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts","rec-level isPrimary cuts"); | |
f5ec6c30 | 305 | |
306 | printf("CREATE MC KINE CUTS\n"); | |
307 | TObjArray* mcList = new TObjArray(0) ; | |
308 | mcList->AddLast(mcKineCuts); | |
309 | mcList->AddLast(mcGenCuts); | |
310 | ||
311 | printf("CREATE ACCEPTANCE CUTS\n"); | |
312 | TObjArray* accList = new TObjArray(0) ; | |
313 | accList->AddLast(kineAccCuts); | |
314 | ||
315 | printf("CREATE RECONSTRUCTION CUTS\n"); | |
4bad9b4e | 316 | TObjArray* recList = new TObjArray(0) ; // not used!! |
f5ec6c30 | 317 | recList->AddLast(recKineCuts); |
318 | recList->AddLast(recQualityCuts); | |
319 | recList->AddLast(recIsPrimaryCuts); | |
320 | ||
4bad9b4e | 321 | TObjArray* emptyList = new TObjArray(0); |
322 | ||
f5ec6c30 | 323 | //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK |
324 | printf("CREATE INTERFACE AND CUTS\n"); | |
325 | AliCFManager* man = new AliCFManager() ; | |
326 | man->SetParticleContainer (container); | |
327 | man->SetParticleCutsList(0 , mcList); // MC | |
328 | man->SetParticleCutsList(1 , accList); // Acceptance | |
ae3e319c | 329 | man->SetParticleCutsList(2 , emptyList); // Vertex |
330 | man->SetParticleCutsList(3 , emptyList); // Refit | |
331 | man->SetParticleCutsList(4 , emptyList); // AOD | |
332 | man->SetParticleCutsList(5 , emptyList); // AOD in Acceptance | |
333 | man->SetParticleCutsList(6 , emptyList); // AOD with required n. of ITS clusters | |
334 | man->SetParticleCutsList(7 , emptyList); // AOD Reco (PPR cuts implemented in Task) | |
f5ec6c30 | 335 | |
336 | // Get the pointer to the existing analysis manager via the static access method. | |
337 | //============================================================================== | |
338 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
339 | if (!mgr) { | |
340 | ::Error("AddTaskCompareHF", "No analysis manager to connect to."); | |
341 | return NULL; | |
342 | } | |
343 | //CREATE THE TASK | |
344 | printf("CREATE TASK\n"); | |
345 | // create the task | |
346 | AliCFHeavyFlavourTaskMultiVarMultiStep *task = new AliCFHeavyFlavourTaskMultiVarMultiStep("AliCFHeavyFlavourTaskMultiVarMultiStep"); | |
347 | task->SetFillFromGenerated(kFALSE); | |
348 | task->SetMinITSClusters(minITSClusters); | |
349 | task->SetCFManager(man); //here is set the CF manager | |
f6d06004 | 350 | task->SetKeepD0fromB(isKeepD0fromB); |
a5d92cb4 | 351 | |
352 | //-----------------------------------------------------------// | |
353 | // create correlation matrix for unfolding - only eta-pt // | |
354 | //-----------------------------------------------------------// | |
355 | ||
356 | Bool_t AcceptanceUnf = kTRUE; // unfold at acceptance level, otherwise PPR | |
357 | ||
358 | Int_t thnDim[4]; | |
359 | ||
360 | //first half : reconstructed | |
361 | //second half : MC | |
362 | ||
363 | thnDim[0] = iBin[0]; | |
364 | thnDim[2] = iBin[0]; | |
365 | thnDim[1] = iBin[1]; | |
366 | thnDim[3] = iBin[1]; | |
367 | ||
368 | THnSparseD* correlation = new THnSparseD("correlation","THnSparse with correlations",4,thnDim); | |
369 | Double_t** binEdges = new Double_t[2]; | |
370 | ||
371 | // set bin limits | |
372 | ||
373 | binEdges[0]= binLim0; | |
374 | binEdges[1]= binLim1; | |
375 | ||
376 | correlation->SetBinEdges(0,binEdges[0]); | |
377 | correlation->SetBinEdges(2,binEdges[0]); | |
378 | ||
379 | correlation->SetBinEdges(1,binEdges[1]); | |
380 | correlation->SetBinEdges(3,binEdges[1]); | |
381 | ||
382 | correlation->Sumw2(); | |
383 | ||
384 | // correlation matrix ready | |
385 | //------------------------------------------------// | |
386 | ||
387 | task->SetCorrelationMatrix(correlation); // correlation matrix for unfolding | |
388 | ||
f5ec6c30 | 389 | // Create and connect containers for input/output |
390 | ||
391 | // ------ input data ------ | |
392 | AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer(); | |
393 | ||
394 | // ----- output data ----- | |
395 | ||
34dc24ce | 396 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
f6d06004 | 397 | TString output1name="", output2name="", output3name=""; |
398 | if(!isKeepD0fromB) { | |
399 | outputfile += ":PWG3_D2H_CFtaskD0toKpi"; | |
400 | output1name="CFHFchist0"; | |
401 | output2name="CFHFccontainer0"; | |
402 | output3name="CFHFcorr0"; | |
403 | } | |
404 | else { | |
405 | outputfile += ":PWG3_D2H_CFtaskD0toKpiKeepD0fromB"; | |
406 | output1name="CFHFchist0allD0"; | |
407 | output2name="CFHFccontainer0allD0"; | |
408 | output3name="CFHFcorr0allD0"; | |
409 | ||
410 | } | |
34dc24ce | 411 | |
f5ec6c30 | 412 | //now comes user's output objects : |
f5ec6c30 | 413 | // output TH1I for event counting |
f6d06004 | 414 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(output1name, TH1I::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); |
f5ec6c30 | 415 | // output Correction Framework Container (for acceptance & efficiency calculations) |
f6d06004 | 416 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(output2name, AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); |
34dc24ce | 417 | // Unfolding - correlation matrix |
f6d06004 | 418 | AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(output3name, THnSparseD::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); |
a5d92cb4 | 419 | |
f5ec6c30 | 420 | mgr->AddTask(task); |
421 | ||
422 | mgr->ConnectInput(task,0,mgr->GetCommonInputContainer()); | |
f5ec6c30 | 423 | mgr->ConnectOutput(task,1,coutput1); |
424 | mgr->ConnectOutput(task,2,coutput2); | |
a5d92cb4 | 425 | mgr->ConnectOutput(task,3,coutput3); |
f5ec6c30 | 426 | return task; |
427 | } | |
428 |