]>
Commit | Line | Data |
---|---|---|
b67ec6f7 | 1 | /*************************************************************** * |
2 | * Authors : Antonin Maire, Boris Hippolyte | |
3 | * Contributors are mentioned in the code where appropriate. * | |
4 | * * | |
5 | * Permission to use, copy, modify and distribute this software and its * | |
6 | * documentation strictly for non-commercial purposes is hereby granted * | |
7 | * without fee, provided that the above copyright notice appears in all * | |
8 | * copies and that both the copyright notice and this permission notice * | |
9 | * appear in the supporting documentation. The authors make no claims * | |
10 | * about the suitability of this software for any purpose. It is * | |
11 | * provided "as is" without express or implied warranty. * | |
12 | **************************************************************************/ | |
13 | ||
14 | //----------------------------------------------------------------- | |
15 | // AliAnalysisTaskCheckPerformanceCascade class | |
16 | // This task is for a performance study of cascade identification. | |
17 | // It works with MC info and ESD/AOD tree. | |
18 | // Origin : A.Maire Mar2009, antonin.maire@ires.in2p3.fr | |
19 | //----------------------------------------------------------------- | |
20 | ||
21 | ||
6b843db3 | 22 | #include <Riostream.h> |
b67ec6f7 | 23 | |
24 | #include "TList.h" | |
25 | #include "TFile.h" | |
26 | #include "TH1F.h" | |
27 | #include "TH2F.h" | |
28 | #include "TCanvas.h" | |
29 | #include "TParticle.h" | |
30 | #include "TMath.h" | |
31 | ||
32 | #include "AliLog.h" | |
33 | #include "AliHeader.h" | |
34 | #include "AliMCEvent.h" | |
35 | #include "AliStack.h" | |
36 | #include "AliInputEventHandler.h" | |
37 | ||
38 | #include "AliESDEvent.h" | |
39 | #include "AliESDcascade.h" | |
40 | ||
41 | #include "AliAODEvent.h" | |
42 | ||
43 | #include "AliAnalysisTaskCheckPerformanceCascade.h" | |
44 | ||
45 | ClassImp(AliAnalysisTaskCheckPerformanceCascade) | |
46 | ||
47 | ||
48 | ||
49 | //_____Dummy constructor________________________________________________________________ | |
50 | AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade() | |
51 | : AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty ) | |
52 | fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), | |
53 | ||
54 | // - Cascade part initialisation | |
55 | fListHistCascade(0), | |
56 | fHistMCTrackMultiplicity(0), | |
57 | ||
58 | fHistEtaGenProton(0), | |
59 | fHistEtaGenAntiProton(0), | |
60 | ||
61 | // Xi- | |
62 | fHistEtaGenCascXiMinus(0), | |
ff0753e1 | 63 | f2dHistGenPtVsGenYGenXiMinus(0), |
b67ec6f7 | 64 | |
65 | fHistThetaGenCascXiMinus(0), | |
ff0753e1 | 66 | f2dHistGenPtVsGenYFdblXiMinus(0), |
b67ec6f7 | 67 | |
68 | fHistThetaLambdaXiMinus(0), | |
69 | fHistThetaBachXiMinus(0), | |
70 | ||
71 | fHistThetaMesDghterXiMinus(0), | |
72 | fHistThetaBarDghterXiMinus(0), | |
73 | ||
74 | fHistPtBachXiMinus(0), | |
75 | fHistPtMesDghterXiMinus(0), | |
76 | fHistPtBarDghterXiMinus(0), | |
77 | ||
78 | ||
79 | // Xi+ | |
80 | fHistEtaGenCascXiPlus(0), | |
ff0753e1 | 81 | f2dHistGenPtVsGenYGenXiPlus(0), |
b67ec6f7 | 82 | |
83 | fHistThetaGenCascXiPlus(0), | |
ff0753e1 | 84 | f2dHistGenPtVsGenYFdblXiPlus(0), |
b67ec6f7 | 85 | |
86 | fHistThetaLambdaXiPlus(0), | |
87 | fHistThetaBachXiPlus(0), | |
88 | ||
89 | fHistThetaMesDghterXiPlus(0), | |
90 | fHistThetaBarDghterXiPlus(0), | |
91 | ||
92 | fHistPtBachXiPlus(0), | |
93 | fHistPtMesDghterXiPlus(0), | |
94 | fHistPtBarDghterXiPlus(0), | |
95 | ||
96 | // Omega- | |
97 | fHistEtaGenCascOmegaMinus(0), | |
ff0753e1 | 98 | f2dHistGenPtVsGenYGenOmegaMinus(0), |
b67ec6f7 | 99 | |
100 | fHistThetaGenCascOmegaMinus(0), | |
ff0753e1 | 101 | f2dHistGenPtVsGenYFdblOmegaMinus(0), |
b67ec6f7 | 102 | |
103 | fHistThetaLambdaOmegaMinus(0), | |
104 | fHistThetaBachOmegaMinus(0), | |
105 | ||
106 | fHistThetaMesDghterOmegaMinus(0), | |
107 | fHistThetaBarDghterOmegaMinus(0), | |
108 | ||
109 | fHistPtBachOmegaMinus(0), | |
110 | fHistPtMesDghterOmegaMinus(0), | |
111 | fHistPtBarDghterOmegaMinus(0), | |
112 | ||
113 | ||
114 | // Omega+ | |
115 | fHistEtaGenCascOmegaPlus(0), | |
ff0753e1 | 116 | f2dHistGenPtVsGenYGenOmegaPlus(0), |
b67ec6f7 | 117 | |
118 | fHistThetaGenCascOmegaPlus(0), | |
ff0753e1 | 119 | f2dHistGenPtVsGenYFdblOmegaPlus(0), |
b67ec6f7 | 120 | |
121 | fHistThetaLambdaOmegaPlus(0), | |
122 | fHistThetaBachOmegaPlus(0), | |
123 | ||
124 | fHistThetaMesDghterOmegaPlus(0), | |
125 | fHistThetaBarDghterOmegaPlus(0), | |
126 | ||
127 | fHistPtBachOmegaPlus(0), | |
128 | fHistPtMesDghterOmegaPlus(0), | |
129 | fHistPtBarDghterOmegaPlus(0), | |
130 | ||
131 | // Part 2 - Association to MC | |
132 | ||
133 | fHistMassXiMinus(0), | |
134 | fHistMassXiPlus(0), | |
135 | fHistMassOmegaMinus(0), | |
136 | fHistMassOmegaPlus(0), | |
f87cd3db | 137 | |
138 | // - Effective mass histos with combined PID | |
139 | fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0), | |
140 | fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0), | |
f870ac91 | 141 | |
142 | // - PID Probability versus MC Pt(bachelor track) | |
143 | f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0), | |
f87cd3db | 144 | |
145 | // - Effective mass histos with perfect MC PID on the bachelor | |
146 | fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0), | |
147 | fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0), | |
b67ec6f7 | 148 | |
ff0753e1 | 149 | |
b67ec6f7 | 150 | // - Effective mass histos for the cascade candidates associated with MC |
151 | fHistAsMCMassXiMinus(0), | |
152 | fHistAsMCMassXiPlus(0), | |
153 | fHistAsMCMassOmegaMinus(0), | |
154 | fHistAsMCMassOmegaPlus(0), | |
f870ac91 | 155 | |
ff0753e1 | 156 | // - Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID |
157 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0), | |
158 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0), | |
159 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0), | |
160 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0), | |
161 | ||
162 | // - Generated Pt Vs generated y, for the cascade candidates associated with MC | |
163 | f2dHistAsMCGenPtVsGenYXiMinus(0), | |
164 | f2dHistAsMCGenPtVsGenYXiPlus(0), | |
165 | f2dHistAsMCGenPtVsGenYOmegaMinus(0), | |
166 | f2dHistAsMCGenPtVsGenYOmegaPlus(0), | |
b67ec6f7 | 167 | |
168 | // - Generated Eta of the the cascade candidates associated with MC | |
169 | fHistAsMCGenEtaXiMinus(0), | |
170 | fHistAsMCGenEtaXiPlus(0), | |
171 | fHistAsMCGenEtaOmegaMinus(0), | |
172 | fHistAsMCGenEtaOmegaPlus(0), | |
173 | ||
174 | // - Resolution in Pt as function of generated Pt | |
175 | f2dHistAsMCResPtXiMinus(0), | |
176 | f2dHistAsMCResPtXiPlus(0), | |
177 | f2dHistAsMCResPtOmegaMinus(0), | |
178 | f2dHistAsMCResPtOmegaPlus(0), | |
179 | ||
180 | // - Resolution in R(2D) as function of generated R | |
181 | f2dHistAsMCResRXiMinus(0), | |
182 | f2dHistAsMCResRXiPlus(0), | |
183 | f2dHistAsMCResROmegaMinus(0), | |
184 | f2dHistAsMCResROmegaPlus(0) | |
185 | ||
186 | ||
187 | ||
188 | { | |
189 | // Dummy constructor | |
190 | } | |
191 | ||
192 | ||
193 | ||
194 | ||
195 | //_____Non-default Constructor________________________________________________________________ | |
196 | AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade(const char *name) | |
197 | : AliAnalysisTaskSE(name), | |
198 | fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), | |
199 | ||
200 | // - Cascade part initialisation | |
201 | fListHistCascade(0), | |
202 | fHistMCTrackMultiplicity(0), | |
203 | ||
204 | fHistEtaGenProton(0), | |
205 | fHistEtaGenAntiProton(0), | |
206 | ||
ff0753e1 | 207 | // Xi- |
208 | fHistEtaGenCascXiMinus(0), | |
209 | f2dHistGenPtVsGenYGenXiMinus(0), | |
b67ec6f7 | 210 | |
211 | fHistThetaGenCascXiMinus(0), | |
ff0753e1 | 212 | f2dHistGenPtVsGenYFdblXiMinus(0), |
b67ec6f7 | 213 | |
214 | fHistThetaLambdaXiMinus(0), | |
215 | fHistThetaBachXiMinus(0), | |
216 | ||
217 | fHistThetaMesDghterXiMinus(0), | |
218 | fHistThetaBarDghterXiMinus(0), | |
219 | ||
220 | fHistPtBachXiMinus(0), | |
221 | fHistPtMesDghterXiMinus(0), | |
222 | fHistPtBarDghterXiMinus(0), | |
223 | ||
224 | ||
225 | // Xi+ | |
ff0753e1 | 226 | fHistEtaGenCascXiPlus(0), |
227 | f2dHistGenPtVsGenYGenXiPlus(0), | |
b67ec6f7 | 228 | |
229 | fHistThetaGenCascXiPlus(0), | |
ff0753e1 | 230 | f2dHistGenPtVsGenYFdblXiPlus(0), |
b67ec6f7 | 231 | |
232 | fHistThetaLambdaXiPlus(0), | |
233 | fHistThetaBachXiPlus(0), | |
234 | ||
235 | fHistThetaMesDghterXiPlus(0), | |
236 | fHistThetaBarDghterXiPlus(0), | |
237 | ||
238 | fHistPtBachXiPlus(0), | |
239 | fHistPtMesDghterXiPlus(0), | |
240 | fHistPtBarDghterXiPlus(0), | |
241 | ||
242 | // Omega- | |
ff0753e1 | 243 | fHistEtaGenCascOmegaMinus(0), |
244 | f2dHistGenPtVsGenYGenOmegaMinus(0), | |
b67ec6f7 | 245 | |
246 | fHistThetaGenCascOmegaMinus(0), | |
ff0753e1 | 247 | f2dHistGenPtVsGenYFdblOmegaMinus(0), |
b67ec6f7 | 248 | |
249 | fHistThetaLambdaOmegaMinus(0), | |
250 | fHistThetaBachOmegaMinus(0), | |
251 | ||
252 | fHistThetaMesDghterOmegaMinus(0), | |
253 | fHistThetaBarDghterOmegaMinus(0), | |
254 | ||
255 | fHistPtBachOmegaMinus(0), | |
256 | fHistPtMesDghterOmegaMinus(0), | |
257 | fHistPtBarDghterOmegaMinus(0), | |
258 | ||
259 | ||
260 | // Omega+ | |
ff0753e1 | 261 | fHistEtaGenCascOmegaPlus(0), |
262 | f2dHistGenPtVsGenYGenOmegaPlus(0), | |
b67ec6f7 | 263 | |
264 | fHistThetaGenCascOmegaPlus(0), | |
ff0753e1 | 265 | f2dHistGenPtVsGenYFdblOmegaPlus(0), |
b67ec6f7 | 266 | |
267 | fHistThetaLambdaOmegaPlus(0), | |
268 | fHistThetaBachOmegaPlus(0), | |
269 | ||
270 | fHistThetaMesDghterOmegaPlus(0), | |
271 | fHistThetaBarDghterOmegaPlus(0), | |
272 | ||
273 | fHistPtBachOmegaPlus(0), | |
274 | fHistPtMesDghterOmegaPlus(0), | |
275 | fHistPtBarDghterOmegaPlus(0), | |
276 | ||
277 | // Part 2 - Association to MC | |
278 | ||
279 | fHistMassXiMinus(0), | |
280 | fHistMassXiPlus(0), | |
281 | fHistMassOmegaMinus(0), | |
282 | fHistMassOmegaPlus(0), | |
ff0753e1 | 283 | |
f87cd3db | 284 | // - Effective mass histos with combined PID |
285 | fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0), | |
286 | fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0), | |
ff0753e1 | 287 | |
f870ac91 | 288 | // - PID Probability versus MC Pt(bachelor track) |
289 | f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0), | |
290 | ||
f87cd3db | 291 | // - Effective mass histos with perfect MC PID on the bachelor |
292 | fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0), | |
293 | fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0), | |
ff0753e1 | 294 | |
f87cd3db | 295 | |
b67ec6f7 | 296 | // - Effective mass histos for the cascade candidates associated with MC |
297 | fHistAsMCMassXiMinus(0), | |
298 | fHistAsMCMassXiPlus(0), | |
299 | fHistAsMCMassOmegaMinus(0), | |
300 | fHistAsMCMassOmegaPlus(0), | |
b67ec6f7 | 301 | |
ff0753e1 | 302 | // - Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID |
303 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0), | |
304 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0), | |
305 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0), | |
306 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0), | |
307 | ||
308 | // - Generated Pt Vs generated y, for the cascade candidates associated with MC | |
309 | f2dHistAsMCGenPtVsGenYXiMinus(0), | |
310 | f2dHistAsMCGenPtVsGenYXiPlus(0), | |
311 | f2dHistAsMCGenPtVsGenYOmegaMinus(0), | |
312 | f2dHistAsMCGenPtVsGenYOmegaPlus(0), | |
b67ec6f7 | 313 | |
314 | // - Generated Eta of the the cascade candidates associated with MC | |
315 | fHistAsMCGenEtaXiMinus(0), | |
316 | fHistAsMCGenEtaXiPlus(0), | |
317 | fHistAsMCGenEtaOmegaMinus(0), | |
318 | fHistAsMCGenEtaOmegaPlus(0), | |
319 | ||
320 | // - Resolution in Pt as function of generated Pt | |
321 | f2dHistAsMCResPtXiMinus(0), | |
322 | f2dHistAsMCResPtXiPlus(0), | |
323 | f2dHistAsMCResPtOmegaMinus(0), | |
324 | f2dHistAsMCResPtOmegaPlus(0), | |
325 | ||
326 | // - Resolution in R(2D) as function of generated R | |
327 | f2dHistAsMCResRXiMinus(0), | |
328 | f2dHistAsMCResRXiPlus(0), | |
329 | f2dHistAsMCResROmegaMinus(0), | |
330 | f2dHistAsMCResROmegaPlus(0) | |
331 | ||
ff0753e1 | 332 | |
b67ec6f7 | 333 | { |
334 | // Constructor | |
335 | ||
336 | // Define input and output slots here | |
337 | // Input slot #0 works with a TChain | |
338 | //DefineInput(0, TChain::Class()); | |
339 | // Output slot #0 writes into a TList container (cascade) | |
340 | DefineOutput(1, TList::Class()); | |
341 | ||
342 | } | |
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | //________________________________________________________________________ | |
349 | void AliAnalysisTaskCheckPerformanceCascade::UserCreateOutputObjects() | |
350 | { | |
351 | // Create histograms | |
352 | // Called once | |
353 | ||
354 | ||
355 | // Option for AliLog | |
356 | AliLog::SetGlobalLogLevel(AliLog::kError); | |
357 | // to suppress the extensive info prompted by a run with MC | |
358 | ||
359 | ||
360 | ||
361 | // Definition of the datamembers | |
362 | fListHistCascade = new TList(); | |
363 | ||
364 | ||
365 | // - General | |
366 | ||
367 | if (!fHistMCTrackMultiplicity) { | |
368 | fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "MC Track Multiplicity;Number of MC tracks;Events", 100, 0, 500); | |
369 | // fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "Multiplicity distribution;Number of tracks;Events", 200, 0, 40000); //HERE | |
370 | fListHistCascade->Add(fHistMCTrackMultiplicity); | |
371 | } | |
372 | ||
373 | if (!fHistEtaGenProton) { | |
374 | fHistEtaGenProton = new TH1F("fHistEtaGenProton", "#eta of any gen. p^{+};#eta;Number of prim. protons", 200, -10, 10); | |
375 | fListHistCascade->Add(fHistEtaGenProton); | |
376 | } | |
377 | ||
378 | if (!fHistEtaGenAntiProton) { | |
379 | fHistEtaGenAntiProton = new TH1F("fHistEtaGenAntiProton", "#eta of any gen. #bar{p}^{-};#eta;Number of prim. #bar{p}", 200, -10, 10); | |
380 | fListHistCascade->Add(fHistEtaGenAntiProton); | |
381 | } | |
382 | ||
383 | ||
384 | ||
385 | ||
386 | ||
387 | ||
388 | ||
389 | //-------- | |
390 | // I - Xi- | |
391 | // - Pseudo-Rapidity distribution | |
392 | if (!fHistEtaGenCascXiMinus) { | |
393 | fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-};#eta;Number of Casc", 200, -10, 10); | |
394 | fListHistCascade->Add(fHistEtaGenCascXiMinus); | |
395 | } | |
396 | ||
ff0753e1 | 397 | if (!f2dHistGenPtVsGenYGenXiMinus) { |
398 | f2dHistGenPtVsGenYGenXiMinus = new TH2F("f2dHistGenPtVsGenYGenXiMinus", "MC P_{t} Vs MC Y of Gen #Xi^{-} ;Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
399 | fListHistCascade->Add(f2dHistGenPtVsGenYGenXiMinus); | |
b67ec6f7 | 400 | } |
401 | ||
402 | ||
403 | // - Info at the generation level of multi-strange particle | |
404 | ||
405 | if (!fHistThetaGenCascXiMinus) { | |
406 | fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-};#theta;Number of Casc.", 200, -10, 190); | |
407 | fListHistCascade->Add(fHistThetaGenCascXiMinus); | |
408 | } | |
409 | ||
ff0753e1 | 410 | if (!f2dHistGenPtVsGenYFdblXiMinus) { |
411 | f2dHistGenPtVsGenYFdblXiMinus = new TH2F("f2dHistGenPtVsGenYFdblXiMinus", "MC P_{t} Vs MC Y of findable Gen #Xi^{-}; Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
412 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiMinus); | |
b67ec6f7 | 413 | } |
414 | ||
415 | // - Theta distribution the daughters (control plots) | |
416 | ||
417 | if (!fHistThetaLambdaXiMinus) { | |
418 | fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda^0", 200, -10, 190); | |
419 | fListHistCascade->Add(fHistThetaLambdaXiMinus); | |
420 | } | |
421 | ||
422 | if (!fHistThetaBachXiMinus) { | |
423 | fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190); | |
424 | fListHistCascade->Add(fHistThetaBachXiMinus); | |
425 | } | |
426 | ||
427 | if (!fHistThetaMesDghterXiMinus) { | |
428 | fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190); | |
429 | fListHistCascade->Add(fHistThetaMesDghterXiMinus); | |
430 | } | |
431 | ||
432 | if (!fHistThetaBarDghterXiMinus) { | |
433 | fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190); | |
434 | fListHistCascade->Add(fHistThetaBarDghterXiMinus); | |
435 | } | |
436 | ||
437 | // - Pt distribution (control plots) | |
438 | ||
439 | if (!fHistPtBachXiMinus) { | |
440 | fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10); | |
441 | fListHistCascade->Add(fHistPtBachXiMinus); | |
442 | } | |
443 | ||
444 | if (!fHistPtMesDghterXiMinus) { | |
445 | fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter;pt_{MesDght};Number of Mes.", 200, 0, 10); | |
446 | fListHistCascade->Add(fHistPtMesDghterXiMinus); | |
447 | } | |
448 | ||
449 | if (!fHistPtBarDghterXiMinus) { | |
450 | fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter;pt_{BarDght};Number of Bar.", 200, 0, 10); | |
451 | fListHistCascade->Add(fHistPtBarDghterXiMinus); | |
452 | } | |
453 | ||
454 | ||
455 | ||
456 | //-------- | |
457 | // II - Xi+ | |
458 | // - Pseudo-Rapidity distribution | |
459 | if (!fHistEtaGenCascXiPlus) { | |
460 | fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+};#eta;Number of Casc", 200, -10, 10); | |
461 | fListHistCascade->Add(fHistEtaGenCascXiPlus); | |
462 | } | |
463 | ||
ff0753e1 | 464 | if (!f2dHistGenPtVsGenYGenXiPlus) { |
465 | f2dHistGenPtVsGenYGenXiPlus = new TH2F("f2dHistGenPtVsGenYGenXiPlus", "MC P_{t} Vs MC Y of Gen #Xi^{+} ;Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
466 | fListHistCascade->Add(f2dHistGenPtVsGenYGenXiPlus); | |
b67ec6f7 | 467 | } |
468 | ||
469 | ||
470 | // - Info at the generation level of multi-strange particle | |
471 | ||
472 | if (!fHistThetaGenCascXiPlus) { | |
473 | fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+};#theta;Number of Casc.", 200, -10, 190); | |
474 | fListHistCascade->Add(fHistThetaGenCascXiPlus); | |
475 | } | |
476 | ||
ff0753e1 | 477 | if (!f2dHistGenPtVsGenYFdblXiPlus) { |
478 | f2dHistGenPtVsGenYFdblXiPlus = new TH2F("f2dHistGenPtVsGenYFdblXiPlus", "MC P_{t} Vs MC Y of findable Gen #Xi^{+} ;Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
479 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiPlus); | |
b67ec6f7 | 480 | } |
481 | ||
482 | // - Theta distribution the daughters (control plots) | |
483 | ||
484 | if (!fHistThetaLambdaXiPlus) { | |
485 | fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190); | |
486 | fListHistCascade->Add(fHistThetaLambdaXiPlus); | |
487 | } | |
488 | ||
489 | if (!fHistThetaBachXiPlus) { | |
490 | fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190); | |
491 | fListHistCascade->Add(fHistThetaBachXiPlus); | |
492 | } | |
493 | ||
494 | if (!fHistThetaMesDghterXiPlus) { | |
495 | fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190); | |
496 | fListHistCascade->Add(fHistThetaMesDghterXiPlus); | |
497 | } | |
498 | ||
499 | if (!fHistThetaBarDghterXiPlus) { | |
500 | fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190); | |
501 | fListHistCascade->Add(fHistThetaBarDghterXiPlus); | |
502 | } | |
503 | ||
504 | // - Pt distribution (control plots) | |
505 | ||
506 | if (!fHistPtBachXiPlus) { | |
507 | fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10); | |
508 | fListHistCascade->Add(fHistPtBachXiPlus); | |
509 | } | |
510 | ||
511 | if (!fHistPtMesDghterXiPlus) { | |
512 | fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10); | |
513 | fListHistCascade->Add(fHistPtMesDghterXiPlus); | |
514 | } | |
515 | ||
516 | if (!fHistPtBarDghterXiPlus) { | |
517 | fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10); | |
518 | fListHistCascade->Add(fHistPtBarDghterXiPlus); | |
519 | } | |
520 | ||
521 | ||
522 | //--------- | |
523 | // III - Omega- | |
524 | // - Pseudo-Rapidity distribution | |
525 | if (!fHistEtaGenCascOmegaMinus) { | |
526 | fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-};#eta;Number of Casc", 200, -10, 10); | |
527 | fListHistCascade->Add(fHistEtaGenCascOmegaMinus); | |
528 | } | |
529 | ||
ff0753e1 | 530 | if (!f2dHistGenPtVsGenYGenOmegaMinus) { |
531 | f2dHistGenPtVsGenYGenOmegaMinus = new TH2F("f2dHistGenPtVsGenYGenOmegaMinus", "MC P_{t} Vs MC Y of Gen #Omega^{-} ;Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
532 | fListHistCascade->Add(f2dHistGenPtVsGenYGenOmegaMinus); | |
b67ec6f7 | 533 | } |
534 | ||
535 | ||
b67ec6f7 | 536 | // - Info at the generation level of multi-strange particle |
537 | ||
538 | if (!fHistThetaGenCascOmegaMinus) { | |
539 | fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-};#theta;Number of Casc.", 200, -10, 190); | |
540 | fListHistCascade->Add(fHistThetaGenCascOmegaMinus); | |
541 | } | |
542 | ||
ff0753e1 | 543 | if (!f2dHistGenPtVsGenYFdblOmegaMinus) { |
544 | f2dHistGenPtVsGenYFdblOmegaMinus = new TH2F("f2dHistGenPtVsGenYFdblOmegaMinus", "MC P_{t} Vs MC Y of findable Gen #Omega^{-}; Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
545 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaMinus); | |
b67ec6f7 | 546 | } |
547 | ||
548 | // - Theta distribution the daughters (control plots) | |
549 | ||
550 | if (!fHistThetaLambdaOmegaMinus) { | |
551 | fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190); | |
552 | fListHistCascade->Add(fHistThetaLambdaOmegaMinus); | |
553 | } | |
554 | ||
555 | if (!fHistThetaBachOmegaMinus) { | |
556 | fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190); | |
557 | fListHistCascade->Add(fHistThetaBachOmegaMinus); | |
558 | } | |
559 | ||
560 | if (!fHistThetaMesDghterOmegaMinus) { | |
561 | fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190); | |
562 | fListHistCascade->Add(fHistThetaMesDghterOmegaMinus); | |
563 | } | |
564 | ||
565 | if (!fHistThetaBarDghterOmegaMinus) { | |
566 | fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190); | |
567 | fListHistCascade->Add(fHistThetaBarDghterOmegaMinus); | |
568 | } | |
569 | ||
570 | // - Pt distribution (control plots) | |
571 | ||
572 | if (!fHistPtBachOmegaMinus) { | |
573 | fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10); | |
574 | fListHistCascade->Add(fHistPtBachOmegaMinus); | |
575 | } | |
576 | ||
577 | if (!fHistPtMesDghterOmegaMinus) { | |
578 | fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10); | |
579 | fListHistCascade->Add(fHistPtMesDghterOmegaMinus); | |
580 | } | |
581 | ||
582 | if (!fHistPtBarDghterOmegaMinus) { | |
583 | fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10); | |
584 | fListHistCascade->Add(fHistPtBarDghterOmegaMinus); | |
585 | } | |
586 | ||
587 | ||
588 | //--------- | |
589 | // IV - Omega+ | |
590 | // - Pseudo-Rapidity distribution | |
591 | if (!fHistEtaGenCascOmegaPlus) { | |
592 | fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+};#eta;Number of Casc", 200, -10, 10); | |
593 | fListHistCascade->Add(fHistEtaGenCascOmegaPlus); | |
594 | } | |
595 | ||
ff0753e1 | 596 | if (!f2dHistGenPtVsGenYGenOmegaPlus) { |
597 | f2dHistGenPtVsGenYGenOmegaPlus = new TH2F("f2dHistGenPtVsGenYGenOmegaPlus", "MC P_{t} Vs MC Y of Gen #Omega^{+} ;Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
598 | fListHistCascade->Add(f2dHistGenPtVsGenYGenOmegaPlus); | |
b67ec6f7 | 599 | } |
600 | ||
601 | ||
602 | ||
603 | // - Info at the generation level of multi-strange particle | |
604 | ||
605 | if (!fHistThetaGenCascOmegaPlus) { | |
606 | fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+};#theta;Number of Casc.", 200, -10, 190); | |
607 | fListHistCascade->Add(fHistThetaGenCascOmegaPlus); | |
608 | } | |
609 | ||
ff0753e1 | 610 | if (!f2dHistGenPtVsGenYFdblOmegaPlus) { |
611 | f2dHistGenPtVsGenYFdblOmegaPlus = new TH2F("f2dHistGenPtVsGenYFdblOmegaPlus", "MC P_{t} Vs MC Y of findable Gen #Omega^{+}; Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
612 | fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus); | |
b67ec6f7 | 613 | } |
ff0753e1 | 614 | |
b67ec6f7 | 615 | |
616 | // - Theta distribution the daughters (control plots) | |
617 | ||
618 | if (!fHistThetaLambdaOmegaPlus) { | |
619 | fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190); | |
620 | fListHistCascade->Add(fHistThetaLambdaOmegaPlus); | |
621 | } | |
622 | ||
623 | if (!fHistThetaBachOmegaPlus) { | |
624 | fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190); | |
625 | fListHistCascade->Add(fHistThetaBachOmegaPlus); | |
626 | } | |
627 | ||
628 | if (!fHistThetaMesDghterOmegaPlus) { | |
629 | fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190); | |
630 | fListHistCascade->Add(fHistThetaMesDghterOmegaPlus); | |
631 | } | |
632 | ||
633 | if (!fHistThetaBarDghterOmegaPlus) { | |
634 | fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190); | |
635 | fListHistCascade->Add(fHistThetaBarDghterOmegaPlus); | |
636 | } | |
637 | ||
638 | // - Pt distribution (control plots) | |
639 | ||
640 | if (!fHistPtBachOmegaPlus) { | |
641 | fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10); | |
642 | fListHistCascade->Add(fHistPtBachOmegaPlus); | |
643 | } | |
644 | ||
645 | if (!fHistPtMesDghterOmegaPlus) { | |
646 | fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10); | |
647 | fListHistCascade->Add(fHistPtMesDghterOmegaPlus); | |
648 | } | |
649 | ||
650 | if (!fHistPtBarDghterOmegaPlus) { | |
651 | fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10); | |
652 | fListHistCascade->Add(fHistPtBarDghterOmegaPlus); | |
653 | } | |
654 | ||
655 | ||
f870ac91 | 656 | //-------------------------------------------------------------------------------- |
b67ec6f7 | 657 | // Part 2 - Any reconstructed cascades + reconstructed cascades associated with MC |
658 | ||
659 | // - Effective mass histos for cascades candidates. | |
660 | ||
661 | if (! fHistMassXiMinus) { | |
662 | fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0); | |
663 | fListHistCascade->Add(fHistMassXiMinus); | |
664 | } | |
665 | ||
666 | if (! fHistMassXiPlus) { | |
667 | fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0); | |
668 | fListHistCascade->Add(fHistMassXiPlus); | |
669 | } | |
670 | ||
671 | if (! fHistMassOmegaMinus) { | |
672 | fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
673 | fListHistCascade->Add(fHistMassOmegaMinus); | |
674 | } | |
675 | ||
676 | if (! fHistMassOmegaPlus) { | |
677 | fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
678 | fListHistCascade->Add(fHistMassOmegaPlus); | |
679 | } | |
680 | ||
f87cd3db | 681 | |
682 | ||
683 | // - Effective mass histos with combined PID | |
684 | ||
685 | if (! fHistMassWithCombPIDXiMinus) { | |
686 | fHistMassWithCombPIDXiMinus = new TH1F("fHistMassWithCombPIDXiMinus","#Xi^{-} candidates, with Bach. comb. PID;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0); | |
687 | fListHistCascade->Add(fHistMassWithCombPIDXiMinus); | |
688 | } | |
689 | ||
690 | if (! fHistMassWithCombPIDXiPlus) { | |
691 | fHistMassWithCombPIDXiPlus = new TH1F("fHistMassWithCombPIDXiPlus","#Xi^{+} candidates, with Bach. comb. PID;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0); | |
692 | fListHistCascade->Add(fHistMassWithCombPIDXiPlus); | |
693 | } | |
694 | ||
695 | if (! fHistMassWithCombPIDOmegaMinus) { | |
696 | fHistMassWithCombPIDOmegaMinus = new TH1F("fHistMassWithCombPIDOmegaMinus","#Omega^{-} candidates, with Bach. comb. PID;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
697 | fListHistCascade->Add(fHistMassWithCombPIDOmegaMinus); | |
698 | } | |
699 | ||
700 | if (! fHistMassWithCombPIDOmegaPlus) { | |
701 | fHistMassWithCombPIDOmegaPlus = new TH1F("fHistMassWithCombPIDOmegaPlus","#Omega^{+} candidates, with Bach. comb. PID;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
702 | fListHistCascade->Add(fHistMassWithCombPIDOmegaPlus); | |
703 | } | |
704 | ||
f870ac91 | 705 | // - PID Probability versus MC Pt(bachelor track) |
706 | if(! f2dHistPIDprobaKaonVsMCPtBach ){ | |
707 | f2dHistPIDprobaKaonVsMCPtBach = new TH2F( "f2dHistPIDprobaKaonVsMCPtBach" , "Comb. PID proba to be K^{#pm} Vs MC Bach. Pt ; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = K^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10 ); | |
708 | fListHistCascade->Add(f2dHistPIDprobaKaonVsMCPtBach); | |
709 | } | |
710 | ||
711 | if(! f2dHistPIDprobaPionVsMCPtBach ){ | |
712 | f2dHistPIDprobaPionVsMCPtBach = new TH2F( "f2dHistPIDprobaPionVsMCPtBach" , "Comb. PID proba to be #pi^{#pm} Vs MC Bach. Pt ; Pt_{MC}(Bach.) (GeV/c); Comb. PID Proba (Bach. = #pi^{#pm})", 100, 0.0, 5.0, 110, 0.0, 1.10 ); | |
713 | fListHistCascade->Add(f2dHistPIDprobaPionVsMCPtBach); | |
714 | } | |
715 | ||
716 | ||
f87cd3db | 717 | // - Effective mass histos with perfect MC PID on the bachelor |
718 | ||
719 | if (! fHistMassWithMcPIDXiMinus) { | |
720 | fHistMassWithMcPIDXiMinus = new TH1F("fHistMassWithMcPIDXiMinus","#Xi^{-} candidates, with Bach. MC PID;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0); | |
721 | fListHistCascade->Add(fHistMassWithMcPIDXiMinus); | |
722 | } | |
723 | ||
724 | if (! fHistMassWithMcPIDXiPlus) { | |
725 | fHistMassWithMcPIDXiPlus = new TH1F("fHistMassWithMcPIDXiPlus","#Xi^{+} candidates, with Bach. MC PID;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0); | |
726 | fListHistCascade->Add(fHistMassWithMcPIDXiPlus); | |
727 | } | |
728 | ||
729 | if (! fHistMassWithMcPIDOmegaMinus) { | |
730 | fHistMassWithMcPIDOmegaMinus = new TH1F("fHistMassWithMcPIDOmegaMinus","#Omega^{-} candidates, with Bach. MC PID;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
731 | fListHistCascade->Add(fHistMassWithMcPIDOmegaMinus); | |
732 | } | |
733 | ||
734 | if (! fHistMassWithMcPIDOmegaPlus) { | |
735 | fHistMassWithMcPIDOmegaPlus = new TH1F("fHistMassWithMcPIDOmegaPlus","#Omega^{+} candidates, with Bach. MC PID;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
736 | fListHistCascade->Add(fHistMassWithMcPIDOmegaPlus); | |
737 | } | |
738 | ||
739 | ||
b67ec6f7 | 740 | // - Effective mass histos for cascades candidates ASSOCIATED with MC. |
741 | ||
742 | if (! fHistAsMCMassXiMinus) { | |
743 | fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus","#Xi^{-} candidates associated to MC;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0); | |
744 | fListHistCascade->Add(fHistAsMCMassXiMinus); | |
745 | } | |
746 | ||
747 | if (! fHistAsMCMassXiPlus) { | |
748 | fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus","#Xi^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0); | |
749 | fListHistCascade->Add(fHistAsMCMassXiPlus); | |
750 | } | |
751 | ||
752 | if (! fHistAsMCMassOmegaMinus) { | |
753 | fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus","#Omega^{-} candidates associated to MC;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
754 | fListHistCascade->Add(fHistAsMCMassOmegaMinus); | |
755 | } | |
756 | ||
757 | if (! fHistAsMCMassOmegaPlus) { | |
758 | fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus","#Omega^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5); | |
759 | fListHistCascade->Add(fHistAsMCMassOmegaPlus); | |
760 | } | |
761 | ||
f870ac91 | 762 | |
ff0753e1 | 763 | // - Generated Pt Vs generated Y of the cascade candidates associated with MC |
764 | // + having the proper maximum proba of combined PID for the bachelor | |
f870ac91 | 765 | |
ff0753e1 | 766 | if (!f2dHistAsMCandCombPIDGenPtVsGenYXiMinus) { |
767 | f2dHistAsMCandCombPIDGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of #Xi^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
768 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiMinus); | |
f870ac91 | 769 | } |
770 | ||
ff0753e1 | 771 | if (!f2dHistAsMCandCombPIDGenPtVsGenYXiPlus) { |
772 | f2dHistAsMCandCombPIDGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of #Xi^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
773 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiPlus); | |
f870ac91 | 774 | } |
b67ec6f7 | 775 | |
ff0753e1 | 776 | if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus) { |
777 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of #Omega^{-} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
778 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus); | |
f870ac91 | 779 | } |
780 | ||
ff0753e1 | 781 | if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus) { |
782 | f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of #Omega^{+} (associated+Bach.PID); Pt_{MC} (GeV/c); Y_{MC}", 200, 0., 10., 240, -1.2, 1.2); | |
783 | fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus); | |
f870ac91 | 784 | } |
785 | ||
786 | ||
ff0753e1 | 787 | // - Generated Pt Vs Generated Y, for the cascade candidates associated with MC |
b67ec6f7 | 788 | |
ff0753e1 | 789 | if (!f2dHistAsMCGenPtVsGenYXiMinus) { |
790 | f2dHistAsMCGenPtVsGenYXiMinus = new TH2F("f2dHistAsMCGenPtVsGenYXiMinus", "MC P_{t} Vs MC Y of gen. #Xi^{-} (associated);Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 240, -1.2, 1.2); | |
791 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiMinus ); | |
b67ec6f7 | 792 | } |
793 | ||
ff0753e1 | 794 | if (!f2dHistAsMCGenPtVsGenYXiPlus) { |
795 | f2dHistAsMCGenPtVsGenYXiPlus = new TH2F("f2dHistAsMCGenPtVsGenYXiPlus", "MC P_{t} Vs MC Y of gen. #Xi^{+} (associated);Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 240, -1.2, 1.2); | |
796 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiPlus ); | |
b67ec6f7 | 797 | } |
798 | ||
ff0753e1 | 799 | if (!f2dHistAsMCGenPtVsGenYOmegaMinus) { |
800 | f2dHistAsMCGenPtVsGenYOmegaMinus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaMinus", "MC P_{t} Vs MC Y of gen. #Omega^{-} (associated);Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 240, -1.2, 1.2); | |
801 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaMinus ); | |
b67ec6f7 | 802 | } |
803 | ||
ff0753e1 | 804 | if (!f2dHistAsMCGenPtVsGenYOmegaPlus) { |
805 | f2dHistAsMCGenPtVsGenYOmegaPlus = new TH2F("f2dHistAsMCGenPtVsGenYOmegaPlus", "MC P_{t} Vs MC Y of gen. #Omega^{+} (associated);Pt_{MC} (GeV/c); Rapidity, Y_{MC}",200, 0., 10., 240, -1.2, 1.2); | |
806 | fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaPlus ); | |
b67ec6f7 | 807 | } |
808 | ||
809 | ||
810 | // - Generated Eta of the the cascade candidates associated with MC | |
811 | if (!fHistAsMCGenEtaXiMinus) { | |
812 | fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated);#eta;Number of Casc", 100, -5, 5); | |
813 | fListHistCascade->Add( fHistAsMCGenEtaXiMinus ); | |
814 | } | |
815 | ||
816 | if (!fHistAsMCGenEtaXiPlus) { | |
817 | fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated);#eta;Number of Casc", 100, -5, 5); | |
818 | fListHistCascade->Add( fHistAsMCGenEtaXiPlus ); | |
819 | } | |
820 | ||
821 | if (!fHistAsMCGenEtaOmegaMinus) { | |
822 | fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5); | |
823 | fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus ); | |
824 | } | |
825 | ||
826 | if (!fHistAsMCGenEtaOmegaPlus) { | |
827 | fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated);#eta;Number of Casc", 100, -5, 5); | |
828 | fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus ); | |
829 | } | |
830 | ||
831 | ||
832 | ||
833 | // - Resolution in Pt as function of generated Pt | |
834 | ||
835 | if(! f2dHistAsMCResPtXiMinus) { | |
f870ac91 | 836 | f2dHistAsMCResPtXiMinus = new TH2F( "f2dHistAsMCResPtXiMinus", "Resolution in Pt reconstruction for #Xi^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); |
b67ec6f7 | 837 | fListHistCascade->Add(f2dHistAsMCResPtXiMinus); |
838 | } | |
839 | ||
840 | if(! f2dHistAsMCResPtXiPlus) { | |
f870ac91 | 841 | f2dHistAsMCResPtXiPlus = new TH2F( "f2dHistAsMCResPtXiPlus", "Resolution in Pt reconstruction for #Xi^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); |
b67ec6f7 | 842 | fListHistCascade->Add(f2dHistAsMCResPtXiPlus); |
843 | } | |
844 | ||
845 | if(! f2dHistAsMCResPtOmegaMinus) { | |
f870ac91 | 846 | f2dHistAsMCResPtOmegaMinus = new TH2F( "f2dHistAsMCResPtOmegaMinus", "Resolution in Pt reconstruction for #Omega^{-}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); |
b67ec6f7 | 847 | fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus); |
848 | } | |
849 | ||
850 | if(! f2dHistAsMCResPtOmegaPlus) { | |
f870ac91 | 851 | f2dHistAsMCResPtOmegaPlus = new TH2F( "f2dHistAsMCResPtOmegaPlus", "Resolution in Pt reconstruction for #Omega^{+}; Pt_{MC} (GeV/c); (Pt_{reco} - Pt_{MC}) / Pt_{MC}", 200, 0., 10., 200, -0.1, 0.1); |
b67ec6f7 | 852 | fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus); |
853 | } | |
854 | ||
855 | // - Resolution in R(2D) as function of generated R | |
856 | ||
857 | if(! f2dHistAsMCResRXiMinus) { | |
f870ac91 | 858 | f2dHistAsMCResRXiMinus = new TH2F( "f2dHistAsMCResRXiMinus", "Resolution in transv. position for #Xi^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); |
b67ec6f7 | 859 | fListHistCascade->Add(f2dHistAsMCResRXiMinus); |
860 | } | |
861 | ||
862 | if(! f2dHistAsMCResRXiPlus) { | |
f870ac91 | 863 | f2dHistAsMCResRXiPlus = new TH2F( "f2dHistAsMCResRXiPlus", "Resolution in transv. position for #Xi^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); |
b67ec6f7 | 864 | fListHistCascade->Add(f2dHistAsMCResRXiPlus); |
865 | } | |
866 | ||
867 | if(! f2dHistAsMCResROmegaMinus) { | |
f870ac91 | 868 | f2dHistAsMCResROmegaMinus = new TH2F( "f2dHistAsMCResROmegaMinus", "Resolution in transv. position for #Omega^{-}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); |
b67ec6f7 | 869 | fListHistCascade->Add(f2dHistAsMCResROmegaMinus); |
870 | } | |
871 | ||
872 | if(! f2dHistAsMCResROmegaPlus) { | |
f870ac91 | 873 | f2dHistAsMCResROmegaPlus = new TH2F( "f2dHistAsMCResROmegaPlus", "Resolution in transv. position for #Omega^{+}; R_{MC} (cm); (R_{reco} - R_{MC}) / R_{MC}", 450, 0., 45.0, 240, -0.3, 0.3); |
b67ec6f7 | 874 | fListHistCascade->Add(f2dHistAsMCResROmegaPlus); |
875 | } | |
876 | ||
877 | ||
878 | }// end CreateOutputObjects | |
879 | ||
880 | ||
881 | ||
882 | ||
883 | ||
884 | ||
885 | //________________________________________________________________________ | |
886 | void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *) | |
887 | { | |
888 | ||
889 | // Main loop | |
890 | // Called for each event | |
891 | ||
892 | AliESDEvent *lESDevent = 0x0; | |
893 | AliAODEvent *lAODevent = 0x0; | |
894 | AliMCEvent *lMCevent = 0x0; | |
895 | AliStack *lMCstack = 0x0; | |
896 | Int_t ncascades = -1; | |
897 | ||
898 | ||
899 | // Connect to the InputEvent | |
900 | // After these lines, we should have an ESD/AOD event + the number of cascades in it. | |
901 | ||
902 | if(fAnalysisType == "ESD"){ | |
903 | lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() ); | |
904 | if (!lESDevent) { | |
905 | Printf("ERROR: lESDevent not available \n"); | |
906 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
907 | return; | |
908 | } | |
909 | ncascades = lESDevent->GetNumberOfCascades(); | |
910 | } | |
911 | ||
912 | else if(fAnalysisType == "AOD"){ | |
913 | lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() ); | |
914 | if (!lAODevent) { | |
915 | Printf("ERROR: lAODevent not available \n"); | |
916 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
917 | return; | |
918 | } | |
919 | ncascades = lAODevent->GetNumberOfCascades(); | |
920 | } | |
921 | ||
922 | ||
923 | lMCevent = MCEvent(); | |
924 | if (!lMCevent) { | |
925 | Printf("ERROR: Could not retrieve MC event \n"); | |
926 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
927 | return; | |
928 | } | |
929 | ||
930 | lMCstack = lMCevent->Stack(); | |
931 | if (!lMCstack) { | |
932 | Printf("ERROR: Could not retrieve MC stack \n"); | |
933 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
934 | return; | |
935 | ||
936 | } | |
937 | ||
938 | ||
939 | // cout << "Name of the accessed file :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
940 | ||
941 | // cout << "Tree characteristics ..." << endl; | |
942 | // fInputHandler->GetTree()->Print("toponly"); | |
943 | // fInputHandler->GetTree()->GetBranch("PrimaryVertex")->Print(); | |
944 | // fInputHandler->GetTree()->GetBranch("SPDVertex")->Print(); | |
945 | ||
946 | ||
947 | ||
948 | ||
949 | ||
950 | ||
951 | ||
952 | // --------------------------------------------------------------- | |
953 | // - Initialisation of the part dedicated to cascade vertices | |
954 | ||
955 | Int_t iNumberOfPrimaries = -1; | |
956 | iNumberOfPrimaries = lMCstack->GetNprimary(); | |
957 | ||
958 | if(iNumberOfPrimaries < 1) return; | |
959 | ||
960 | fHistMCTrackMultiplicity->Fill( lMCstack->GetNtrack() ); | |
961 | ||
962 | // For proton | |
963 | /* | |
964 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++) | |
965 | {// This is the begining of the loop on primaries, for protons | |
966 | ||
967 | TParticle* lCurrentParticle = lMCstack->Particle( iCurrentLabelStack ); | |
968 | if(!lCurrentParticle){ | |
969 | Printf("Proton loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
970 | continue; | |
971 | ||
972 | } | |
973 | ||
974 | if( lCurrentParticle->GetPdgCode() == 2212 ) | |
975 | fHistEtaGenProton->Fill( lCurrentParticle->Eta() ); | |
976 | ||
977 | if( lCurrentParticle->GetPdgCode() == -2212 ) | |
978 | fHistEtaGenAntiProton->Fill( lCurrentParticle->Eta() ); | |
979 | }// end loop over primary proton | |
980 | */ | |
981 | ||
982 | ||
983 | ||
984 | //__________________________________________________________________________ | |
985 | // Part 1 - Loop over the different types of generated cascades (Xi-+, Omega-+) | |
986 | ||
987 | // - Initialisation of useful local variables | |
988 | ||
989 | Int_t lPdgCodeCasc = 0; | |
990 | Int_t lPdgCodeBach = 0; | |
991 | Int_t lPdgCodeLambda = 0; | |
992 | Int_t lPdgCodeDghtMesV0 = 0; | |
993 | Int_t lPdgCodeDghtBarV0 = 0; | |
994 | ||
b67ec6f7 | 995 | |
ff0753e1 | 996 | TH1F *lHistEtaGenCasc = 0; |
997 | TH2F *l2dHistGenPtVsGenYGen = 0; | |
998 | ||
b67ec6f7 | 999 | TH1F *lHistThetaGenCasc = 0; |
ff0753e1 | 1000 | TH2F *l2dHistGenPtVsGenYFdbl = 0; |
b67ec6f7 | 1001 | TH1F *lHistThetaLambda = 0; |
1002 | TH1F *lHistThetaBach = 0; | |
1003 | TH1F *lHistThetaBarDghter = 0; | |
1004 | TH1F *lHistThetaMesDghter = 0; | |
1005 | TH1F *lHistPtBach = 0; | |
1006 | TH1F *lHistPtBarDghter = 0; | |
1007 | TH1F *lHistPtMesDghter = 0; | |
1008 | ||
1009 | ||
db71a168 | 1010 | for(Int_t iCascType = 1; iCascType < 5; iCascType++) |
b67ec6f7 | 1011 | { |
1012 | ||
db71a168 | 1013 | switch (iCascType) |
b67ec6f7 | 1014 | { |
1015 | case 1: // Xi- | |
1016 | lPdgCodeCasc = 3312; //Xi- | |
1017 | lPdgCodeBach = -211; //Pi- | |
1018 | lPdgCodeLambda = 3122; //Lambda0 | |
1019 | lPdgCodeDghtMesV0 = -211; //Pi- | |
1020 | lPdgCodeDghtBarV0 = 2212; //Proton | |
1021 | ||
1022 | // any Xi- | |
ff0753e1 | 1023 | lHistEtaGenCasc = fHistEtaGenCascXiMinus; |
1024 | l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenXiMinus; | |
1025 | ||
b67ec6f7 | 1026 | // cascades generated within acceptance (cut in pt + theta) |
ff0753e1 | 1027 | lHistThetaGenCasc = fHistThetaGenCascXiMinus; |
1028 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiMinus; | |
1029 | lHistThetaLambda = fHistThetaLambdaXiMinus; | |
1030 | lHistThetaBach = fHistThetaBachXiMinus; | |
1031 | lHistThetaBarDghter = fHistThetaBarDghterXiMinus; | |
1032 | lHistThetaMesDghter = fHistThetaMesDghterXiMinus; | |
1033 | lHistPtBach = fHistPtBachXiMinus; | |
1034 | lHistPtBarDghter = fHistPtBarDghterXiMinus; | |
1035 | lHistPtMesDghter = fHistPtMesDghterXiMinus; | |
b67ec6f7 | 1036 | break; |
1037 | ||
1038 | case 2: // Xi+ | |
1039 | lPdgCodeCasc = -3312; //Xi+ | |
1040 | lPdgCodeBach = 211; //Pi+ | |
1041 | lPdgCodeLambda = -3122; //AntiLambda0 | |
1042 | lPdgCodeDghtMesV0 = 211; //Pi+ | |
1043 | lPdgCodeDghtBarV0 = -2212; //AntiProton | |
1044 | ||
1045 | // any Xi+ | |
ff0753e1 | 1046 | lHistEtaGenCasc = fHistEtaGenCascXiPlus; |
1047 | l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenXiPlus; | |
1048 | ||
b67ec6f7 | 1049 | // cascades generated within acceptance (cut in pt + theta) |
ff0753e1 | 1050 | lHistThetaGenCasc = fHistThetaGenCascXiPlus; |
1051 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiPlus; | |
1052 | lHistThetaLambda = fHistThetaLambdaXiPlus; | |
1053 | lHistThetaBach = fHistThetaBachXiPlus; | |
1054 | lHistThetaBarDghter = fHistThetaBarDghterXiPlus; | |
1055 | lHistThetaMesDghter = fHistThetaMesDghterXiPlus; | |
1056 | lHistPtBach = fHistPtBachXiPlus; | |
1057 | lHistPtBarDghter = fHistPtBarDghterXiPlus; | |
1058 | lHistPtMesDghter = fHistPtMesDghterXiPlus; | |
b67ec6f7 | 1059 | break; |
1060 | ||
1061 | case 3: // Omega- | |
1062 | lPdgCodeCasc = 3334; //Omega- | |
1063 | lPdgCodeBach = -321; //K- | |
1064 | lPdgCodeLambda = 3122; //Lambda0 | |
1065 | lPdgCodeDghtMesV0 = -211; //Pi- | |
1066 | lPdgCodeDghtBarV0 = 2212; //Proton | |
1067 | ||
1068 | // any Omega- | |
ff0753e1 | 1069 | lHistEtaGenCasc = fHistEtaGenCascOmegaMinus; |
1070 | l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenOmegaMinus; | |
1071 | ||
b67ec6f7 | 1072 | // cascades generated within acceptance (cut in pt + theta) |
ff0753e1 | 1073 | lHistThetaGenCasc = fHistThetaGenCascOmegaMinus; |
1074 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaMinus; | |
1075 | lHistThetaLambda = fHistThetaLambdaOmegaMinus; | |
1076 | lHistThetaBach = fHistThetaBachOmegaMinus; | |
1077 | lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus; | |
1078 | lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus; | |
1079 | lHistPtBach = fHistPtBachOmegaMinus; | |
1080 | lHistPtBarDghter = fHistPtBarDghterOmegaMinus; | |
1081 | lHistPtMesDghter = fHistPtMesDghterOmegaMinus; | |
b67ec6f7 | 1082 | break; |
1083 | ||
1084 | case 4: // Omega+ | |
1085 | lPdgCodeCasc = -3334; //Omega+ | |
1086 | lPdgCodeBach = 321; //K+ | |
1087 | lPdgCodeLambda = -3122; //AntiLambda0 | |
1088 | lPdgCodeDghtMesV0 = 211; //Pi+ | |
1089 | lPdgCodeDghtBarV0 = -2212; //AntiProton | |
1090 | ||
1091 | // any Omega+ | |
ff0753e1 | 1092 | lHistEtaGenCasc = fHistEtaGenCascOmegaPlus; |
1093 | l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenOmegaPlus; | |
b67ec6f7 | 1094 | |
1095 | // cascades generated within acceptance (cut in pt + theta) | |
ff0753e1 | 1096 | lHistThetaGenCasc = fHistThetaGenCascOmegaPlus; |
1097 | l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaPlus; | |
1098 | lHistThetaLambda = fHistThetaLambdaOmegaPlus; | |
1099 | lHistThetaBach = fHistThetaBachOmegaPlus; | |
1100 | lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus; | |
1101 | lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus; | |
1102 | lHistPtBach = fHistPtBachOmegaPlus; | |
1103 | lHistPtBarDghter = fHistPtBarDghterOmegaPlus; | |
1104 | lHistPtMesDghter = fHistPtMesDghterOmegaPlus; | |
b67ec6f7 | 1105 | break; |
1106 | ||
1107 | }// end switch cascade | |
db71a168 | 1108 | |
1109 | ||
b67ec6f7 | 1110 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++) |
1111 | {// This is the begining of the loop on primaries | |
1112 | ||
1113 | TParticle* lCurrentParticle = 0x0; | |
1114 | lCurrentParticle = lMCstack->Particle( iCurrentLabelStack ); | |
1115 | if(!lCurrentParticle){ | |
1116 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
1117 | continue; | |
1118 | ||
1119 | } | |
db71a168 | 1120 | |
b67ec6f7 | 1121 | if( lCurrentParticle->GetPdgCode() == lPdgCodeCasc ){ // Here ! |
ff0753e1 | 1122 | //cout << "Xi- within loop " << iCurrentLabelStack << "/ " << iNumberOfPrimaries << endl; |
b67ec6f7 | 1123 | |
1124 | // - Xi level ... _____________________________________________________________ | |
1125 | TParticle* xiMC = 0x0; | |
1126 | xiMC = lCurrentParticle; | |
1127 | if(!xiMC){ | |
1128 | Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ..."); | |
1129 | continue; | |
1130 | ||
1131 | } | |
1132 | ||
ff0753e1 | 1133 | // Fill the first histos : = any generated Xi, not necessarily within the acceptance |
1134 | Double_t lRapXiMC = 0.5*TMath::Log((xiMC->Energy() + xiMC->Pz()) / (xiMC->Energy() - xiMC->Pz() +1.e-13)); | |
b67ec6f7 | 1135 | |
ff0753e1 | 1136 | lHistEtaGenCasc ->Fill( xiMC->Eta() ); |
1137 | l2dHistGenPtVsGenYGen ->Fill( xiMC->Pt(), lRapXiMC ); | |
1138 | ||
b67ec6f7 | 1139 | |
b67ec6f7 | 1140 | |
ff0753e1 | 1141 | // Check the emission of particle stays within the acceptance of the detector (cut in theta) |
b67ec6f7 | 1142 | if( xiMC->Theta() < TMath::Pi()/4.0 || xiMC->Theta() > 3.0*TMath::Pi()/4.0 ) continue; |
1143 | if( xiMC->GetNDaughters() != 2) continue; | |
1144 | if( xiMC->GetDaughter(0) < 0 ) continue; | |
1145 | if( xiMC->GetDaughter(1) < 0 ) continue; | |
1146 | ||
1147 | TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) ); | |
1148 | TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) ); | |
1149 | ||
1150 | TParticle* lLambda = 0; | |
1151 | TParticle* lBach = 0; | |
1152 | ||
1153 | // Xi - Case 1 | |
1154 | if( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && // Here ! | |
1155 | lDght1ofXi->GetPdgCode() == lPdgCodeBach ){ // Here ! | |
1156 | ||
1157 | lLambda = lDght0ofXi; | |
1158 | lBach = lDght1ofXi; | |
1159 | }// end if dghter 0 = Lambda and dghter 1 = Pi- | |
1160 | ||
1161 | // Xi - Case 2 | |
1162 | else if( lDght0ofXi->GetPdgCode() == lPdgCodeBach && // Here ! | |
1163 | lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){ // Here ! | |
1164 | ||
1165 | lBach = lDght0ofXi; | |
1166 | lLambda = lDght1ofXi; | |
1167 | }// end if dghter 0 = Pi- and dghter 1 = Lambda | |
1168 | ||
1169 | // V0 otherwise - Case 3 | |
1170 | else continue; | |
1171 | ||
ff0753e1 | 1172 | // Check the emission of particle stays within the acceptance of the detector (cut in pt + theta) |
b67ec6f7 | 1173 | if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue; |
1174 | if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
1175 | ||
1176 | if( lBach->Pt() < 0.2 ) continue; | |
1177 | ||
1178 | ||
1179 | ||
1180 | // - V0 level ... _____________________________________________________________ | |
1181 | TParticle* lDghtBarV0 = 0; | |
1182 | TParticle* lDghtMesV0 = 0; | |
1183 | ||
1184 | if( lLambda->GetNDaughters() != 2 ) continue; | |
1185 | if( lLambda->GetDaughter(0) < 0 ) continue; | |
1186 | if( lLambda->GetDaughter(1) < 0 ) continue; | |
1187 | ||
1188 | ||
1189 | TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) ); | |
1190 | TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) ); | |
1191 | ||
1192 | // V0 - Case 1 | |
1193 | if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && // Here ! | |
1194 | lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ){ // Here ! | |
1195 | ||
1196 | lDghtBarV0 = lDght0ofLambda; | |
1197 | lDghtMesV0 = lDght1ofLambda; | |
1198 | }// end if dghter 0 = Proton and dghter 1 = Pi- | |
1199 | ||
1200 | // V0 - Case 2 | |
1201 | else if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && // Here ! | |
1202 | lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ){ // Here ! | |
1203 | ||
1204 | lDghtMesV0 = lDght0ofLambda; | |
1205 | lDghtBarV0 = lDght1ofLambda; | |
1206 | }// end if dghter 0 = Pi- and dghter 1 = proton | |
1207 | ||
1208 | // V0 otherwise - Case 3 | |
1209 | else continue; | |
1210 | ||
1211 | ||
1212 | // Check the emission of particle stays within the acceptance of the detector | |
1213 | if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
1214 | if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue; | |
1215 | ||
1216 | if( lDghtBarV0->Pt() < 0.5 ) continue; | |
1217 | if( lDghtMesV0->Pt() < 0.2 ) continue; | |
1218 | ||
1219 | ||
1220 | ||
1221 | // - Just to know which file is currently open : locate the file containing Xi | |
1222 | //cout << "Name of the file containing generated Xi :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() | |
1223 | // << endl; | |
1224 | ||
ff0753e1 | 1225 | Double_t lRadToDeg = 180.0/TMath::Pi(); |
1226 | ||
b67ec6f7 | 1227 | // - Filling histos ... _________________________________________________________________ |
1228 | lHistThetaGenCasc ->Fill( lRadToDeg * xiMC->Theta() ); | |
ff0753e1 | 1229 | l2dHistGenPtVsGenYFdbl ->Fill( xiMC->Pt(), lRapXiMC ); |
b67ec6f7 | 1230 | |
1231 | // - Fill theta histos for Lambda and Bach | |
1232 | lHistThetaLambda ->Fill( lRadToDeg * lLambda->Theta() ); | |
1233 | lHistThetaBach ->Fill( lRadToDeg * lBach->Theta() ); | |
1234 | ||
1235 | // - Fill theta histos for V0 daughters | |
1236 | lHistThetaBarDghter ->Fill( lRadToDeg * lDghtBarV0->Theta() ); | |
1237 | lHistThetaMesDghter ->Fill( lRadToDeg * lDghtMesV0->Theta() ); | |
1238 | ||
1239 | // - Fill pt histos. | |
1240 | lHistPtBach ->Fill( lBach->Pt() ); | |
1241 | lHistPtBarDghter ->Fill( lDghtBarV0->Pt() ); | |
1242 | lHistPtMesDghter ->Fill( lDghtMesV0->Pt() ); | |
db71a168 | 1243 | |
b67ec6f7 | 1244 | }// end if current particle = Xi- |
1245 | ||
1246 | }// This is the end of the loop on primaries | |
db71a168 | 1247 | |
1248 | // - Re-initialisation of the local TH1F pointers | |
1249 | lHistEtaGenCasc = 0x0; | |
ff0753e1 | 1250 | l2dHistGenPtVsGenYGen = 0x0; |
db71a168 | 1251 | |
1252 | lHistThetaGenCasc = 0x0; | |
ff0753e1 | 1253 | l2dHistGenPtVsGenYFdbl = 0x0; |
db71a168 | 1254 | lHistThetaLambda = 0x0; |
1255 | lHistThetaBach = 0x0; | |
1256 | lHistThetaBarDghter = 0x0; | |
1257 | lHistThetaMesDghter = 0x0; | |
1258 | lHistPtBach = 0x0; | |
1259 | lHistPtBarDghter = 0x0; | |
1260 | lHistPtMesDghter = 0x0; | |
b67ec6f7 | 1261 | |
1262 | } // end of loop over the different types of cascades (Xi-+, Omega-+) | |
1263 | ||
1264 | ||
1265 | ||
1266 | //__________________________________________________________________________ | |
1267 | // Part 2 - Loop over the reconstructed candidates | |
1268 | ||
1269 | ||
1270 | // Temporary way : AOD awareness of the code to be developed | |
1271 | if(fAnalysisType == "AOD") return; | |
1272 | ||
1273 | ||
1274 | for (Int_t iXi = 0; iXi < ncascades; iXi++) | |
1275 | {// This is the begining of the Cascade loop | |
1276 | ||
1277 | AliESDcascade *xiESD = lESDevent->GetCascade(iXi); | |
1278 | ||
1279 | if (!xiESD) continue; | |
1280 | ||
1281 | // - Step 1 : Preparing the general info about of the event | |
1282 | //------------- | |
1283 | //const AliESDVertex *lPrimaryVtx = lESDevent->GetPrimaryVertex(); // get the best vtx available | |
1284 | // Double_t lPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
1285 | // lPrimaryVtx->GetXYZ( lPrimaryVtxPos ); | |
1286 | ||
1287 | // Double_t lMagneticField = lESDevent->GetMagneticField( ); | |
1288 | ||
1289 | ||
1290 | // - Step 2 : Connection to daughter tracks of the current cascade | |
1291 | //------------- | |
1292 | ||
1293 | UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() ); | |
1294 | UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() ); | |
1295 | UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() ); | |
1296 | // abs value not needed ; the index should always be positive (!= label ...) | |
1297 | ||
1298 | AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi ); | |
1299 | AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi ); | |
1300 | AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx ); | |
1301 | if (!pTrackXi || !nTrackXi || !bachTrackXi ) { | |
1302 | Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ..."); | |
1303 | continue; | |
1304 | } | |
1305 | ||
1306 | ||
1307 | // - Step 3 : Info over reconstructed cascades | |
1308 | //------------- | |
1309 | ||
1310 | Double_t lInvMassXiMinus = 0.; | |
1311 | Double_t lInvMassXiPlus = 0.; | |
1312 | Double_t lInvMassOmegaMinus = 0.; | |
1313 | Double_t lInvMassOmegaPlus = 0.; | |
1314 | ||
1315 | Double_t lV0quality = 0.; | |
1316 | ||
1317 | if( bachTrackXi->Charge() < 0 ) { | |
1318 | lV0quality = 0.; | |
1319 | xiESD->ChangeMassHypothesis(lV0quality , 3312); | |
1320 | // Calculate the effective mass of the Xi- candidate. | |
1321 | // pdg code 3312 = Xi- | |
1322 | lInvMassXiMinus = xiESD->GetEffMassXi(); | |
1323 | ||
1324 | lV0quality = 0.; | |
1325 | xiESD->ChangeMassHypothesis(lV0quality , 3334); | |
1326 | // Calculate the effective mass of the Xi- candidate. | |
1327 | // pdg code 3334 = Omega- | |
1328 | lInvMassOmegaMinus = xiESD->GetEffMassXi(); | |
1329 | ||
1330 | lV0quality = 0.; | |
1331 | xiESD->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp. | |
1332 | ||
1333 | } | |
1334 | ||
1335 | if( bachTrackXi->Charge() > 0 ){ | |
1336 | lV0quality = 0.; | |
1337 | xiESD->ChangeMassHypothesis(lV0quality , -3312); | |
1338 | // Calculate the effective mass of the Xi+ candidate. | |
1339 | // pdg code -3312 = Xi+ | |
1340 | lInvMassXiPlus = xiESD->GetEffMassXi(); | |
1341 | ||
1342 | lV0quality = 0.; | |
1343 | xiESD->ChangeMassHypothesis(lV0quality , -3334); | |
1344 | // Calculate the effective mass of the Xi+ candidate. | |
1345 | // pdg code -3334 = Omega+ | |
1346 | lInvMassOmegaPlus = xiESD->GetEffMassXi(); | |
1347 | ||
1348 | lV0quality = 0.; | |
1349 | xiESD->ChangeMassHypothesis(lV0quality , -3312); // Back to "default" hyp. | |
1350 | } | |
1351 | ||
1352 | Double_t lChargeXi = xiESD->Charge(); | |
1353 | ||
1354 | if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus ); | |
1355 | if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus ); | |
1356 | if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
1357 | if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
1358 | ||
1359 | ||
f87cd3db | 1360 | // - Step 4 : PID info |
1361 | //------------- | |
1362 | ||
1363 | Bool_t lIsBachelorKaon = kFALSE; | |
1364 | Bool_t lIsBachelorPion = kFALSE; | |
1365 | ||
f870ac91 | 1366 | // 4.1 - Combined PID |
f87cd3db | 1367 | // Reasonable guess for the priors for the cascade track sample |
1368 | Double_t lPriorsGuessXi[5] = {0.0, 0.0, 2, 0, 1}; | |
1369 | Double_t lPriorsGuessOmega[5] = {0.0, 0.0, 1, 1, 1}; | |
f870ac91 | 1370 | AliPID pidXi; pidXi.SetPriors( lPriorsGuessXi ); |
1371 | AliPID pidOmega; pidOmega.SetPriors( lPriorsGuessOmega ); | |
1372 | Double_t ppion = -2.0; | |
1373 | Double_t pkaon = -2.0; | |
f87cd3db | 1374 | |
1375 | if( bachTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists | |
1376 | Double_t r[10]; bachTrackXi->GetESDpid(r); | |
1377 | pidXi.SetProbabilities(r); | |
1378 | pidOmega.SetProbabilities(r); | |
1379 | // Check if the bachelor track is a pion | |
f870ac91 | 1380 | ppion = pidXi.GetProbability(AliPID::kPion); |
f87cd3db | 1381 | if (ppion > pidXi.GetProbability(AliPID::kElectron) && |
1382 | ppion > pidXi.GetProbability(AliPID::kMuon) && | |
1383 | ppion > pidXi.GetProbability(AliPID::kKaon) && | |
1384 | ppion > pidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE; | |
1385 | // Check if the bachelor track is a kaon | |
f870ac91 | 1386 | pkaon = pidOmega.GetProbability(AliPID::kKaon); |
f87cd3db | 1387 | if (pkaon > pidOmega.GetProbability(AliPID::kElectron) && |
1388 | pkaon > pidOmega.GetProbability(AliPID::kMuon) && | |
1389 | pkaon > pidOmega.GetProbability(AliPID::kPion) && | |
1390 | pkaon > pidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE; | |
1391 | ||
1392 | }// end if bachelor track with existing combined PID | |
1393 | ||
f87cd3db | 1394 | if( lChargeXi < 0 && lIsBachelorPion ) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus ); |
1395 | if( lChargeXi > 0 && lIsBachelorPion ) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus ); | |
1396 | if( lChargeXi < 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
1397 | if( lChargeXi > 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
1398 | ||
1399 | ||
f870ac91 | 1400 | // 4.2 - PID proba Vs Pt(Bach) |
1401 | Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
1402 | TParticle* mcBachForPID = lMCstack->Particle( lblBachForPID ); | |
1403 | Double_t lmcPtBach = mcBachForPID->Pt(); | |
1404 | ||
1405 | if(lIsBachelorPion) f2dHistPIDprobaPionVsMCPtBach->Fill( lmcPtBach, ppion ); | |
1406 | if(lIsBachelorKaon) f2dHistPIDprobaKaonVsMCPtBach->Fill( lmcPtBach, pkaon ); | |
1407 | ||
1408 | ||
1409 | // 4.3 - MC perfect PID | |
f87cd3db | 1410 | Bool_t lIsBachelorMCPiMinus = kFALSE; |
1411 | Bool_t lIsBachelorMCPiPlus = kFALSE; | |
1412 | Bool_t lIsBachelorMCKMinus = kFALSE; | |
1413 | Bool_t lIsBachelorMCKPlus = kFALSE; | |
1414 | ||
f87cd3db | 1415 | if( mcBachForPID->GetPdgCode() == -211) lIsBachelorMCPiMinus = kTRUE; |
1416 | if( mcBachForPID->GetPdgCode() == 211) lIsBachelorMCPiPlus = kTRUE; | |
1417 | if( mcBachForPID->GetPdgCode() == -321) lIsBachelorMCKMinus = kTRUE; | |
1418 | if( mcBachForPID->GetPdgCode() == 321) lIsBachelorMCKPlus = kTRUE; | |
1419 | ||
1420 | if( lChargeXi < 0 && lIsBachelorMCPiMinus ) fHistMassWithMcPIDXiMinus ->Fill( lInvMassXiMinus ); | |
1421 | if( lChargeXi > 0 && lIsBachelorMCPiPlus ) fHistMassWithMcPIDXiPlus ->Fill( lInvMassXiPlus ); | |
1422 | if( lChargeXi < 0 && lIsBachelorMCKMinus ) fHistMassWithMcPIDOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
1423 | if( lChargeXi > 0 && lIsBachelorMCKPlus ) fHistMassWithMcPIDOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
1424 | ||
f870ac91 | 1425 | |
b67ec6f7 | 1426 | |
1427 | ||
f870ac91 | 1428 | // - Step 5 : MC association (care : lots of "continue;" below this line) |
b67ec6f7 | 1429 | //------------- |
1430 | ||
1431 | Bool_t lAssoXiMinus = kFALSE; | |
1432 | Bool_t lAssoXiPlus = kFALSE; | |
1433 | Bool_t lAssoOmegaMinus = kFALSE; | |
1434 | Bool_t lAssoOmegaPlus = kFALSE; | |
1435 | ||
1436 | ||
1437 | if(fDebug > 5) | |
1438 | cout << "MC EventNumber : " << lMCevent->Header()->GetEvent() | |
1439 | << " / MC event Number in Run : " << lMCevent->Header()->GetEventNrInRun() << endl; | |
1440 | ||
f870ac91 | 1441 | // - Step 5.1 : level of the V0 daughters |
b67ec6f7 | 1442 | |
1443 | Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() ); | |
1444 | // Abs value = needed ! question of quality track association ... | |
1445 | Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() ); | |
1446 | ||
1447 | TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter ); | |
1448 | TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter ); | |
1449 | ||
1450 | ||
f870ac91 | 1451 | // - Step 5.2 : level of the Xi daughters |
b67ec6f7 | 1452 | |
1453 | Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ; | |
1454 | Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother(); | |
1455 | ||
f87cd3db | 1456 | if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother |
b67ec6f7 | 1457 | if( lblMotherPosV0Dghter < 0 ) continue; // mother != primary (!= -1) |
1458 | if( lblMotherNegV0Dghter < 0 ) continue; | |
1459 | ||
1460 | ||
1461 | // mothers = Lambda candidate ... a priori | |
1462 | ||
1463 | TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter ); | |
1464 | TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter ); | |
1465 | ||
1466 | Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
1467 | TParticle* mcBach = lMCstack->Particle( lblBach ); | |
1468 | ||
1469 | ||
f870ac91 | 1470 | // - Step 5.3 : level of Xi candidate |
b67ec6f7 | 1471 | |
1472 | Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ; | |
1473 | Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ; | |
1474 | ||
1475 | if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue; | |
1476 | if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ... | |
1477 | if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ... | |
1478 | ||
1479 | ||
1480 | // Gd mothers = Xi candidate ... a priori | |
1481 | ||
1482 | TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter ); | |
1483 | TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter ); | |
1484 | ||
1485 | Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() ); | |
1486 | ||
1487 | if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters | |
1488 | ||
1489 | TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach ); | |
1490 | ||
1491 | ||
f870ac91 | 1492 | // - Step 5.4 : Manage boolean for association |
b67ec6f7 | 1493 | |
1494 | if( mcMotherBach ->GetPdgCode() == 3312 && | |
1495 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 && | |
1496 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3312) lAssoXiMinus = kTRUE; | |
1497 | ||
1498 | else if( mcMotherBach ->GetPdgCode() == -3312 && | |
1499 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 && | |
1500 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3312) lAssoXiPlus = kTRUE; | |
1501 | ||
1502 | else if( mcMotherBach ->GetPdgCode() == 3334 && | |
1503 | mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 && | |
1504 | mcGdMotherNegV0Dghter ->GetPdgCode() == 3334) lAssoOmegaMinus = kTRUE; | |
1505 | ||
1506 | else if( mcMotherBach ->GetPdgCode() == -3334 && | |
1507 | mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 && | |
1508 | mcGdMotherNegV0Dghter ->GetPdgCode() == -3334) lAssoOmegaPlus = kTRUE; | |
1509 | ||
1510 | ||
1511 | ||
1512 | if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue; // no association | |
1513 | ||
1514 | // If a proper association exists ... | |
1515 | ||
1516 | if(fDebug > 4){ | |
1517 | cout << "XiMinus = " << lAssoXiMinus << endl; | |
1518 | cout << "XiPlus = " << lAssoXiPlus << endl; | |
1519 | cout << "OmegaMinus = " << lAssoOmegaMinus << endl; | |
1520 | cout << "OmegaPlus = " << lAssoOmegaPlus << endl | |
1521 | << "----" << endl; | |
1522 | } | |
1523 | ||
1524 | ||
1525 | if(fDebug > 5){ | |
1526 | cout << endl; | |
1527 | cout << "- V0 daughters - " << endl; | |
1528 | cout << " + V0 Pos. / Label : " << lblPosV0Dghter | |
1529 | << " - Pdg Code : " << mcPosV0Dghter->GetTitle() << endl; | |
1530 | cout << " - V0 Neg. / Label : " << lblNegV0Dghter | |
1531 | << " - Pdg Code : " << mcNegV0Dghter->GetTitle() << endl; | |
1532 | ||
1533 | cout << "- Xi daughters - " << endl; | |
1534 | cout << " + V0 Pos. mother / Label : " << lblMotherPosV0Dghter | |
1535 | << " - Pdg Code : " << mcMotherPosV0Dghter->GetTitle() << endl; | |
1536 | cout << " - V0 Neg. mother / Label : " << lblMotherNegV0Dghter | |
1537 | << " - Pdg Code : " << mcMotherNegV0Dghter->GetTitle() << endl; | |
1538 | ||
1539 | cout << " -- Bach. / Label :" << lblBach | |
1540 | << " - Pdg Code : " << mcBach->GetTitle() << endl; | |
1541 | ||
1542 | cout << "- Xi candidate -" << endl; | |
1543 | cout << " + V0 Pos. Gd Mother / Label : " << lblGdMotherPosV0Dghter | |
1544 | << " - Pdg Code : " << mcGdMotherPosV0Dghter->GetTitle() << endl; | |
1545 | cout << " - V0 Neg. Gd Mother / Label : " << lblGdMotherNegV0Dghter | |
1546 | << " - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle() << endl; | |
1547 | ||
1548 | cout << " -- Mother Bach. / Label : " << lblMotherBach | |
1549 | << " - Pdg Code : " << mcMotherBach->GetTitle() << endl; | |
1550 | cout << endl; | |
1551 | } | |
1552 | ||
1553 | ||
f870ac91 | 1554 | // - Step 6 : Plots around the cascade candidates associated with MC |
b67ec6f7 | 1555 | //------------- |
1556 | ||
1557 | Double_t lmcPt = mcMotherBach->Pt(); | |
1558 | Double_t lmcRapXi = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) / | |
1559 | (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) ); | |
1560 | Double_t lmcEta = mcMotherBach->Eta(); | |
1561 | Double_t lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ... | |
1562 | ||
1563 | Double_t lrecoPt = xiESD->Pt(); | |
1564 | Double_t lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() ); | |
1565 | ||
ff0753e1 | 1566 | // - Histos for the cascade candidates associated with MC |
b67ec6f7 | 1567 | |
1568 | if( lChargeXi < 0 && lAssoXiMinus){ | |
1569 | fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus ); | |
ff0753e1 | 1570 | if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiMinus->Fill( lmcPt, lmcRapXi ); |
1571 | f2dHistAsMCGenPtVsGenYXiMinus ->Fill( lmcPt, lmcRapXi ); | |
b67ec6f7 | 1572 | fHistAsMCGenEtaXiMinus ->Fill( lmcEta ); |
1573 | f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
1574 | f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
1575 | } | |
1576 | ||
1577 | else if( lChargeXi > 0 && lAssoXiPlus){ | |
1578 | fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus ); | |
ff0753e1 | 1579 | if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiPlus->Fill( lmcPt, lmcRapXi ); |
1580 | f2dHistAsMCGenPtVsGenYXiPlus ->Fill( lmcPt, lmcRapXi ); | |
b67ec6f7 | 1581 | fHistAsMCGenEtaXiPlus ->Fill( lmcEta ); |
1582 | f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
1583 | f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
1584 | } | |
1585 | ||
1586 | else if( lChargeXi < 0 && lAssoOmegaMinus){ | |
1587 | fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus ); | |
ff0753e1 | 1588 | if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus->Fill( lmcPt, lmcRapXi ); |
1589 | f2dHistAsMCGenPtVsGenYOmegaMinus ->Fill( lmcPt, lmcRapXi ); | |
b67ec6f7 | 1590 | fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta ); |
1591 | f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
1592 | f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
1593 | } | |
1594 | ||
1595 | else if( lChargeXi > 0 && lAssoOmegaPlus){ | |
1596 | fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus ); | |
ff0753e1 | 1597 | if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus->Fill( lmcPt, lmcRapXi ); |
1598 | f2dHistAsMCGenPtVsGenYOmegaPlus ->Fill( lmcPt, lmcRapXi ); | |
b67ec6f7 | 1599 | fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta ); |
1600 | f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt ); | |
1601 | f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius ); | |
1602 | } | |
1603 | ||
1604 | ||
1605 | }// End of loop over reconstructed cascades | |
1606 | ||
1607 | ||
1608 | ||
1609 | ||
1610 | // Post output data. | |
1611 | PostData(1, fListHistCascade); | |
1612 | } | |
1613 | ||
1614 | ||
1615 | ||
1616 | ||
1617 | ||
1618 | ||
1619 | ||
1620 | ||
1621 | ||
1622 | ||
1623 | //________________________________________________________________________ | |
1624 | void AliAnalysisTaskCheckPerformanceCascade::Terminate(Option_t *) | |
1625 | { | |
1626 | // Draw result to the screen | |
1627 | // Called once at the end of the query | |
f870ac91 | 1628 | |
c3b8bf85 | 1629 | TList *cRetrievedList = 0x0; |
1630 | cRetrievedList = (TList*)GetOutputData(1); | |
1631 | if(!cRetrievedList){ | |
f870ac91 | 1632 | Printf("ERROR - AliAnalysisTaskCheckPerformanceCascade : ouput data container list not available\n"); |
1633 | return; | |
1634 | } | |
1635 | ||
c3b8bf85 | 1636 | fHistMCTrackMultiplicity = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMCTrackMultiplicity") ); |
b67ec6f7 | 1637 | if (!fHistMCTrackMultiplicity) { |
c3b8bf85 | 1638 | Printf("ERROR - AliAnalysisTaskCheckPerformanceCascade : fHistMCTrackMultiplicity not available"); |
b67ec6f7 | 1639 | return; |
1640 | } | |
f870ac91 | 1641 | |
1642 | ||
c3b8bf85 | 1643 | TCanvas *canCheckPerformanceCascade = new TCanvas("AliAnalysisTaskCheckPerformanceCascade","Multiplicity",10,10,510,510); |
1644 | canCheckPerformanceCascade->cd(1)->SetLogy(); | |
b67ec6f7 | 1645 | |
1646 | fHistMCTrackMultiplicity->SetMarkerStyle(22); | |
1647 | fHistMCTrackMultiplicity->DrawCopy("E"); | |
b67ec6f7 | 1648 | |
1649 | } |