1 /*************************************************************** *
2 * Authors : Antonin Maire, Boris Hippolyte
3 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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 //-----------------------------------------------------------------
22 #include <Riostream.h>
29 #include "TParticle.h"
33 #include "AliHeader.h"
34 #include "AliMCEvent.h"
36 #include "AliInputEventHandler.h"
38 #include "AliESDEvent.h"
39 #include "AliESDcascade.h"
41 #include "AliAODEvent.h"
43 #include "AliAnalysisTaskCheckPerformanceCascade.h"
45 ClassImp(AliAnalysisTaskCheckPerformanceCascade)
49 //_____Dummy constructor________________________________________________________________
50 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade()
51 : AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty )
52 fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0),
54 // - Cascade part initialisation
56 fHistMCTrackMultiplicity(0),
59 fHistEtaGenAntiProton(0),
62 fHistEtaGenCascXiMinus(0),
64 fHistYGenCascMidRapXiMinus(0),
65 fHistEtaGenCascMidRapXiMinus(0),
66 fHistThetaGenCascMidRapXiMinus(0),
67 fHistPtGenCascMidRapXiMinus(0),
69 fHistThetaGenCascXiMinus(0),
70 fHistPtFdblGenCascXiMinus(0),
72 fHistThetaLambdaXiMinus(0),
73 fHistThetaBachXiMinus(0),
75 fHistThetaMesDghterXiMinus(0),
76 fHistThetaBarDghterXiMinus(0),
78 fHistPtBachXiMinus(0),
79 fHistPtMesDghterXiMinus(0),
80 fHistPtBarDghterXiMinus(0),
84 fHistEtaGenCascXiPlus(0),
86 fHistYGenCascMidRapXiPlus(0),
87 fHistEtaGenCascMidRapXiPlus(0),
88 fHistThetaGenCascMidRapXiPlus(0),
89 fHistPtGenCascMidRapXiPlus(0),
91 fHistThetaGenCascXiPlus(0),
92 fHistPtFdblGenCascXiPlus(0),
94 fHistThetaLambdaXiPlus(0),
95 fHistThetaBachXiPlus(0),
97 fHistThetaMesDghterXiPlus(0),
98 fHistThetaBarDghterXiPlus(0),
100 fHistPtBachXiPlus(0),
101 fHistPtMesDghterXiPlus(0),
102 fHistPtBarDghterXiPlus(0),
105 fHistEtaGenCascOmegaMinus(0),
107 fHistYGenCascMidRapOmegaMinus(0),
108 fHistEtaGenCascMidRapOmegaMinus(0),
109 fHistThetaGenCascMidRapOmegaMinus(0),
110 fHistPtGenCascMidRapOmegaMinus(0),
112 fHistThetaGenCascOmegaMinus(0),
113 fHistPtFdblGenCascOmegaMinus(0),
115 fHistThetaLambdaOmegaMinus(0),
116 fHistThetaBachOmegaMinus(0),
118 fHistThetaMesDghterOmegaMinus(0),
119 fHistThetaBarDghterOmegaMinus(0),
121 fHistPtBachOmegaMinus(0),
122 fHistPtMesDghterOmegaMinus(0),
123 fHistPtBarDghterOmegaMinus(0),
127 fHistEtaGenCascOmegaPlus(0),
129 fHistYGenCascMidRapOmegaPlus(0),
130 fHistEtaGenCascMidRapOmegaPlus(0),
131 fHistThetaGenCascMidRapOmegaPlus(0),
132 fHistPtGenCascMidRapOmegaPlus(0),
134 fHistThetaGenCascOmegaPlus(0),
135 fHistPtFdblGenCascOmegaPlus(0),
137 fHistThetaLambdaOmegaPlus(0),
138 fHistThetaBachOmegaPlus(0),
140 fHistThetaMesDghterOmegaPlus(0),
141 fHistThetaBarDghterOmegaPlus(0),
143 fHistPtBachOmegaPlus(0),
144 fHistPtMesDghterOmegaPlus(0),
145 fHistPtBarDghterOmegaPlus(0),
147 // Part 2 - Association to MC
151 fHistMassOmegaMinus(0),
152 fHistMassOmegaPlus(0),
154 // - Effective mass histos for the cascade candidates associated with MC
155 fHistAsMCMassXiMinus(0),
156 fHistAsMCMassXiPlus(0),
157 fHistAsMCMassOmegaMinus(0),
158 fHistAsMCMassOmegaPlus(0),
160 // - Generated Pt of the the cascade candidates associated with MC
161 fHistAsMCGenPtXiMinus(0),
162 fHistAsMCGenPtXiPlus(0),
163 fHistAsMCGenPtOmegaMinus(0),
164 fHistAsMCGenPtOmegaPlus(0),
166 // - Generated Y of the the cascade candidates associated with MC
167 fHistAsMCGenYXiMinus(0),
168 fHistAsMCGenYXiPlus(0),
169 fHistAsMCGenYOmegaMinus(0),
170 fHistAsMCGenYOmegaPlus(0),
172 // - Generated Y Vs Generated Pt, for the cascade candidates associated with MC
173 f2dHistAsMCGenYVsGenPtXiMinus(0),
174 f2dHistAsMCGenYVsGenPtXiPlus(0),
175 f2dHistAsMCGenYVsGenPtOmegaMinus(0),
176 f2dHistAsMCGenYVsGenPtOmegaPlus(0),
179 // - Generated Eta of the the cascade candidates associated with MC
180 fHistAsMCGenEtaXiMinus(0),
181 fHistAsMCGenEtaXiPlus(0),
182 fHistAsMCGenEtaOmegaMinus(0),
183 fHistAsMCGenEtaOmegaPlus(0),
185 // - Resolution in Pt as function of generated Pt
186 f2dHistAsMCResPtXiMinus(0),
187 f2dHistAsMCResPtXiPlus(0),
188 f2dHistAsMCResPtOmegaMinus(0),
189 f2dHistAsMCResPtOmegaPlus(0),
191 // - Resolution in R(2D) as function of generated R
192 f2dHistAsMCResRXiMinus(0),
193 f2dHistAsMCResRXiPlus(0),
194 f2dHistAsMCResROmegaMinus(0),
195 f2dHistAsMCResROmegaPlus(0)
206 //_____Non-default Constructor________________________________________________________________
207 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade(const char *name)
208 : AliAnalysisTaskSE(name),
209 fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0),
211 // - Cascade part initialisation
213 fHistMCTrackMultiplicity(0),
215 fHistEtaGenProton(0),
216 fHistEtaGenAntiProton(0),
219 fHistEtaGenCascXiMinus(0),
221 fHistYGenCascMidRapXiMinus(0),
222 fHistEtaGenCascMidRapXiMinus(0),
223 fHistThetaGenCascMidRapXiMinus(0),
224 fHistPtGenCascMidRapXiMinus(0),
226 fHistThetaGenCascXiMinus(0),
227 fHistPtFdblGenCascXiMinus(0),
229 fHistThetaLambdaXiMinus(0),
230 fHistThetaBachXiMinus(0),
232 fHistThetaMesDghterXiMinus(0),
233 fHistThetaBarDghterXiMinus(0),
235 fHistPtBachXiMinus(0),
236 fHistPtMesDghterXiMinus(0),
237 fHistPtBarDghterXiMinus(0),
241 fHistEtaGenCascXiPlus(0),
243 fHistYGenCascMidRapXiPlus(0),
244 fHistEtaGenCascMidRapXiPlus(0),
245 fHistThetaGenCascMidRapXiPlus(0),
246 fHistPtGenCascMidRapXiPlus(0),
248 fHistThetaGenCascXiPlus(0),
249 fHistPtFdblGenCascXiPlus(0),
251 fHistThetaLambdaXiPlus(0),
252 fHistThetaBachXiPlus(0),
254 fHistThetaMesDghterXiPlus(0),
255 fHistThetaBarDghterXiPlus(0),
257 fHistPtBachXiPlus(0),
258 fHistPtMesDghterXiPlus(0),
259 fHistPtBarDghterXiPlus(0),
262 fHistEtaGenCascOmegaMinus(0),
264 fHistYGenCascMidRapOmegaMinus(0),
265 fHistEtaGenCascMidRapOmegaMinus(0),
266 fHistThetaGenCascMidRapOmegaMinus(0),
267 fHistPtGenCascMidRapOmegaMinus(0),
269 fHistThetaGenCascOmegaMinus(0),
270 fHistPtFdblGenCascOmegaMinus(0),
272 fHistThetaLambdaOmegaMinus(0),
273 fHistThetaBachOmegaMinus(0),
275 fHistThetaMesDghterOmegaMinus(0),
276 fHistThetaBarDghterOmegaMinus(0),
278 fHistPtBachOmegaMinus(0),
279 fHistPtMesDghterOmegaMinus(0),
280 fHistPtBarDghterOmegaMinus(0),
284 fHistEtaGenCascOmegaPlus(0),
286 fHistYGenCascMidRapOmegaPlus(0),
287 fHistEtaGenCascMidRapOmegaPlus(0),
288 fHistThetaGenCascMidRapOmegaPlus(0),
289 fHistPtGenCascMidRapOmegaPlus(0),
291 fHistThetaGenCascOmegaPlus(0),
292 fHistPtFdblGenCascOmegaPlus(0),
294 fHistThetaLambdaOmegaPlus(0),
295 fHistThetaBachOmegaPlus(0),
297 fHistThetaMesDghterOmegaPlus(0),
298 fHistThetaBarDghterOmegaPlus(0),
300 fHistPtBachOmegaPlus(0),
301 fHistPtMesDghterOmegaPlus(0),
302 fHistPtBarDghterOmegaPlus(0),
304 // Part 2 - Association to MC
308 fHistMassOmegaMinus(0),
309 fHistMassOmegaPlus(0),
311 // - Effective mass histos for the cascade candidates associated with MC
312 fHistAsMCMassXiMinus(0),
313 fHistAsMCMassXiPlus(0),
314 fHistAsMCMassOmegaMinus(0),
315 fHistAsMCMassOmegaPlus(0),
317 // - Generated Pt of the the cascade candidates associated with MC
318 fHistAsMCGenPtXiMinus(0),
319 fHistAsMCGenPtXiPlus(0),
320 fHistAsMCGenPtOmegaMinus(0),
321 fHistAsMCGenPtOmegaPlus(0),
323 // - Generated Y of the the cascade candidates associated with MC
324 fHistAsMCGenYXiMinus(0),
325 fHistAsMCGenYXiPlus(0),
326 fHistAsMCGenYOmegaMinus(0),
327 fHistAsMCGenYOmegaPlus(0),
329 // - Generated Y Vs Generated Pt, for the cascade candidates associated with MC
330 f2dHistAsMCGenYVsGenPtXiMinus(0),
331 f2dHistAsMCGenYVsGenPtXiPlus(0),
332 f2dHistAsMCGenYVsGenPtOmegaMinus(0),
333 f2dHistAsMCGenYVsGenPtOmegaPlus(0),
335 // - Generated Eta of the the cascade candidates associated with MC
336 fHistAsMCGenEtaXiMinus(0),
337 fHistAsMCGenEtaXiPlus(0),
338 fHistAsMCGenEtaOmegaMinus(0),
339 fHistAsMCGenEtaOmegaPlus(0),
341 // - Resolution in Pt as function of generated Pt
342 f2dHistAsMCResPtXiMinus(0),
343 f2dHistAsMCResPtXiPlus(0),
344 f2dHistAsMCResPtOmegaMinus(0),
345 f2dHistAsMCResPtOmegaPlus(0),
347 // - Resolution in R(2D) as function of generated R
348 f2dHistAsMCResRXiMinus(0),
349 f2dHistAsMCResRXiPlus(0),
350 f2dHistAsMCResROmegaMinus(0),
351 f2dHistAsMCResROmegaPlus(0)
361 // Define input and output slots here
362 // Input slot #0 works with a TChain
363 //DefineInput(0, TChain::Class());
364 // Output slot #0 writes into a TList container (cascade)
365 DefineOutput(1, TList::Class());
373 //________________________________________________________________________
374 void AliAnalysisTaskCheckPerformanceCascade::UserCreateOutputObjects()
381 AliLog::SetGlobalLogLevel(AliLog::kError);
382 // to suppress the extensive info prompted by a run with MC
386 // Definition of the datamembers
387 fListHistCascade = new TList();
392 if (!fHistMCTrackMultiplicity) {
393 fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "MC Track Multiplicity;Number of MC tracks;Events", 100, 0, 500);
394 // fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "Multiplicity distribution;Number of tracks;Events", 200, 0, 40000); //HERE
395 fListHistCascade->Add(fHistMCTrackMultiplicity);
398 if (!fHistEtaGenProton) {
399 fHistEtaGenProton = new TH1F("fHistEtaGenProton", "#eta of any gen. p^{+};#eta;Number of prim. protons", 200, -10, 10);
400 fListHistCascade->Add(fHistEtaGenProton);
403 if (!fHistEtaGenAntiProton) {
404 fHistEtaGenAntiProton = new TH1F("fHistEtaGenAntiProton", "#eta of any gen. #bar{p}^{-};#eta;Number of prim. #bar{p}", 200, -10, 10);
405 fListHistCascade->Add(fHistEtaGenAntiProton);
416 // - Pseudo-Rapidity distribution
417 if (!fHistEtaGenCascXiMinus) {
418 fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-};#eta;Number of Casc", 200, -10, 10);
419 fListHistCascade->Add(fHistEtaGenCascXiMinus);
422 // - Plots for |y(MC)| < 1
423 if (!fHistYGenCascMidRapXiMinus) {
424 fHistYGenCascMidRapXiMinus = new TH1F("fHistYGenCascMidRapXiMinus", "Y of #Xi^{-} generated at mid rapidity;Y;Number of Casc", 240, -1.2, 1.2);
425 fListHistCascade->Add(fHistYGenCascMidRapXiMinus );
428 if (!fHistEtaGenCascMidRapXiMinus) {
429 fHistEtaGenCascMidRapXiMinus = new TH1F("fHistEtaGenCascMidRapXiMinus", "#eta of #Xi^{-} generated at mid rapidity;#eta;Number of Casc", 100, -5, 5);
430 fListHistCascade->Add(fHistEtaGenCascMidRapXiMinus );
433 if (!fHistThetaGenCascMidRapXiMinus) {
434 fHistThetaGenCascMidRapXiMinus = new TH1F("fHistThetaGenCascMidRapXiMinus", "#theta of #Xi^{-} generated at mid rapidity;#theta (deg);Number of Casc", 200, -10, 190);
435 fListHistCascade->Add(fHistThetaGenCascMidRapXiMinus );
438 if (!fHistPtGenCascMidRapXiMinus) {
439 fHistPtGenCascMidRapXiMinus = new TH1F("fHistPtGenCascMidRapXiMinus", "P_{t} of #Xi^{-} generated at mid rapidity;P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
440 fListHistCascade->Add(fHistPtGenCascMidRapXiMinus );
444 // - Info at the generation level of multi-strange particle
446 if (!fHistThetaGenCascXiMinus) {
447 fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-};#theta;Number of Casc.", 200, -10, 190);
448 fListHistCascade->Add(fHistThetaGenCascXiMinus);
451 if (!fHistPtFdblGenCascXiMinus) {
452 fHistPtFdblGenCascXiMinus = new TH1F("fHistPtFdblGenCascXiMinus","P_{t} of findable generated #Xi^{-};P_{t} (GeV/c);Number of Casc", 200, 0, 10);
453 fListHistCascade->Add(fHistPtFdblGenCascXiMinus );
456 // - Theta distribution the daughters (control plots)
458 if (!fHistThetaLambdaXiMinus) {
459 fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda^0", 200, -10, 190);
460 fListHistCascade->Add(fHistThetaLambdaXiMinus);
463 if (!fHistThetaBachXiMinus) {
464 fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
465 fListHistCascade->Add(fHistThetaBachXiMinus);
468 if (!fHistThetaMesDghterXiMinus) {
469 fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
470 fListHistCascade->Add(fHistThetaMesDghterXiMinus);
473 if (!fHistThetaBarDghterXiMinus) {
474 fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
475 fListHistCascade->Add(fHistThetaBarDghterXiMinus);
478 // - Pt distribution (control plots)
480 if (!fHistPtBachXiMinus) {
481 fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
482 fListHistCascade->Add(fHistPtBachXiMinus);
485 if (!fHistPtMesDghterXiMinus) {
486 fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter;pt_{MesDght};Number of Mes.", 200, 0, 10);
487 fListHistCascade->Add(fHistPtMesDghterXiMinus);
490 if (!fHistPtBarDghterXiMinus) {
491 fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter;pt_{BarDght};Number of Bar.", 200, 0, 10);
492 fListHistCascade->Add(fHistPtBarDghterXiMinus);
499 // - Pseudo-Rapidity distribution
500 if (!fHistEtaGenCascXiPlus) {
501 fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+};#eta;Number of Casc", 200, -10, 10);
502 fListHistCascade->Add(fHistEtaGenCascXiPlus);
505 // - Plots for |y(MC)| < 1
506 if (!fHistYGenCascMidRapXiPlus) {
507 fHistYGenCascMidRapXiPlus = new TH1F("fHistYGenCascMidRapXiPlus", "Y of #Xi^{+} generated at mid rapidity;Y;Number of Casc", 240, -1.2, 1.2);
508 fListHistCascade->Add(fHistYGenCascMidRapXiPlus );
511 if (!fHistEtaGenCascMidRapXiPlus) {
512 fHistEtaGenCascMidRapXiPlus = new TH1F("fHistEtaGenCascMidRapXiPlus", "#eta of #Xi^{+} generated at mid rapidity;#eta;Number of Casc", 100, -5, 5);
513 fListHistCascade->Add(fHistEtaGenCascMidRapXiPlus );
516 if (!fHistThetaGenCascMidRapXiPlus) {
517 fHistThetaGenCascMidRapXiPlus = new TH1F("fHistThetaGenCascMidRapXiPlus", "#theta of #Xi^{+} generated at mid rapidity;#theta (deg);Number of Casc", 200, -10, 190);
518 fListHistCascade->Add(fHistThetaGenCascMidRapXiPlus );
521 if (!fHistPtGenCascMidRapXiPlus) {
522 fHistPtGenCascMidRapXiPlus = new TH1F("fHistPtGenCascMidRapXiPlus", "P_{t} of #Xi^{+} generated at mid rapidity;P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
523 fListHistCascade->Add(fHistPtGenCascMidRapXiPlus );
527 // - Info at the generation level of multi-strange particle
529 if (!fHistThetaGenCascXiPlus) {
530 fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+};#theta;Number of Casc.", 200, -10, 190);
531 fListHistCascade->Add(fHistThetaGenCascXiPlus);
534 if (!fHistPtFdblGenCascXiPlus) {
535 fHistPtFdblGenCascXiPlus = new TH1F("fHistPtFdblGenCascXiPlus","P_{t} of findable generated #Xi^{+};P_{t} (GeV/c);Number of Casc", 200, 0, 10);
536 fListHistCascade->Add(fHistPtFdblGenCascXiPlus );
539 // - Theta distribution the daughters (control plots)
541 if (!fHistThetaLambdaXiPlus) {
542 fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
543 fListHistCascade->Add(fHistThetaLambdaXiPlus);
546 if (!fHistThetaBachXiPlus) {
547 fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
548 fListHistCascade->Add(fHistThetaBachXiPlus);
551 if (!fHistThetaMesDghterXiPlus) {
552 fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
553 fListHistCascade->Add(fHistThetaMesDghterXiPlus);
556 if (!fHistThetaBarDghterXiPlus) {
557 fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
558 fListHistCascade->Add(fHistThetaBarDghterXiPlus);
561 // - Pt distribution (control plots)
563 if (!fHistPtBachXiPlus) {
564 fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
565 fListHistCascade->Add(fHistPtBachXiPlus);
568 if (!fHistPtMesDghterXiPlus) {
569 fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
570 fListHistCascade->Add(fHistPtMesDghterXiPlus);
573 if (!fHistPtBarDghterXiPlus) {
574 fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
575 fListHistCascade->Add(fHistPtBarDghterXiPlus);
581 // - Pseudo-Rapidity distribution
582 if (!fHistEtaGenCascOmegaMinus) {
583 fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-};#eta;Number of Casc", 200, -10, 10);
584 fListHistCascade->Add(fHistEtaGenCascOmegaMinus);
587 // - Plots for |y(MC)| < 1
588 if (!fHistYGenCascMidRapOmegaMinus) {
589 fHistYGenCascMidRapOmegaMinus = new TH1F("fHistYGenCascMidRapOmegaMinus", "Y of #Omega^{-} generated at mid rapidity;Y;Number of Casc", 240, -1.2, 1.2);
590 fListHistCascade->Add(fHistYGenCascMidRapOmegaMinus );
593 if (!fHistEtaGenCascMidRapOmegaMinus) {
594 fHistEtaGenCascMidRapOmegaMinus = new TH1F("fHistEtaGenCascMidRapOmegaMinus", "#eta of #Omega^{-} generated at mid rapidity;#eta;Number of Casc", 100, -5, 5);
595 fListHistCascade->Add(fHistEtaGenCascMidRapOmegaMinus );
598 if (!fHistThetaGenCascMidRapOmegaMinus) {
599 fHistThetaGenCascMidRapOmegaMinus = new TH1F("fHistThetaGenCascMidRapOmegaMinus", "#theta of #Omega^{-} generated at mid rapidity;#theta (deg);Number of Casc", 200, -10, 190);
600 fListHistCascade->Add(fHistThetaGenCascMidRapOmegaMinus );
603 if (!fHistPtGenCascMidRapOmegaMinus) {
604 fHistPtGenCascMidRapOmegaMinus = new TH1F("fHistPtGenCascMidRapOmegaMinus", "P_{t} of #Omega^{-} generated at mid rapidity;P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
605 fListHistCascade->Add(fHistPtGenCascMidRapOmegaMinus );
610 // - Info at the generation level of multi-strange particle
612 if (!fHistThetaGenCascOmegaMinus) {
613 fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-};#theta;Number of Casc.", 200, -10, 190);
614 fListHistCascade->Add(fHistThetaGenCascOmegaMinus);
617 if (!fHistPtFdblGenCascOmegaMinus) {
618 fHistPtFdblGenCascOmegaMinus = new TH1F("fHistPtFdblGenCascOmegaMinus","P_{t} of findable generated #Omega^{-};P_{t} (GeV/c);Number of Casc", 200, 0, 10);
619 fListHistCascade->Add(fHistPtFdblGenCascOmegaMinus );
622 // - Theta distribution the daughters (control plots)
624 if (!fHistThetaLambdaOmegaMinus) {
625 fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
626 fListHistCascade->Add(fHistThetaLambdaOmegaMinus);
629 if (!fHistThetaBachOmegaMinus) {
630 fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
631 fListHistCascade->Add(fHistThetaBachOmegaMinus);
634 if (!fHistThetaMesDghterOmegaMinus) {
635 fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
636 fListHistCascade->Add(fHistThetaMesDghterOmegaMinus);
639 if (!fHistThetaBarDghterOmegaMinus) {
640 fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
641 fListHistCascade->Add(fHistThetaBarDghterOmegaMinus);
644 // - Pt distribution (control plots)
646 if (!fHistPtBachOmegaMinus) {
647 fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
648 fListHistCascade->Add(fHistPtBachOmegaMinus);
651 if (!fHistPtMesDghterOmegaMinus) {
652 fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
653 fListHistCascade->Add(fHistPtMesDghterOmegaMinus);
656 if (!fHistPtBarDghterOmegaMinus) {
657 fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
658 fListHistCascade->Add(fHistPtBarDghterOmegaMinus);
664 // - Pseudo-Rapidity distribution
665 if (!fHistEtaGenCascOmegaPlus) {
666 fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+};#eta;Number of Casc", 200, -10, 10);
667 fListHistCascade->Add(fHistEtaGenCascOmegaPlus);
670 // - Plots for |y(MC)| < 1
671 if (!fHistYGenCascMidRapOmegaPlus) {
672 fHistYGenCascMidRapOmegaPlus = new TH1F("fHistYGenCascMidRapOmegaPlus", "Y of #Omega^{+} generated at mid rapidity;Y;Number of Casc", 240, -1.2, 1.2);
673 fListHistCascade->Add(fHistYGenCascMidRapOmegaPlus );
676 if (!fHistEtaGenCascMidRapOmegaPlus) {
677 fHistEtaGenCascMidRapOmegaPlus = new TH1F("fHistEtaGenCascMidRapOmegaPlus", "#eta of #Omega^{+} generated at mid rapidity;#eta;Number of Casc", 100, -5, 5);
678 fListHistCascade->Add(fHistEtaGenCascMidRapOmegaPlus );
681 if (!fHistThetaGenCascMidRapOmegaPlus) {
682 fHistThetaGenCascMidRapOmegaPlus = new TH1F("fHistThetaGenCascMidRapOmegaPlus", "#theta of #Omega^{+} generated at mid rapidity;#theta (deg);Number of Casc", 200, -10, 190);
683 fListHistCascade->Add(fHistThetaGenCascMidRapOmegaPlus );
686 if (!fHistPtGenCascMidRapOmegaPlus) {
687 fHistPtGenCascMidRapOmegaPlus = new TH1F("fHistPtGenCascMidRapOmegaPlus", "P_{t} of #Omega^{+} generated at mid rapidity;P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
688 fListHistCascade->Add(fHistPtGenCascMidRapOmegaPlus );
693 // - Info at the generation level of multi-strange particle
695 if (!fHistThetaGenCascOmegaPlus) {
696 fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+};#theta;Number of Casc.", 200, -10, 190);
697 fListHistCascade->Add(fHistThetaGenCascOmegaPlus);
700 if (!fHistPtFdblGenCascOmegaPlus) {
701 fHistPtFdblGenCascOmegaPlus = new TH1F("fHistPtFdblGenCascOmegaPlus","P_{t} of findable generated #Omega^{+};P_{t} (GeV/c);Number of Casc", 200, 0, 10);
702 fListHistCascade->Add(fHistPtFdblGenCascOmegaPlus );
705 // - Theta distribution the daughters (control plots)
707 if (!fHistThetaLambdaOmegaPlus) {
708 fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
709 fListHistCascade->Add(fHistThetaLambdaOmegaPlus);
712 if (!fHistThetaBachOmegaPlus) {
713 fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
714 fListHistCascade->Add(fHistThetaBachOmegaPlus);
717 if (!fHistThetaMesDghterOmegaPlus) {
718 fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
719 fListHistCascade->Add(fHistThetaMesDghterOmegaPlus);
722 if (!fHistThetaBarDghterOmegaPlus) {
723 fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
724 fListHistCascade->Add(fHistThetaBarDghterOmegaPlus);
727 // - Pt distribution (control plots)
729 if (!fHistPtBachOmegaPlus) {
730 fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
731 fListHistCascade->Add(fHistPtBachOmegaPlus);
734 if (!fHistPtMesDghterOmegaPlus) {
735 fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
736 fListHistCascade->Add(fHistPtMesDghterOmegaPlus);
739 if (!fHistPtBarDghterOmegaPlus) {
740 fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
741 fListHistCascade->Add(fHistPtBarDghterOmegaPlus);
746 // Part 2 - Any reconstructed cascades + reconstructed cascades associated with MC
748 // - Effective mass histos for cascades candidates.
750 if (! fHistMassXiMinus) {
751 fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
752 fListHistCascade->Add(fHistMassXiMinus);
755 if (! fHistMassXiPlus) {
756 fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
757 fListHistCascade->Add(fHistMassXiPlus);
760 if (! fHistMassOmegaMinus) {
761 fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
762 fListHistCascade->Add(fHistMassOmegaMinus);
765 if (! fHistMassOmegaPlus) {
766 fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
767 fListHistCascade->Add(fHistMassOmegaPlus);
770 // - Effective mass histos for cascades candidates ASSOCIATED with MC.
772 if (! fHistAsMCMassXiMinus) {
773 fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus","#Xi^{-} candidates associated to MC;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
774 fListHistCascade->Add(fHistAsMCMassXiMinus);
777 if (! fHistAsMCMassXiPlus) {
778 fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus","#Xi^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
779 fListHistCascade->Add(fHistAsMCMassXiPlus);
782 if (! fHistAsMCMassOmegaMinus) {
783 fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus","#Omega^{-} candidates associated to MC;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
784 fListHistCascade->Add(fHistAsMCMassOmegaMinus);
787 if (! fHistAsMCMassOmegaPlus) {
788 fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus","#Omega^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
789 fListHistCascade->Add(fHistAsMCMassOmegaPlus);
793 // - Generated Pt of the the cascade candidates associated with MC
795 if (!fHistAsMCGenPtXiMinus) {
796 fHistAsMCGenPtXiMinus = new TH1F("fHistAsMCGenPtXiMinus", "P_{t} of gen. #Xi^{-} (associated);P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
797 fListHistCascade->Add(fHistAsMCGenPtXiMinus );
800 if (!fHistAsMCGenPtXiPlus) {
801 fHistAsMCGenPtXiPlus = new TH1F("fHistAsMCGenPtXiPlus", "P_{t} of gen. #Xi^{+} (associated);P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
802 fListHistCascade->Add(fHistAsMCGenPtXiPlus );
805 if (!fHistAsMCGenPtOmegaMinus) {
806 fHistAsMCGenPtOmegaMinus = new TH1F("fHistAsMCGenPtOmegaMinus", "P_{t} of gen. #Omega^{-} (associated);P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
807 fListHistCascade->Add(fHistAsMCGenPtOmegaMinus );
810 if (!fHistAsMCGenPtOmegaPlus) {
811 fHistAsMCGenPtOmegaPlus = new TH1F("fHistAsMCGenPtOmegaPlus", "P_{t} of gen. #Omega^{+} (associated);P_{t} (GeV/c);Number of Casc", 200, 0., 10.);
812 fListHistCascade->Add(fHistAsMCGenPtOmegaPlus );
816 // - Generated Y of the the cascade candidates associated with MC
818 if (!fHistAsMCGenYXiMinus) {
819 fHistAsMCGenYXiMinus = new TH1F("fHistAsMCGenYXiMinus", "Rapidity, Y of gen. #Xi^{-} (associated);Rapidity, Y;Number of Casc", 240, -1.2, 1.2);
820 fListHistCascade->Add(fHistAsMCGenYXiMinus );
823 if (!fHistAsMCGenYXiPlus) {
824 fHistAsMCGenYXiPlus = new TH1F("fHistAsMCGenYXiPlus", "Rapidity, Y of gen. #Xi^{+} (associated);Rapidity, Y;Number of Casc", 240, -1.2, 1.2);
825 fListHistCascade->Add(fHistAsMCGenYXiPlus );
828 if (!fHistAsMCGenYOmegaMinus) {
829 fHistAsMCGenYOmegaMinus = new TH1F("fHistAsMCGenYOmegaMinus", "Rapidity, Y of gen. #Omega^{-} (associated);Rapidity, Y;Number of Casc", 240, -1.2, 1.2);
830 fListHistCascade->Add(fHistAsMCGenYOmegaMinus );
833 if (!fHistAsMCGenYOmegaPlus) {
834 fHistAsMCGenYOmegaPlus = new TH1F("fHistAsMCGenYOmegaPlus", "Rapidity, Y of gen. #Omega^{+} (associated);Rapidity, Y;Number of Casc", 240, -1.2, 1.2);
835 fListHistCascade->Add(fHistAsMCGenYOmegaPlus );
838 // - Generated Y Vs Generated Pt, for the cascade candidates associated with MC
840 if (!f2dHistAsMCGenYVsGenPtXiMinus) {
841 f2dHistAsMCGenYVsGenPtXiMinus = new TH2F("f2dHistAsMCGenYVsGenPtXiMinus", "Y Vs P_{t} of gen. #Xi^{-} (associated);Rapidity, Y;P_{t} (GeV/c)",240, -1.2, 1.2, 200, 0., 10.);
842 fListHistCascade->Add(f2dHistAsMCGenYVsGenPtXiMinus );
845 if (!f2dHistAsMCGenYVsGenPtXiPlus) {
846 f2dHistAsMCGenYVsGenPtXiPlus = new TH2F("f2dHistAsMCGenYVsGenPtXiPlus", "Y Vs P_{t} of gen. #Xi^{+} (associated);Rapidity, Y;P_{t} (GeV/c)",240, -1.2, 1.2, 200, 0., 10.);
847 fListHistCascade->Add(f2dHistAsMCGenYVsGenPtXiPlus );
850 if (!f2dHistAsMCGenYVsGenPtOmegaMinus) {
851 f2dHistAsMCGenYVsGenPtOmegaMinus = new TH2F("f2dHistAsMCGenYVsGenPtOmegaMinus", "Y Vs P_{t} of gen. #Omega^{-} (associated);Rapidity, Y;P_{t} (GeV/c)",240, -1.2, 1.2, 200, 0., 10.);
852 fListHistCascade->Add(f2dHistAsMCGenYVsGenPtOmegaMinus );
855 if (!f2dHistAsMCGenYVsGenPtOmegaPlus) {
856 f2dHistAsMCGenYVsGenPtOmegaPlus = new TH2F("f2dHistAsMCGenYVsGenPtOmegaPlus", "Y Vs P_{t} of gen. #Omega^{+} (associated);Rapidity, Y;P_{t} (GeV/c)",240, -1.2, 1.2, 200, 0., 10.);
857 fListHistCascade->Add(f2dHistAsMCGenYVsGenPtOmegaPlus );
861 // - Generated Eta of the the cascade candidates associated with MC
862 if (!fHistAsMCGenEtaXiMinus) {
863 fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated);#eta;Number of Casc", 100, -5, 5);
864 fListHistCascade->Add( fHistAsMCGenEtaXiMinus );
867 if (!fHistAsMCGenEtaXiPlus) {
868 fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated);#eta;Number of Casc", 100, -5, 5);
869 fListHistCascade->Add( fHistAsMCGenEtaXiPlus );
872 if (!fHistAsMCGenEtaOmegaMinus) {
873 fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5);
874 fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus );
877 if (!fHistAsMCGenEtaOmegaPlus) {
878 fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated);#eta;Number of Casc", 100, -5, 5);
879 fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus );
884 // - Resolution in Pt as function of generated Pt
886 if(! f2dHistAsMCResPtXiMinus) {
887 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);
888 fListHistCascade->Add(f2dHistAsMCResPtXiMinus);
891 if(! f2dHistAsMCResPtXiPlus) {
892 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);
893 fListHistCascade->Add(f2dHistAsMCResPtXiPlus);
896 if(! f2dHistAsMCResPtOmegaMinus) {
897 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);
898 fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus);
901 if(! f2dHistAsMCResPtOmegaPlus) {
902 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);
903 fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus);
906 // - Resolution in R(2D) as function of generated R
908 if(! f2dHistAsMCResRXiMinus) {
909 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);
910 fListHistCascade->Add(f2dHistAsMCResRXiMinus);
913 if(! f2dHistAsMCResRXiPlus) {
914 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);
915 fListHistCascade->Add(f2dHistAsMCResRXiPlus);
918 if(! f2dHistAsMCResROmegaMinus) {
919 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);
920 fListHistCascade->Add(f2dHistAsMCResROmegaMinus);
923 if(! f2dHistAsMCResROmegaPlus) {
924 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);
925 fListHistCascade->Add(f2dHistAsMCResROmegaPlus);
929 }// end CreateOutputObjects
936 //________________________________________________________________________
937 void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
941 // Called for each event
943 AliESDEvent *lESDevent = 0x0;
944 AliAODEvent *lAODevent = 0x0;
945 AliMCEvent *lMCevent = 0x0;
946 AliStack *lMCstack = 0x0;
947 Int_t ncascades = -1;
950 // Connect to the InputEvent
951 // After these lines, we should have an ESD/AOD event + the number of cascades in it.
953 if(fAnalysisType == "ESD"){
954 lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );
956 Printf("ERROR: lESDevent not available \n");
957 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
960 ncascades = lESDevent->GetNumberOfCascades();
963 else if(fAnalysisType == "AOD"){
964 lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );
966 Printf("ERROR: lAODevent not available \n");
967 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
970 ncascades = lAODevent->GetNumberOfCascades();
974 lMCevent = MCEvent();
976 Printf("ERROR: Could not retrieve MC event \n");
977 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
981 lMCstack = lMCevent->Stack();
983 Printf("ERROR: Could not retrieve MC stack \n");
984 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
990 // cout << "Name of the accessed file :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
992 // cout << "Tree characteristics ..." << endl;
993 // fInputHandler->GetTree()->Print("toponly");
994 // fInputHandler->GetTree()->GetBranch("PrimaryVertex")->Print();
995 // fInputHandler->GetTree()->GetBranch("SPDVertex")->Print();
1003 // ---------------------------------------------------------------
1004 // - Initialisation of the part dedicated to cascade vertices
1006 Int_t iNumberOfPrimaries = -1;
1007 iNumberOfPrimaries = lMCstack->GetNprimary();
1009 if(iNumberOfPrimaries < 1) return;
1011 fHistMCTrackMultiplicity->Fill( lMCstack->GetNtrack() );
1015 for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++)
1016 {// This is the begining of the loop on primaries, for protons
1018 TParticle* lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
1019 if(!lCurrentParticle){
1020 Printf("Proton loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
1025 if( lCurrentParticle->GetPdgCode() == 2212 )
1026 fHistEtaGenProton->Fill( lCurrentParticle->Eta() );
1028 if( lCurrentParticle->GetPdgCode() == -2212 )
1029 fHistEtaGenAntiProton->Fill( lCurrentParticle->Eta() );
1030 }// end loop over primary proton
1035 //__________________________________________________________________________
1036 // Part 1 - Loop over the different types of generated cascades (Xi-+, Omega-+)
1038 // - Initialisation of useful local variables
1040 Int_t lPdgCodeCasc = 0;
1041 Int_t lPdgCodeBach = 0;
1042 Int_t lPdgCodeLambda = 0;
1043 Int_t lPdgCodeDghtMesV0 = 0;
1044 Int_t lPdgCodeDghtBarV0 = 0;
1046 TH1F *lHistEtaGenCasc = 0;
1048 TH1F *lHistYGenCascMidRap = 0;
1049 TH1F *lHistEtaGenCascMidRap = 0;
1050 TH1F *lHistThetaGenCascMidRap = 0;
1051 TH1F *lHistPtGenCascMidRap = 0;
1053 TH1F *lHistThetaGenCasc = 0;
1054 TH1F *lHistPtFdblGenCasc = 0;
1055 TH1F *lHistThetaLambda = 0;
1056 TH1F *lHistThetaBach = 0;
1057 TH1F *lHistThetaBarDghter = 0;
1058 TH1F *lHistThetaMesDghter = 0;
1059 TH1F *lHistPtBach = 0;
1060 TH1F *lHistPtBarDghter = 0;
1061 TH1F *lHistPtMesDghter = 0;
1064 for(Int_t CascType = 1; CascType < 5; CascType++)
1070 lPdgCodeCasc = 3312; //Xi-
1071 lPdgCodeBach = -211; //Pi-
1072 lPdgCodeLambda = 3122; //Lambda0
1073 lPdgCodeDghtMesV0 = -211; //Pi-
1074 lPdgCodeDghtBarV0 = 2212; //Proton
1077 lHistEtaGenCasc = (TH1F*)fHistEtaGenCascXiMinus;
1079 // cascades within |y| < 1
1080 lHistYGenCascMidRap = fHistYGenCascMidRapXiMinus;
1081 lHistEtaGenCascMidRap = fHistEtaGenCascMidRapXiMinus;
1082 lHistThetaGenCascMidRap = fHistThetaGenCascMidRapXiMinus;
1083 lHistPtGenCascMidRap = fHistPtGenCascMidRapXiMinus;
1085 // cascades generated within acceptance (cut in pt + theta)
1086 lHistThetaGenCasc = fHistThetaGenCascXiMinus;
1087 lHistPtFdblGenCasc = fHistPtFdblGenCascXiMinus;
1088 lHistThetaLambda = fHistThetaLambdaXiMinus;
1089 lHistThetaBach = fHistThetaBachXiMinus;
1090 lHistThetaBarDghter = fHistThetaBarDghterXiMinus;
1091 lHistThetaMesDghter = fHistThetaMesDghterXiMinus;
1092 lHistPtBach = fHistPtBachXiMinus;
1093 lHistPtBarDghter = fHistPtBarDghterXiMinus;
1094 lHistPtMesDghter = fHistPtMesDghterXiMinus;
1098 lPdgCodeCasc = -3312; //Xi+
1099 lPdgCodeBach = 211; //Pi+
1100 lPdgCodeLambda = -3122; //AntiLambda0
1101 lPdgCodeDghtMesV0 = 211; //Pi+
1102 lPdgCodeDghtBarV0 = -2212; //AntiProton
1105 lHistEtaGenCasc = fHistEtaGenCascXiPlus;
1107 // cascades within |y| < 1
1108 lHistYGenCascMidRap = fHistYGenCascMidRapXiPlus;
1109 lHistEtaGenCascMidRap = fHistEtaGenCascMidRapXiPlus;
1110 lHistThetaGenCascMidRap = fHistThetaGenCascMidRapXiPlus;
1111 lHistPtGenCascMidRap = fHistPtGenCascMidRapXiPlus;
1113 // cascades generated within acceptance (cut in pt + theta)
1114 lHistThetaGenCasc = fHistThetaGenCascXiPlus;
1115 lHistPtFdblGenCasc = fHistPtFdblGenCascXiPlus;
1116 lHistThetaLambda = fHistThetaLambdaXiPlus;
1117 lHistThetaBach = fHistThetaBachXiPlus;
1118 lHistThetaBarDghter = fHistThetaBarDghterXiPlus;
1119 lHistThetaMesDghter = fHistThetaMesDghterXiPlus;
1120 lHistPtBach = fHistPtBachXiPlus;
1121 lHistPtBarDghter = fHistPtBarDghterXiPlus;
1122 lHistPtMesDghter = fHistPtMesDghterXiPlus;
1126 lPdgCodeCasc = 3334; //Omega-
1127 lPdgCodeBach = -321; //K-
1128 lPdgCodeLambda = 3122; //Lambda0
1129 lPdgCodeDghtMesV0 = -211; //Pi-
1130 lPdgCodeDghtBarV0 = 2212; //Proton
1133 lHistEtaGenCasc = fHistEtaGenCascOmegaMinus;
1135 // cascades within |y| < 1
1136 lHistYGenCascMidRap = fHistYGenCascMidRapOmegaMinus;
1137 lHistEtaGenCascMidRap = fHistEtaGenCascMidRapOmegaMinus;
1138 lHistThetaGenCascMidRap = fHistThetaGenCascMidRapOmegaMinus;
1139 lHistPtGenCascMidRap = fHistPtGenCascMidRapOmegaMinus;
1141 // cascades generated within acceptance (cut in pt + theta)
1142 lHistThetaGenCasc = fHistThetaGenCascOmegaMinus;
1143 lHistPtFdblGenCasc = fHistPtFdblGenCascOmegaMinus;
1144 lHistThetaLambda = fHistThetaLambdaOmegaMinus;
1145 lHistThetaBach = fHistThetaBachOmegaMinus;
1146 lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus;
1147 lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus;
1148 lHistPtBach = fHistPtBachOmegaMinus;
1149 lHistPtBarDghter = fHistPtBarDghterOmegaMinus;
1150 lHistPtMesDghter = fHistPtMesDghterOmegaMinus;
1154 lPdgCodeCasc = -3334; //Omega+
1155 lPdgCodeBach = 321; //K+
1156 lPdgCodeLambda = -3122; //AntiLambda0
1157 lPdgCodeDghtMesV0 = 211; //Pi+
1158 lPdgCodeDghtBarV0 = -2212; //AntiProton
1161 lHistEtaGenCasc = fHistEtaGenCascOmegaPlus;
1163 // cascades within |y| < 1
1164 lHistYGenCascMidRap = fHistYGenCascMidRapOmegaPlus;
1165 lHistEtaGenCascMidRap = fHistEtaGenCascMidRapOmegaPlus;
1166 lHistThetaGenCascMidRap = fHistThetaGenCascMidRapOmegaPlus;
1167 lHistPtGenCascMidRap = fHistPtGenCascMidRapOmegaPlus;
1169 // cascades generated within acceptance (cut in pt + theta)
1170 lHistThetaGenCasc = fHistThetaGenCascOmegaPlus;
1171 lHistPtFdblGenCasc = fHistPtFdblGenCascOmegaPlus;
1172 lHistThetaLambda = fHistThetaLambdaOmegaPlus;
1173 lHistThetaBach = fHistThetaBachOmegaPlus;
1174 lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus;
1175 lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus;
1176 lHistPtBach = fHistPtBachOmegaPlus;
1177 lHistPtBarDghter = fHistPtBarDghterOmegaPlus;
1178 lHistPtMesDghter = fHistPtMesDghterOmegaPlus;
1181 }// end switch cascade
1184 for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++)
1185 {// This is the begining of the loop on primaries
1187 TParticle* lCurrentParticle = 0x0;
1188 lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
1189 if(!lCurrentParticle){
1190 Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
1195 if( lCurrentParticle->GetPdgCode() == lPdgCodeCasc ){ // Here !
1196 //cout << "Xi- ds boucle " << iCurrentLabelStack << "/ " << iNumberOfPrimaries << endl;
1198 // - Xi level ... _____________________________________________________________
1199 TParticle* xiMC = 0x0;
1200 xiMC = lCurrentParticle;
1202 Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");
1207 Double_t lRadToDeg = 180.0/TMath::Pi();
1209 // Fill the histo in pseudo-rapidity : = any generated Xi, not necessarily within the acceptance
1210 lHistEtaGenCasc->Fill( xiMC->Eta() );
1213 // cascades within |y| < 1
1214 Double_t lRapXi = 0.5*TMath::Log((xiMC->Energy() + xiMC->Pz()) / (xiMC->Energy() - xiMC->Pz() +1.e-13));
1216 if( TMath::Abs(lRapXi) < 1) {
1217 lHistYGenCascMidRap ->Fill( lRapXi );
1218 lHistEtaGenCascMidRap ->Fill( xiMC->Eta() );
1219 lHistThetaGenCascMidRap ->Fill( lRadToDeg * xiMC->Theta() );
1220 lHistPtGenCascMidRap ->Fill( xiMC->Pt() );
1223 // Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)
1224 if( xiMC->Theta() < TMath::Pi()/4.0 || xiMC->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1225 if( xiMC->GetNDaughters() != 2) continue;
1226 if( xiMC->GetDaughter(0) < 0 ) continue;
1227 if( xiMC->GetDaughter(1) < 0 ) continue;
1229 TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) );
1230 TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) );
1232 TParticle* lLambda = 0;
1233 TParticle* lBach = 0;
1236 if( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && // Here !
1237 lDght1ofXi->GetPdgCode() == lPdgCodeBach ){ // Here !
1239 lLambda = lDght0ofXi;
1241 }// end if dghter 0 = Lambda and dghter 1 = Pi-
1244 else if( lDght0ofXi->GetPdgCode() == lPdgCodeBach && // Here !
1245 lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){ // Here !
1248 lLambda = lDght1ofXi;
1249 }// end if dghter 0 = Pi- and dghter 1 = Lambda
1251 // V0 otherwise - Case 3
1254 // Check the emission of particle stays within the acceptance of the detector
1255 if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1256 if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1258 if( lBach->Pt() < 0.2 ) continue;
1262 // - V0 level ... _____________________________________________________________
1263 TParticle* lDghtBarV0 = 0;
1264 TParticle* lDghtMesV0 = 0;
1266 if( lLambda->GetNDaughters() != 2 ) continue;
1267 if( lLambda->GetDaughter(0) < 0 ) continue;
1268 if( lLambda->GetDaughter(1) < 0 ) continue;
1271 TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) );
1272 TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) );
1275 if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && // Here !
1276 lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ){ // Here !
1278 lDghtBarV0 = lDght0ofLambda;
1279 lDghtMesV0 = lDght1ofLambda;
1280 }// end if dghter 0 = Proton and dghter 1 = Pi-
1283 else if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && // Here !
1284 lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ){ // Here !
1286 lDghtMesV0 = lDght0ofLambda;
1287 lDghtBarV0 = lDght1ofLambda;
1288 }// end if dghter 0 = Pi- and dghter 1 = proton
1290 // V0 otherwise - Case 3
1294 // Check the emission of particle stays within the acceptance of the detector
1295 if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1296 if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1298 if( lDghtBarV0->Pt() < 0.5 ) continue;
1299 if( lDghtMesV0->Pt() < 0.2 ) continue;
1303 // - Just to know which file is currently open : locate the file containing Xi
1304 //cout << "Name of the file containing generated Xi :" << fInputHandler->GetTree()->GetCurrentFile()->GetName()
1307 // - Filling histos ... _________________________________________________________________
1308 lHistThetaGenCasc ->Fill( lRadToDeg * xiMC->Theta() );
1309 lHistPtFdblGenCasc ->Fill( xiMC->Pt() );
1311 // - Fill theta histos for Lambda and Bach
1312 lHistThetaLambda ->Fill( lRadToDeg * lLambda->Theta() );
1313 lHistThetaBach ->Fill( lRadToDeg * lBach->Theta() );
1315 // - Fill theta histos for V0 daughters
1316 lHistThetaBarDghter ->Fill( lRadToDeg * lDghtBarV0->Theta() );
1317 lHistThetaMesDghter ->Fill( lRadToDeg * lDghtMesV0->Theta() );
1319 // - Fill pt histos.
1320 lHistPtBach ->Fill( lBach->Pt() );
1321 lHistPtBarDghter ->Fill( lDghtBarV0->Pt() );
1322 lHistPtMesDghter ->Fill( lDghtMesV0->Pt() );
1324 // - Re-initialisation of the local TH1F pointers
1325 lHistEtaGenCasc = 0x0;
1327 lHistYGenCascMidRap = 0x0;
1328 lHistEtaGenCascMidRap = 0x0;
1329 lHistThetaGenCascMidRap = 0x0;
1330 lHistPtGenCascMidRap = 0x0;
1332 lHistThetaGenCasc = 0x0;
1333 lHistPtFdblGenCasc = 0x0;
1334 lHistThetaLambda = 0x0;
1335 lHistThetaBach = 0x0;
1336 lHistThetaBarDghter = 0x0;
1337 lHistThetaMesDghter = 0x0;
1339 lHistPtBarDghter = 0x0;
1340 lHistPtMesDghter = 0x0;
1343 }// end if current particle = Xi-
1345 }// This is the end of the loop on primaries
1347 } // end of loop over the different types of cascades (Xi-+, Omega-+)
1351 //__________________________________________________________________________
1352 // Part 2 - Loop over the reconstructed candidates
1355 // Temporary way : AOD awareness of the code to be developed
1356 if(fAnalysisType == "AOD") return;
1359 for (Int_t iXi = 0; iXi < ncascades; iXi++)
1360 {// This is the begining of the Cascade loop
1362 AliESDcascade *xiESD = lESDevent->GetCascade(iXi);
1364 if (!xiESD) continue;
1366 // - Step 1 : Preparing the general info about of the event
1368 //const AliESDVertex *lPrimaryVtx = lESDevent->GetPrimaryVertex(); // get the best vtx available
1369 // Double_t lPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
1370 // lPrimaryVtx->GetXYZ( lPrimaryVtxPos );
1372 // Double_t lMagneticField = lESDevent->GetMagneticField( );
1375 // - Step 2 : Connection to daughter tracks of the current cascade
1378 UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() );
1379 UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() );
1380 UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() );
1381 // abs value not needed ; the index should always be positive (!= label ...)
1383 AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );
1384 AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );
1385 AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );
1386 if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
1387 Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ...");
1392 // - Step 3 : Info over reconstructed cascades
1395 Double_t lInvMassXiMinus = 0.;
1396 Double_t lInvMassXiPlus = 0.;
1397 Double_t lInvMassOmegaMinus = 0.;
1398 Double_t lInvMassOmegaPlus = 0.;
1400 Double_t lV0quality = 0.;
1402 if( bachTrackXi->Charge() < 0 ) {
1404 xiESD->ChangeMassHypothesis(lV0quality , 3312);
1405 // Calculate the effective mass of the Xi- candidate.
1406 // pdg code 3312 = Xi-
1407 lInvMassXiMinus = xiESD->GetEffMassXi();
1410 xiESD->ChangeMassHypothesis(lV0quality , 3334);
1411 // Calculate the effective mass of the Xi- candidate.
1412 // pdg code 3334 = Omega-
1413 lInvMassOmegaMinus = xiESD->GetEffMassXi();
1416 xiESD->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp.
1420 if( bachTrackXi->Charge() > 0 ){
1422 xiESD->ChangeMassHypothesis(lV0quality , -3312);
1423 // Calculate the effective mass of the Xi+ candidate.
1424 // pdg code -3312 = Xi+
1425 lInvMassXiPlus = xiESD->GetEffMassXi();
1428 xiESD->ChangeMassHypothesis(lV0quality , -3334);
1429 // Calculate the effective mass of the Xi+ candidate.
1430 // pdg code -3334 = Omega+
1431 lInvMassOmegaPlus = xiESD->GetEffMassXi();
1434 xiESD->ChangeMassHypothesis(lV0quality , -3312); // Back to "default" hyp.
1437 Double_t lChargeXi = xiESD->Charge();
1439 if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus );
1440 if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus );
1441 if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus );
1442 if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus );
1447 // - Step 4 : MC association
1450 Bool_t lAssoXiMinus = kFALSE;
1451 Bool_t lAssoXiPlus = kFALSE;
1452 Bool_t lAssoOmegaMinus = kFALSE;
1453 Bool_t lAssoOmegaPlus = kFALSE;
1457 cout << "MC EventNumber : " << lMCevent->Header()->GetEvent()
1458 << " / MC event Number in Run : " << lMCevent->Header()->GetEventNrInRun() << endl;
1460 // - Step 4.1 : level of the V0 daughters
1462 Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() );
1463 // Abs value = needed ! question of quality track association ...
1464 Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() );
1466 TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter );
1467 TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter );
1470 // - Step 4.2 : level of the Xi daughters
1472 Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ;
1473 Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother();
1475 if(lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother
1476 if( lblMotherPosV0Dghter < 0 ) continue; // mother != primary (!= -1)
1477 if( lblMotherNegV0Dghter < 0 ) continue;
1480 // mothers = Lambda candidate ... a priori
1482 TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter );
1483 TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter );
1485 Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
1486 TParticle* mcBach = lMCstack->Particle( lblBach );
1489 // - Step 4.3 : level of Xi candidate
1491 Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ;
1492 Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ;
1494 if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;
1495 if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ...
1496 if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ...
1499 // Gd mothers = Xi candidate ... a priori
1501 TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter );
1502 TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter );
1504 Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() );
1506 if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters
1508 TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach );
1511 // - Step 4.4 : Manage boolean for association
1513 if( mcMotherBach ->GetPdgCode() == 3312 &&
1514 mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&
1515 mcGdMotherNegV0Dghter ->GetPdgCode() == 3312) lAssoXiMinus = kTRUE;
1517 else if( mcMotherBach ->GetPdgCode() == -3312 &&
1518 mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&
1519 mcGdMotherNegV0Dghter ->GetPdgCode() == -3312) lAssoXiPlus = kTRUE;
1521 else if( mcMotherBach ->GetPdgCode() == 3334 &&
1522 mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&
1523 mcGdMotherNegV0Dghter ->GetPdgCode() == 3334) lAssoOmegaMinus = kTRUE;
1525 else if( mcMotherBach ->GetPdgCode() == -3334 &&
1526 mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&
1527 mcGdMotherNegV0Dghter ->GetPdgCode() == -3334) lAssoOmegaPlus = kTRUE;
1531 if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue; // no association
1533 // If a proper association exists ...
1536 cout << "XiMinus = " << lAssoXiMinus << endl;
1537 cout << "XiPlus = " << lAssoXiPlus << endl;
1538 cout << "OmegaMinus = " << lAssoOmegaMinus << endl;
1539 cout << "OmegaPlus = " << lAssoOmegaPlus << endl
1546 cout << "- V0 daughters - " << endl;
1547 cout << " + V0 Pos. / Label : " << lblPosV0Dghter
1548 << " - Pdg Code : " << mcPosV0Dghter->GetTitle() << endl;
1549 cout << " - V0 Neg. / Label : " << lblNegV0Dghter
1550 << " - Pdg Code : " << mcNegV0Dghter->GetTitle() << endl;
1552 cout << "- Xi daughters - " << endl;
1553 cout << " + V0 Pos. mother / Label : " << lblMotherPosV0Dghter
1554 << " - Pdg Code : " << mcMotherPosV0Dghter->GetTitle() << endl;
1555 cout << " - V0 Neg. mother / Label : " << lblMotherNegV0Dghter
1556 << " - Pdg Code : " << mcMotherNegV0Dghter->GetTitle() << endl;
1558 cout << " -- Bach. / Label :" << lblBach
1559 << " - Pdg Code : " << mcBach->GetTitle() << endl;
1561 cout << "- Xi candidate -" << endl;
1562 cout << " + V0 Pos. Gd Mother / Label : " << lblGdMotherPosV0Dghter
1563 << " - Pdg Code : " << mcGdMotherPosV0Dghter->GetTitle() << endl;
1564 cout << " - V0 Neg. Gd Mother / Label : " << lblGdMotherNegV0Dghter
1565 << " - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle() << endl;
1567 cout << " -- Mother Bach. / Label : " << lblMotherBach
1568 << " - Pdg Code : " << mcMotherBach->GetTitle() << endl;
1573 // - Step 5 : Plots around the cascade candidates associated with MC
1576 Double_t lmcPt = mcMotherBach->Pt();
1577 Double_t lmcRapXi = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) /
1578 (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) );
1579 Double_t lmcEta = mcMotherBach->Eta();
1580 Double_t lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ...
1582 Double_t lrecoPt = xiESD->Pt();
1583 Double_t lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() );
1585 // - Effective mass histos for the cascade candidates associated with MC
1587 if( lChargeXi < 0 && lAssoXiMinus){
1588 fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus );
1589 fHistAsMCGenPtXiMinus ->Fill( lmcPt );
1590 fHistAsMCGenYXiMinus ->Fill( lmcRapXi );
1591 f2dHistAsMCGenYVsGenPtXiMinus ->Fill( lmcRapXi, lmcPt );
1592 fHistAsMCGenEtaXiMinus ->Fill( lmcEta );
1593 f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
1594 f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
1597 else if( lChargeXi > 0 && lAssoXiPlus){
1598 fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus );
1599 fHistAsMCGenPtXiPlus ->Fill( lmcPt );
1600 fHistAsMCGenYXiPlus ->Fill( lmcRapXi );
1601 f2dHistAsMCGenYVsGenPtXiPlus ->Fill( lmcRapXi, lmcPt );
1602 fHistAsMCGenEtaXiPlus ->Fill( lmcEta );
1603 f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
1604 f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
1607 else if( lChargeXi < 0 && lAssoOmegaMinus){
1608 fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus );
1609 fHistAsMCGenPtOmegaMinus ->Fill( lmcPt );
1610 fHistAsMCGenYOmegaMinus ->Fill( lmcRapXi );
1611 f2dHistAsMCGenYVsGenPtOmegaMinus ->Fill( lmcRapXi, lmcPt );
1612 fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta );
1613 f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
1614 f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
1617 else if( lChargeXi > 0 && lAssoOmegaPlus){
1618 fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus );
1619 fHistAsMCGenPtOmegaPlus ->Fill( lmcPt );
1620 fHistAsMCGenYOmegaPlus ->Fill( lmcRapXi );
1621 f2dHistAsMCGenYVsGenPtOmegaPlus ->Fill( lmcRapXi, lmcPt );
1622 fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta );
1623 f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
1624 f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
1628 }// End of loop over reconstructed cascades
1633 // Post output data.
1634 PostData(1, fListHistCascade);
1646 //________________________________________________________________________
1647 void AliAnalysisTaskCheckPerformanceCascade::Terminate(Option_t *)
1649 // Draw result to the screen
1650 // Called once at the end of the query
1652 fHistMCTrackMultiplicity = dynamic_cast<TH1F*> ( ((TList*)GetOutputData(1))->FindObject("fHistMCTrackMultiplicity") );
1653 if (!fHistMCTrackMultiplicity) {
1654 Printf("ERROR: fHistMCTrackMultiplicity not available");
1659 TCanvas *c2 = new TCanvas("AliAnalysisTaskCheckPerformanceCascade","Multiplicity",10,10,510,510);
1660 c2->cd(1)->SetLogy();
1662 fHistMCTrackMultiplicity->SetMarkerStyle(22);
1663 fHistMCTrackMultiplicity->DrawCopy("E");
1664 // fHistV0Multiplicity->SetMarkerStyle(26);
1665 // fHistV0Multiplicity->DrawCopy("ESAME");