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.
18 // Use with AOD tree = under development
19 // Origin : A.Maire Mar2009, antonin.maire@ires.in2p3.fr
20 // Modified : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
21 //-----------------------------------------------------------------
24 #include <Riostream.h>
31 #include "TParticle.h"
35 #include "AliHeader.h"
36 #include "AliMCEvent.h"
38 #include "AliMultiplicity.h"
39 #include "AliInputEventHandler.h"
40 #include "AliAnalysisManager.h"
42 #include "AliCFContainer.h"
43 #include "AliESDpid.h"
44 // #include "AliV0vertexer.h"
45 // #include "AliCascadeVertexer.h"
46 #include "AliESDEvent.h"
47 #include "AliESDcascade.h"
49 #include "AliAODEvent.h"
51 #include "AliAnalysisTaskCheckPerformanceCascade.h"
53 ClassImp(AliAnalysisTaskCheckPerformanceCascade)
57 //_____Dummy constructor________________________________________________________________
58 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade()
59 : AliAnalysisTaskSE(), // <- take care to AliAnalysisTask( empty )
60 fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), /*fPaveTextBookKeeping(0),*/
61 fkRerunV0CascVertexers (0),
62 fkQualityCutZprimVtxPos (kTRUE),
63 fkQualityCutNoTPConlyPrimVtx(kTRUE),
64 fkQualityCutTPCrefit (kTRUE),
65 fkQualityCut80TPCcls (kTRUE),
66 fkExtraSelections (0),
68 // - Cascade part initialisation
70 fHistMCTrackMultiplicity(0),
73 fHistEtaGenAntiProton(0),
76 fHistEtaGenCascXiMinus(0),
77 f2dHistGenPtVsGenYGenXiMinus(0),
79 fHistThetaGenCascXiMinus(0),
80 f2dHistGenPtVsGenYFdblXiMinus(0),
82 fHistThetaLambdaXiMinus(0),
83 fHistThetaBachXiMinus(0),
85 fHistThetaMesDghterXiMinus(0),
86 fHistThetaBarDghterXiMinus(0),
88 fHistPtBachXiMinus(0),
89 fHistPtMesDghterXiMinus(0),
90 fHistPtBarDghterXiMinus(0),
94 fHistEtaGenCascXiPlus(0),
95 f2dHistGenPtVsGenYGenXiPlus(0),
97 fHistThetaGenCascXiPlus(0),
98 f2dHistGenPtVsGenYFdblXiPlus(0),
100 fHistThetaLambdaXiPlus(0),
101 fHistThetaBachXiPlus(0),
103 fHistThetaMesDghterXiPlus(0),
104 fHistThetaBarDghterXiPlus(0),
106 fHistPtBachXiPlus(0),
107 fHistPtMesDghterXiPlus(0),
108 fHistPtBarDghterXiPlus(0),
111 fHistEtaGenCascOmegaMinus(0),
112 f2dHistGenPtVsGenYGenOmegaMinus(0),
114 fHistThetaGenCascOmegaMinus(0),
115 f2dHistGenPtVsGenYFdblOmegaMinus(0),
117 fHistThetaLambdaOmegaMinus(0),
118 fHistThetaBachOmegaMinus(0),
120 fHistThetaMesDghterOmegaMinus(0),
121 fHistThetaBarDghterOmegaMinus(0),
123 fHistPtBachOmegaMinus(0),
124 fHistPtMesDghterOmegaMinus(0),
125 fHistPtBarDghterOmegaMinus(0),
129 fHistEtaGenCascOmegaPlus(0),
130 f2dHistGenPtVsGenYGenOmegaPlus(0),
132 fHistThetaGenCascOmegaPlus(0),
133 f2dHistGenPtVsGenYFdblOmegaPlus(0),
135 fHistThetaLambdaOmegaPlus(0),
136 fHistThetaBachOmegaPlus(0),
138 fHistThetaMesDghterOmegaPlus(0),
139 fHistThetaBarDghterOmegaPlus(0),
141 fHistPtBachOmegaPlus(0),
142 fHistPtMesDghterOmegaPlus(0),
143 fHistPtBarDghterOmegaPlus(0),
145 // Part 2 - Association to MC
149 fHistMassOmegaMinus(0),
150 fHistMassOmegaPlus(0),
152 // - Effective mass histos with combined PID
153 fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0),
154 fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0),
156 // - PID Probability versus MC Pt(bachelor track)
157 f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),
159 // - Effective mass histos with perfect MC PID on the bachelor
160 fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),
161 fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),
164 // - Effective mass histos for the cascade candidates associated with MC
165 fHistAsMCMassXiMinus(0),
166 fHistAsMCMassXiPlus(0),
167 fHistAsMCMassOmegaMinus(0),
168 fHistAsMCMassOmegaPlus(0),
170 // - Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
171 f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),
172 f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),
173 f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),
174 f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),
176 // - Generated Pt Vs generated y, for the cascade candidates associated with MC
177 f2dHistAsMCGenPtVsGenYXiMinus(0),
178 f2dHistAsMCGenPtVsGenYXiPlus(0),
179 f2dHistAsMCGenPtVsGenYOmegaMinus(0),
180 f2dHistAsMCGenPtVsGenYOmegaPlus(0),
182 // - Generated Eta of the the cascade candidates associated with MC
183 fHistAsMCGenEtaXiMinus(0),
184 fHistAsMCGenEtaXiPlus(0),
185 fHistAsMCGenEtaOmegaMinus(0),
186 fHistAsMCGenEtaOmegaPlus(0),
188 // - Resolution in Pt as function of generated Pt
189 f2dHistAsMCResPtXiMinus(0),
190 f2dHistAsMCResPtXiPlus(0),
191 f2dHistAsMCResPtOmegaMinus(0),
192 f2dHistAsMCResPtOmegaPlus(0),
194 // - Resolution in R(2D) as function of generated R
195 f2dHistAsMCResRXiMinus(0),
196 f2dHistAsMCResRXiPlus(0),
197 f2dHistAsMCResROmegaMinus(0),
198 f2dHistAsMCResROmegaPlus(0),
200 fCFContCascadePIDAsXiMinus(0),
201 fCFContCascadePIDAsXiPlus(0),
202 fCFContCascadePIDAsOmegaMinus(0),
203 fCFContCascadePIDAsOmegaPlus(0),
205 fCFContAsCascadeCuts(0)
209 for(Int_t iAlephIdx = 0; iAlephIdx < 5; iAlephIdx++ ) { fAlephParameters [iAlephIdx] = -1.; }
210 for(Int_t iV0selIdx = 0; iV0selIdx < 7; iV0selIdx++ ) { fV0Sels [iV0selIdx ] = -1.; }
211 for(Int_t iCascSelIdx = 0; iCascSelIdx < 8; iCascSelIdx++ ) { fCascSels [iCascSelIdx ] = -1.; }
217 //_____Non-default Constructor________________________________________________________________
218 AliAnalysisTaskCheckPerformanceCascade::AliAnalysisTaskCheckPerformanceCascade(const char *name)
219 : AliAnalysisTaskSE(name),
220 fDebugCascade(0), fAnalysisType("ESD"), fCollidingSystems(0), fESDpid(0), /*fPaveTextBookKeeping(0),*/
221 fkRerunV0CascVertexers (0),
222 fkQualityCutZprimVtxPos (kTRUE),
223 fkQualityCutNoTPConlyPrimVtx(kTRUE),
224 fkQualityCutTPCrefit (kTRUE),
225 fkQualityCut80TPCcls (kTRUE),
226 fkExtraSelections (0),
228 // - Cascade part initialisation
230 fHistMCTrackMultiplicity(0),
232 fHistEtaGenProton(0),
233 fHistEtaGenAntiProton(0),
236 fHistEtaGenCascXiMinus(0),
237 f2dHistGenPtVsGenYGenXiMinus(0),
239 fHistThetaGenCascXiMinus(0),
240 f2dHistGenPtVsGenYFdblXiMinus(0),
242 fHistThetaLambdaXiMinus(0),
243 fHistThetaBachXiMinus(0),
245 fHistThetaMesDghterXiMinus(0),
246 fHistThetaBarDghterXiMinus(0),
248 fHistPtBachXiMinus(0),
249 fHistPtMesDghterXiMinus(0),
250 fHistPtBarDghterXiMinus(0),
254 fHistEtaGenCascXiPlus(0),
255 f2dHistGenPtVsGenYGenXiPlus(0),
257 fHistThetaGenCascXiPlus(0),
258 f2dHistGenPtVsGenYFdblXiPlus(0),
260 fHistThetaLambdaXiPlus(0),
261 fHistThetaBachXiPlus(0),
263 fHistThetaMesDghterXiPlus(0),
264 fHistThetaBarDghterXiPlus(0),
266 fHistPtBachXiPlus(0),
267 fHistPtMesDghterXiPlus(0),
268 fHistPtBarDghterXiPlus(0),
271 fHistEtaGenCascOmegaMinus(0),
272 f2dHistGenPtVsGenYGenOmegaMinus(0),
274 fHistThetaGenCascOmegaMinus(0),
275 f2dHistGenPtVsGenYFdblOmegaMinus(0),
277 fHistThetaLambdaOmegaMinus(0),
278 fHistThetaBachOmegaMinus(0),
280 fHistThetaMesDghterOmegaMinus(0),
281 fHistThetaBarDghterOmegaMinus(0),
283 fHistPtBachOmegaMinus(0),
284 fHistPtMesDghterOmegaMinus(0),
285 fHistPtBarDghterOmegaMinus(0),
289 fHistEtaGenCascOmegaPlus(0),
290 f2dHistGenPtVsGenYGenOmegaPlus(0),
292 fHistThetaGenCascOmegaPlus(0),
293 f2dHistGenPtVsGenYFdblOmegaPlus(0),
295 fHistThetaLambdaOmegaPlus(0),
296 fHistThetaBachOmegaPlus(0),
298 fHistThetaMesDghterOmegaPlus(0),
299 fHistThetaBarDghterOmegaPlus(0),
301 fHistPtBachOmegaPlus(0),
302 fHistPtMesDghterOmegaPlus(0),
303 fHistPtBarDghterOmegaPlus(0),
305 // Part 2 - Association to MC
309 fHistMassOmegaMinus(0),
310 fHistMassOmegaPlus(0),
312 // - Effective mass histos with combined PID
313 fHistMassWithCombPIDXiMinus(0), fHistMassWithCombPIDXiPlus(0),
314 fHistMassWithCombPIDOmegaMinus(0), fHistMassWithCombPIDOmegaPlus(0),
316 // - PID Probability versus MC Pt(bachelor track)
317 f2dHistPIDprobaKaonVsMCPtBach(0), f2dHistPIDprobaPionVsMCPtBach(0),
319 // - Effective mass histos with perfect MC PID on the bachelor
320 fHistMassWithMcPIDXiMinus(0), fHistMassWithMcPIDXiPlus(0),
321 fHistMassWithMcPIDOmegaMinus(0), fHistMassWithMcPIDOmegaPlus(0),
324 // - Effective mass histos for the cascade candidates associated with MC
325 fHistAsMCMassXiMinus(0),
326 fHistAsMCMassXiPlus(0),
327 fHistAsMCMassOmegaMinus(0),
328 fHistAsMCMassOmegaPlus(0),
330 // - Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
331 f2dHistAsMCandCombPIDGenPtVsGenYXiMinus(0),
332 f2dHistAsMCandCombPIDGenPtVsGenYXiPlus(0),
333 f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus(0),
334 f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus(0),
336 // - Generated Pt Vs generated y, for the cascade candidates associated with MC
337 f2dHistAsMCGenPtVsGenYXiMinus(0),
338 f2dHistAsMCGenPtVsGenYXiPlus(0),
339 f2dHistAsMCGenPtVsGenYOmegaMinus(0),
340 f2dHistAsMCGenPtVsGenYOmegaPlus(0),
342 // - Generated Eta of the the cascade candidates associated with MC
343 fHistAsMCGenEtaXiMinus(0),
344 fHistAsMCGenEtaXiPlus(0),
345 fHistAsMCGenEtaOmegaMinus(0),
346 fHistAsMCGenEtaOmegaPlus(0),
348 // - Resolution in Pt as function of generated Pt
349 f2dHistAsMCResPtXiMinus(0),
350 f2dHistAsMCResPtXiPlus(0),
351 f2dHistAsMCResPtOmegaMinus(0),
352 f2dHistAsMCResPtOmegaPlus(0),
354 // - Resolution in R(2D) as function of generated R
355 f2dHistAsMCResRXiMinus(0),
356 f2dHistAsMCResRXiPlus(0),
357 f2dHistAsMCResROmegaMinus(0),
358 f2dHistAsMCResROmegaPlus(0),
360 fCFContCascadePIDAsXiMinus(0),
361 fCFContCascadePIDAsXiPlus(0),
362 fCFContCascadePIDAsOmegaMinus(0),
363 fCFContCascadePIDAsOmegaPlus(0),
365 fCFContAsCascadeCuts(0)
370 // Define input and output slots here
371 // Input slot #0 works with a TChain
372 // Output slot #1 writes into a TList container (cascade)
374 for(Int_t iAlephIdx = 0; iAlephIdx < 5; iAlephIdx++ ) { fAlephParameters [iAlephIdx] = -1.; }
376 fV0Sels[0] = 33. ; // max allowed chi2
377 fV0Sels[1] = 0.01; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05)
378 fV0Sels[2] = 0.01; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05)
379 fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5)
380 fV0Sels[4] = 0.0 ; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99)
381 fV0Sels[5] = 0.2 ; // min radius of the fiducial volume (LHC09a4 : 0.2)
382 fV0Sels[6] = 100. ; // max radius of the fiducial volume (LHC09a4 : 100.0)
384 fCascSels[0] = 33. ; // max allowed chi2 (same as PDC07)
385 fCascSels[1] = 0.01 ; // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 )
386 fCascSels[2] = 0.008; // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 )
387 fCascSels[3] = 0.01 ; // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 )
388 fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 )
389 fCascSels[5] = 0.98 ; // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 )
390 fCascSels[6] = 0.2 ; // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 )
391 fCascSels[7] = 100. ; // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 )
394 DefineOutput(1, TList::Class());
399 AliAnalysisTaskCheckPerformanceCascade::~AliAnalysisTaskCheckPerformanceCascade()
405 // For all TH1, 2, 3 HnSparse and CFContainer are in the fListCascade TList.
406 // They will be deleted when fListCascade is deleted by the TSelector dtor
407 // Because of TList::SetOwner()
409 if (fListHistCascade) { delete fListHistCascade; fListHistCascade = 0x0; }
410 if (fESDpid) { delete fESDpid; fESDpid = 0x0;} // fESDpid is not stored into the TList
411 /*if (fPaveTextBookKeeping) { delete fPaveTextBookKeeping; fPaveTextBookKeeping = 0x0; } // fPaveTextBookKeeping is not stored into the TList*/
415 //________________________________________________________________________
416 void AliAnalysisTaskCheckPerformanceCascade::UserCreateOutputObjects()
423 AliLog::SetGlobalLogLevel(AliLog::kError);
424 // to suppress the extensive info prompted by a run with MC
426 // Definition of the output datamembers
427 fListHistCascade = new TList();
428 fListHistCascade->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner
432 // Reasonable parameters extracted for p-p simulation (LHC09a4) - A.Kalweit
433 // fAlephParameters[0] = 4.23232575531564326e+00/50;//50*0.76176e-1;
434 // fAlephParameters[1] = 8.68482806165147636e+00;//10.632;
435 // fAlephParameters[2] = 1.34000000000000005e-05;//0.13279e-4;
436 // fAlephParameters[3] = 2.30445734159456084e+00;//1.8631;
437 // fAlephParameters[4] = 2.25624744086878559e+00;//1.9479;
439 // Param for LHC09d10 prod - A.Kalweit
440 fAlephParameters[0] = 2.15898e+00/50.;
441 fAlephParameters[1] = 1.75295e+01;
442 fAlephParameters[2] = 3.40030e-09;
443 fAlephParameters[3] = 1.96178e+00;
444 fAlephParameters[4] = 3.91720e+00;
446 fESDpid = new AliESDpid();
447 fESDpid->GetTPCResponse().SetBetheBlochParameters( fAlephParameters[0],
451 fAlephParameters[4] );
455 if( !fPaveTextBookKeeping){
456 fPaveTextBookKeeping = new TPaveText(0.1, 0.1, 0.9, 0.9,"NDC");
457 fPaveTextBookKeeping->SetName("fPaveTextBookKeeping");
458 fPaveTextBookKeeping->SetBorderSize(0);
459 fPaveTextBookKeeping->SetTextAlign(12);
460 fPaveTextBookKeeping->SetFillColor(kWhite);
461 fPaveTextBookKeeping->SetTextFont(42); // regular Arial or Helvetica,
462 fPaveTextBookKeeping->SetTextColor(kGray+3);
465 fPaveTextBookKeeping->AddText( "Task CHECK PERFORMANCE CASCADE analysis" );
466 fPaveTextBookKeeping->AddText("- - - - - - - - - - - ");
467 fPaveTextBookKeeping->AddText( Form("AnalysisType : %s ", fAnalysisType.Data() ));
468 if(!fCollidingSystems) fPaveTextBookKeeping->AddText("Colliding system : p-p collisions ");
469 else fPaveTextBookKeeping->AddText("Colliding system : A-A collisions ");
471 fPaveTextBookKeeping->AddText("- - - - - - - - - - - ");
473 if(fkRerunV0CascVertexers){
474 fPaveTextBookKeeping->AddText("A.1. With V0 vertexer : ");
475 fPaveTextBookKeeping->AddText( Form(" - V0 #chi^{2} _________________ < %.3f ", fV0Sels[0] ));
476 fPaveTextBookKeeping->AddText( Form(" - DCA(prim. Vtx/ 1^{st} daughter) ___ > %.3f cm ", fV0Sels[1] ));
477 fPaveTextBookKeeping->AddText( Form(" - DCA(prim. Vtx/ 2^{nd} daughter) __ > %.3f cm", fV0Sels[2] ));
478 fPaveTextBookKeeping->AddText( Form(" - DCA between V0 daughters ___ < %.3f cm", fV0Sels[3] ));
479 fPaveTextBookKeeping->AddText( Form(" - cos(V0 pointing angle) _______ > %.3f ", fV0Sels[4] ));
480 fPaveTextBookKeeping->AddText( Form(" - R_{transv}(V0 decay) ________ > %.3f cm", fV0Sels[5] ));
481 fPaveTextBookKeeping->AddText( Form(" - R_{transv}(V0 decay) ________ < %.3f cm", fV0Sels[6] ));
483 fPaveTextBookKeeping->AddText(" ");
485 fPaveTextBookKeeping->AddText("A.2. With Casc. vertexer : ");
486 fPaveTextBookKeeping->AddText( Form(" - Casc. #chi^{2} ______________ < %.3f ", fCascSels[0] ));
487 fPaveTextBookKeeping->AddText( Form(" - DCA(prim. Vtx/ V0) _________ > %.3f cm", fCascSels[1] ));
488 fPaveTextBookKeeping->AddText( Form(" - | M_{#Lambda}(reco) - M_{#Lambda}(pdg) | _______ < %.3f GeV/c^{2}", fCascSels[2] ));
489 fPaveTextBookKeeping->AddText( Form(" - DCA(prim. Vtx/ Bach) _______ > %.3f cm", fCascSels[3] ));
490 fPaveTextBookKeeping->AddText( Form(" - DCA between Bach/ #Lambda ______ < %.3f cm", fCascSels[4] ));
491 fPaveTextBookKeeping->AddText( Form(" - cos(Casc. pointing angle) ____ > %.3f ", fCascSels[5] ));
492 fPaveTextBookKeeping->AddText( Form(" - R_{transv}(Casc. decay) ______ > %.3f cm", fCascSels[6] ));
493 fPaveTextBookKeeping->AddText( Form(" - R_{transv}(Casc. decay) ______ < %.3f cm", fCascSels[7] ));
495 else{ fPaveTextBookKeeping->AddText("A. No rerunning of the V0/Casc. vertexers ... See std cuts in (AliRoot+Rec.C) used for this prod. cycle");}
497 fPaveTextBookKeeping->AddText("- - - - - - - - - - - ");
499 if(fkQualityCutZprimVtxPos) fPaveTextBookKeeping->AddText("B. Quality Cut(prim. Vtx z-Pos) = ON ");
500 else fPaveTextBookKeeping->AddText("B. Quality Cut(prim. Vtx z-Pos) = Off ");
501 if(fkQualityCutNoTPConlyPrimVtx) fPaveTextBookKeeping->AddText("C. Quality Cut(No TPC prim. vtx) = ON ");
502 else fPaveTextBookKeeping->AddText("C. Quality Cut(No TPC prim. vtx) = Off ");
503 if(fkQualityCutTPCrefit) fPaveTextBookKeeping->AddText("D. Quality Cut(TPCrefit) = ON ");
504 else fPaveTextBookKeeping->AddText("D. Quality Cut(TPCrefit) = Off ");
505 if(fkQualityCut80TPCcls) fPaveTextBookKeeping->AddText("E. Quality Cut(80 TPC clusters) = ON ");
506 else fPaveTextBookKeeping->AddText("E. Quality Cut(80 TPC clusters) = Off ");
507 if(fkExtraSelections) fPaveTextBookKeeping->AddText("F. Extra Analysis Selections = ON ");
508 else fPaveTextBookKeeping->AddText("F. Extra Analysis Selections = Off ");
510 fPaveTextBookKeeping->AddText("- - - - - - - - - - - ");
512 fPaveTextBookKeeping->AddText("G. TPC Aleph Param : ");
513 fPaveTextBookKeeping->AddText( Form(" - fAlephParam [0] = %.5g", fAlephParameters[0] ));
514 fPaveTextBookKeeping->AddText( Form(" - fAlephParam [1] = %.5g", fAlephParameters[1] ));
515 fPaveTextBookKeeping->AddText( Form(" - fAlephParam [2] = %.5g", fAlephParameters[2] ));
516 fPaveTextBookKeeping->AddText( Form(" - fAlephParam [3] = %.5g", fAlephParameters[3] ));
517 fPaveTextBookKeeping->AddText( Form(" - fAlephParam [4] = %.5g", fAlephParameters[4] ));
519 fListHistCascade->Add(fPaveTextBookKeeping);
525 if (!fHistMCTrackMultiplicity) {
526 fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "MC Track Multiplicity;Number of MC tracks;Events", 100, 0, 500);
527 // fHistMCTrackMultiplicity = new TH1F("fHistMCTrackMultiplicity", "Multiplicity distribution;Number of tracks;Events", 200, 0, 40000); //HERE
528 fListHistCascade->Add(fHistMCTrackMultiplicity);
531 if (!fHistEtaGenProton) {
532 fHistEtaGenProton = new TH1F("fHistEtaGenProton", "#eta of any gen. p^{+};#eta;Number of prim. protons", 200, -10, 10);
533 fListHistCascade->Add(fHistEtaGenProton);
536 if (!fHistEtaGenAntiProton) {
537 fHistEtaGenAntiProton = new TH1F("fHistEtaGenAntiProton", "#eta of any gen. #bar{p}^{-};#eta;Number of prim. #bar{p}", 200, -10, 10);
538 fListHistCascade->Add(fHistEtaGenAntiProton);
549 // - Pseudo-Rapidity distribution
550 if (!fHistEtaGenCascXiMinus) {
551 fHistEtaGenCascXiMinus = new TH1F("fHistEtaGenCascXiMinus", "#eta of any gen. #Xi^{-};#eta;Number of Casc", 200, -10, 10);
552 fListHistCascade->Add(fHistEtaGenCascXiMinus);
555 if (!f2dHistGenPtVsGenYGenXiMinus) {
556 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);
557 fListHistCascade->Add(f2dHistGenPtVsGenYGenXiMinus);
561 // - Info at the generation level of multi-strange particle
563 if (!fHistThetaGenCascXiMinus) {
564 fHistThetaGenCascXiMinus = new TH1F("fHistThetaGenCascXiMinus", "#theta of gen. #Xi^{-};#theta;Number of Casc.", 200, -10, 190);
565 fListHistCascade->Add(fHistThetaGenCascXiMinus);
568 if (!f2dHistGenPtVsGenYFdblXiMinus) {
569 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);
570 fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiMinus);
573 // - Theta distribution the daughters (control plots)
575 if (!fHistThetaLambdaXiMinus) {
576 fHistThetaLambdaXiMinus = new TH1F("fHistThetaLambdaXiMinus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda^0", 200, -10, 190);
577 fListHistCascade->Add(fHistThetaLambdaXiMinus);
580 if (!fHistThetaBachXiMinus) {
581 fHistThetaBachXiMinus = new TH1F("fHistThetaBachXiMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
582 fListHistCascade->Add(fHistThetaBachXiMinus);
585 if (!fHistThetaMesDghterXiMinus) {
586 fHistThetaMesDghterXiMinus = new TH1F("fHistThetaMesDghterXiMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
587 fListHistCascade->Add(fHistThetaMesDghterXiMinus);
590 if (!fHistThetaBarDghterXiMinus) {
591 fHistThetaBarDghterXiMinus = new TH1F("fHistThetaBarDghterXiMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
592 fListHistCascade->Add(fHistThetaBarDghterXiMinus);
595 // - Pt distribution (control plots)
597 if (!fHistPtBachXiMinus) {
598 fHistPtBachXiMinus = new TH1F("fHistPtBachXiMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
599 fListHistCascade->Add(fHistPtBachXiMinus);
602 if (!fHistPtMesDghterXiMinus) {
603 fHistPtMesDghterXiMinus = new TH1F("fHistPtMesDghterXiMinus", "p_{t} of gen. Meson #Lambda dghter;pt_{MesDght};Number of Mes.", 200, 0, 10);
604 fListHistCascade->Add(fHistPtMesDghterXiMinus);
607 if (!fHistPtBarDghterXiMinus) {
608 fHistPtBarDghterXiMinus = new TH1F("fHistPtBarDghterXiMinus", "p_{t} of gen. Baryon #Lambda dghter;pt_{BarDght};Number of Bar.", 200, 0, 10);
609 fListHistCascade->Add(fHistPtBarDghterXiMinus);
616 // - Pseudo-Rapidity distribution
617 if (!fHistEtaGenCascXiPlus) {
618 fHistEtaGenCascXiPlus = new TH1F("fHistEtaGenCascXiPlus", "#eta of any gen. #Xi^{+};#eta;Number of Casc", 200, -10, 10);
619 fListHistCascade->Add(fHistEtaGenCascXiPlus);
622 if (!f2dHistGenPtVsGenYGenXiPlus) {
623 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);
624 fListHistCascade->Add(f2dHistGenPtVsGenYGenXiPlus);
628 // - Info at the generation level of multi-strange particle
630 if (!fHistThetaGenCascXiPlus) {
631 fHistThetaGenCascXiPlus = new TH1F("fHistThetaGenCascXiPlus", "#theta of gen. #Xi^{+};#theta;Number of Casc.", 200, -10, 190);
632 fListHistCascade->Add(fHistThetaGenCascXiPlus);
635 if (!f2dHistGenPtVsGenYFdblXiPlus) {
636 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);
637 fListHistCascade->Add(f2dHistGenPtVsGenYFdblXiPlus);
640 // - Theta distribution the daughters (control plots)
642 if (!fHistThetaLambdaXiPlus) {
643 fHistThetaLambdaXiPlus = new TH1F("fHistThetaLambdaXiPlus", "#theta of gen. #Lambda (Xi dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
644 fListHistCascade->Add(fHistThetaLambdaXiPlus);
647 if (!fHistThetaBachXiPlus) {
648 fHistThetaBachXiPlus = new TH1F("fHistThetaBachXiPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
649 fListHistCascade->Add(fHistThetaBachXiPlus);
652 if (!fHistThetaMesDghterXiPlus) {
653 fHistThetaMesDghterXiPlus = new TH1F("fHistThetaMesDghterXiPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
654 fListHistCascade->Add(fHistThetaMesDghterXiPlus);
657 if (!fHistThetaBarDghterXiPlus) {
658 fHistThetaBarDghterXiPlus = new TH1F("fHistThetaBarDghterXiPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
659 fListHistCascade->Add(fHistThetaBarDghterXiPlus);
662 // - Pt distribution (control plots)
664 if (!fHistPtBachXiPlus) {
665 fHistPtBachXiPlus = new TH1F("fHistPtBachXiPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
666 fListHistCascade->Add(fHistPtBachXiPlus);
669 if (!fHistPtMesDghterXiPlus) {
670 fHistPtMesDghterXiPlus = new TH1F("fHistPtMesDghterXiPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
671 fListHistCascade->Add(fHistPtMesDghterXiPlus);
674 if (!fHistPtBarDghterXiPlus) {
675 fHistPtBarDghterXiPlus = new TH1F("fHistPtBarDghterXiPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
676 fListHistCascade->Add(fHistPtBarDghterXiPlus);
682 // - Pseudo-Rapidity distribution
683 if (!fHistEtaGenCascOmegaMinus) {
684 fHistEtaGenCascOmegaMinus = new TH1F("fHistEtaGenCascOmegaMinus", "#eta of any gen. #Omega^{-};#eta;Number of Casc", 200, -10, 10);
685 fListHistCascade->Add(fHistEtaGenCascOmegaMinus);
688 if (!f2dHistGenPtVsGenYGenOmegaMinus) {
689 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);
690 fListHistCascade->Add(f2dHistGenPtVsGenYGenOmegaMinus);
694 // - Info at the generation level of multi-strange particle
696 if (!fHistThetaGenCascOmegaMinus) {
697 fHistThetaGenCascOmegaMinus = new TH1F("fHistThetaGenCascOmegaMinus", "#theta of gen. #Omega^{-};#theta;Number of Casc.", 200, -10, 190);
698 fListHistCascade->Add(fHistThetaGenCascOmegaMinus);
701 if (!f2dHistGenPtVsGenYFdblOmegaMinus) {
702 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);
703 fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaMinus);
706 // - Theta distribution the daughters (control plots)
708 if (!fHistThetaLambdaOmegaMinus) {
709 fHistThetaLambdaOmegaMinus = new TH1F("fHistThetaLambdaOmegaMinus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
710 fListHistCascade->Add(fHistThetaLambdaOmegaMinus);
713 if (!fHistThetaBachOmegaMinus) {
714 fHistThetaBachOmegaMinus = new TH1F("fHistThetaBachOmegaMinus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
715 fListHistCascade->Add(fHistThetaBachOmegaMinus);
718 if (!fHistThetaMesDghterOmegaMinus) {
719 fHistThetaMesDghterOmegaMinus = new TH1F("fHistThetaMesDghterOmegaMinus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
720 fListHistCascade->Add(fHistThetaMesDghterOmegaMinus);
723 if (!fHistThetaBarDghterOmegaMinus) {
724 fHistThetaBarDghterOmegaMinus = new TH1F("fHistThetaBarDghterOmegaMinus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
725 fListHistCascade->Add(fHistThetaBarDghterOmegaMinus);
728 // - Pt distribution (control plots)
730 if (!fHistPtBachOmegaMinus) {
731 fHistPtBachOmegaMinus = new TH1F("fHistPtBachOmegaMinus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
732 fListHistCascade->Add(fHistPtBachOmegaMinus);
735 if (!fHistPtMesDghterOmegaMinus) {
736 fHistPtMesDghterOmegaMinus = new TH1F("fHistPtMesDghterOmegaMinus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
737 fListHistCascade->Add(fHistPtMesDghterOmegaMinus);
740 if (!fHistPtBarDghterOmegaMinus) {
741 fHistPtBarDghterOmegaMinus = new TH1F("fHistPtBarDghterOmegaMinus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
742 fListHistCascade->Add(fHistPtBarDghterOmegaMinus);
748 // - Pseudo-Rapidity distribution
749 if (!fHistEtaGenCascOmegaPlus) {
750 fHistEtaGenCascOmegaPlus = new TH1F("fHistEtaGenCascOmegaPlus", "#eta of any gen. #Omega^{+};#eta;Number of Casc", 200, -10, 10);
751 fListHistCascade->Add(fHistEtaGenCascOmegaPlus);
754 if (!f2dHistGenPtVsGenYGenOmegaPlus) {
755 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);
756 fListHistCascade->Add(f2dHistGenPtVsGenYGenOmegaPlus);
761 // - Info at the generation level of multi-strange particle
763 if (!fHistThetaGenCascOmegaPlus) {
764 fHistThetaGenCascOmegaPlus = new TH1F("fHistThetaGenCascOmegaPlus", "#theta of gen. #Omega^{+};#theta;Number of Casc.", 200, -10, 190);
765 fListHistCascade->Add(fHistThetaGenCascOmegaPlus);
768 if (!f2dHistGenPtVsGenYFdblOmegaPlus) {
769 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);
770 fListHistCascade->Add(f2dHistGenPtVsGenYFdblOmegaPlus);
774 // - Theta distribution the daughters (control plots)
776 if (!fHistThetaLambdaOmegaPlus) {
777 fHistThetaLambdaOmegaPlus = new TH1F("fHistThetaLambdaOmegaPlus", "#theta of gen. #Lambda (Omega dghter);#theta_{#Lambda};Number of #Lambda", 200, -10, 190);
778 fListHistCascade->Add(fHistThetaLambdaOmegaPlus);
781 if (!fHistThetaBachOmegaPlus) {
782 fHistThetaBachOmegaPlus = new TH1F("fHistThetaBachOmegaPlus", "#theta of gen. Bach.;#theta_{Bach};Number of Bach.", 200, -10, 190);
783 fListHistCascade->Add(fHistThetaBachOmegaPlus);
786 if (!fHistThetaMesDghterOmegaPlus) {
787 fHistThetaMesDghterOmegaPlus = new TH1F("fHistThetaMesDghterOmegaPlus", "#theta of gen. Meson #Lambda dghter;#theta_{MesDght};Number of Mes.", 200, -10, 190);
788 fListHistCascade->Add(fHistThetaMesDghterOmegaPlus);
791 if (!fHistThetaBarDghterOmegaPlus) {
792 fHistThetaBarDghterOmegaPlus = new TH1F("fHistThetaBarDghterOmegaPlus", "#theta of gen. Baryon #Lambda dghter;#theta_{BarDght};Number of Bar.", 200, -10, 190);
793 fListHistCascade->Add(fHistThetaBarDghterOmegaPlus);
796 // - Pt distribution (control plots)
798 if (!fHistPtBachOmegaPlus) {
799 fHistPtBachOmegaPlus = new TH1F("fHistPtBachOmegaPlus", "p_{t} of gen. Bach.;pt_{Bach};Number of Bach.", 200, 0, 10);
800 fListHistCascade->Add(fHistPtBachOmegaPlus);
803 if (!fHistPtMesDghterOmegaPlus) {
804 fHistPtMesDghterOmegaPlus = new TH1F("fHistPtMesDghterOmegaPlus", "p_{t} of gen. Meson #Lambda dghter);pt_{MesDght};Number of Mes.", 200, 0, 10);
805 fListHistCascade->Add(fHistPtMesDghterOmegaPlus);
808 if (!fHistPtBarDghterOmegaPlus) {
809 fHistPtBarDghterOmegaPlus = new TH1F("fHistPtBarDghterOmegaPlus", "p_{t} of gen. Baryon #Lambda dghter);pt_{BarDght};Number of Bar.", 200, 0, 10);
810 fListHistCascade->Add(fHistPtBarDghterOmegaPlus);
814 //--------------------------------------------------------------------------------
815 // Part 2 - Any reconstructed cascades + reconstructed cascades associated with MC
817 // - Effective mass histos for cascades candidates.
819 if (! fHistMassXiMinus) {
820 fHistMassXiMinus = new TH1F("fHistMassXiMinus","#Xi^{-} candidates;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
821 fListHistCascade->Add(fHistMassXiMinus);
824 if (! fHistMassXiPlus) {
825 fHistMassXiPlus = new TH1F("fHistMassXiPlus","#Xi^{+} candidates;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
826 fListHistCascade->Add(fHistMassXiPlus);
829 if (! fHistMassOmegaMinus) {
830 fHistMassOmegaMinus = new TH1F("fHistMassOmegaMinus","#Omega^{-} candidates;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
831 fListHistCascade->Add(fHistMassOmegaMinus);
834 if (! fHistMassOmegaPlus) {
835 fHistMassOmegaPlus = new TH1F("fHistMassOmegaPlus","#Omega^{+} candidates;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
836 fListHistCascade->Add(fHistMassOmegaPlus);
841 // - Effective mass histos with combined PID
843 if (! fHistMassWithCombPIDXiMinus) {
844 fHistMassWithCombPIDXiMinus = new TH1F("fHistMassWithCombPIDXiMinus","#Xi^{-} candidates, with Bach. comb. PID;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
845 fListHistCascade->Add(fHistMassWithCombPIDXiMinus);
848 if (! fHistMassWithCombPIDXiPlus) {
849 fHistMassWithCombPIDXiPlus = new TH1F("fHistMassWithCombPIDXiPlus","#Xi^{+} candidates, with Bach. comb. PID;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
850 fListHistCascade->Add(fHistMassWithCombPIDXiPlus);
853 if (! fHistMassWithCombPIDOmegaMinus) {
854 fHistMassWithCombPIDOmegaMinus = new TH1F("fHistMassWithCombPIDOmegaMinus","#Omega^{-} candidates, with Bach. comb. PID;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
855 fListHistCascade->Add(fHistMassWithCombPIDOmegaMinus);
858 if (! fHistMassWithCombPIDOmegaPlus) {
859 fHistMassWithCombPIDOmegaPlus = new TH1F("fHistMassWithCombPIDOmegaPlus","#Omega^{+} candidates, with Bach. comb. PID;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
860 fListHistCascade->Add(fHistMassWithCombPIDOmegaPlus);
863 // - PID Probability versus MC Pt(bachelor track)
864 if(! f2dHistPIDprobaKaonVsMCPtBach ){
865 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 );
866 fListHistCascade->Add(f2dHistPIDprobaKaonVsMCPtBach);
869 if(! f2dHistPIDprobaPionVsMCPtBach ){
870 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 );
871 fListHistCascade->Add(f2dHistPIDprobaPionVsMCPtBach);
875 // - Effective mass histos with perfect MC PID on the bachelor
877 if (! fHistMassWithMcPIDXiMinus) {
878 fHistMassWithMcPIDXiMinus = new TH1F("fHistMassWithMcPIDXiMinus","#Xi^{-} candidates, with Bach. MC PID;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
879 fListHistCascade->Add(fHistMassWithMcPIDXiMinus);
882 if (! fHistMassWithMcPIDXiPlus) {
883 fHistMassWithMcPIDXiPlus = new TH1F("fHistMassWithMcPIDXiPlus","#Xi^{+} candidates, with Bach. MC PID;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
884 fListHistCascade->Add(fHistMassWithMcPIDXiPlus);
887 if (! fHistMassWithMcPIDOmegaMinus) {
888 fHistMassWithMcPIDOmegaMinus = new TH1F("fHistMassWithMcPIDOmegaMinus","#Omega^{-} candidates, with Bach. MC PID;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
889 fListHistCascade->Add(fHistMassWithMcPIDOmegaMinus);
892 if (! fHistMassWithMcPIDOmegaPlus) {
893 fHistMassWithMcPIDOmegaPlus = new TH1F("fHistMassWithMcPIDOmegaPlus","#Omega^{+} candidates, with Bach. MC PID;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
894 fListHistCascade->Add(fHistMassWithMcPIDOmegaPlus);
898 // - Effective mass histos for cascades candidates ASSOCIATED with MC.
900 if (! fHistAsMCMassXiMinus) {
901 fHistAsMCMassXiMinus = new TH1F("fHistAsMCMassXiMinus","#Xi^{-} candidates associated to MC;M( #Lambda , #pi^{-} ) (GeV/c^{2});Counts", 200,1.2,2.0);
902 fListHistCascade->Add(fHistAsMCMassXiMinus);
905 if (! fHistAsMCMassXiPlus) {
906 fHistAsMCMassXiPlus = new TH1F("fHistAsMCMassXiPlus","#Xi^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , #pi^{+} ) (GeV/c^{2});Counts",200,1.2,2.0);
907 fListHistCascade->Add(fHistAsMCMassXiPlus);
910 if (! fHistAsMCMassOmegaMinus) {
911 fHistAsMCMassOmegaMinus = new TH1F("fHistAsMCMassOmegaMinus","#Omega^{-} candidates associated to MC;M( #Lambda , K^{-} ) (GeV/c^{2});Counts", 250,1.5,2.5);
912 fListHistCascade->Add(fHistAsMCMassOmegaMinus);
915 if (! fHistAsMCMassOmegaPlus) {
916 fHistAsMCMassOmegaPlus = new TH1F("fHistAsMCMassOmegaPlus","#Omega^{+} candidates associated to MC;M( #bar{#Lambda}^{0} , K^{+} ) (GeV/c^{2});Counts", 250,1.5,2.5);
917 fListHistCascade->Add(fHistAsMCMassOmegaPlus);
921 // - Generated Pt Vs generated Y of the cascade candidates associated with MC
922 // + having the proper maximum proba of combined PID for the bachelor
924 if (!f2dHistAsMCandCombPIDGenPtVsGenYXiMinus) {
925 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);
926 fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiMinus);
929 if (!f2dHistAsMCandCombPIDGenPtVsGenYXiPlus) {
930 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);
931 fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYXiPlus);
934 if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus) {
935 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);
936 fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus);
939 if (!f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus) {
940 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);
941 fListHistCascade->Add(f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus);
945 // - Generated Pt Vs Generated Y, for the cascade candidates associated with MC
947 if (!f2dHistAsMCGenPtVsGenYXiMinus) {
948 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);
949 fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiMinus );
952 if (!f2dHistAsMCGenPtVsGenYXiPlus) {
953 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);
954 fListHistCascade->Add(f2dHistAsMCGenPtVsGenYXiPlus );
957 if (!f2dHistAsMCGenPtVsGenYOmegaMinus) {
958 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);
959 fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaMinus );
962 if (!f2dHistAsMCGenPtVsGenYOmegaPlus) {
963 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);
964 fListHistCascade->Add(f2dHistAsMCGenPtVsGenYOmegaPlus );
968 // - Generated Eta of the the cascade candidates associated with MC
969 if (!fHistAsMCGenEtaXiMinus) {
970 fHistAsMCGenEtaXiMinus = new TH1F("fHistAsMCGenEtaXiMinus", "#eta of gen. #Xi^{-} (associated);#eta;Number of Casc", 100, -5, 5);
971 fListHistCascade->Add( fHistAsMCGenEtaXiMinus );
974 if (!fHistAsMCGenEtaXiPlus) {
975 fHistAsMCGenEtaXiPlus = new TH1F("fHistAsMCGenEtaXiPlus", "#eta of gen. #Xi^{+} (associated);#eta;Number of Casc", 100, -5, 5);
976 fListHistCascade->Add( fHistAsMCGenEtaXiPlus );
979 if (!fHistAsMCGenEtaOmegaMinus) {
980 fHistAsMCGenEtaOmegaMinus = new TH1F("fHistAsMCGenEtaOmegaMinus", "#eta of gen. #Omega^{-} (associated);#eta;Number of Casc", 100, -5, 5);
981 fListHistCascade->Add( fHistAsMCGenEtaOmegaMinus );
984 if (!fHistAsMCGenEtaOmegaPlus) {
985 fHistAsMCGenEtaOmegaPlus = new TH1F("fHistAsMCGenEtaOmegaPlus", "#eta of gen. #Omega^{+} (associated);#eta;Number of Casc", 100, -5, 5);
986 fListHistCascade->Add( fHistAsMCGenEtaOmegaPlus );
991 // - Resolution in Pt as function of generated Pt
993 if(! f2dHistAsMCResPtXiMinus) {
994 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);
995 fListHistCascade->Add(f2dHistAsMCResPtXiMinus);
998 if(! f2dHistAsMCResPtXiPlus) {
999 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);
1000 fListHistCascade->Add(f2dHistAsMCResPtXiPlus);
1003 if(! f2dHistAsMCResPtOmegaMinus) {
1004 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);
1005 fListHistCascade->Add(f2dHistAsMCResPtOmegaMinus);
1008 if(! f2dHistAsMCResPtOmegaPlus) {
1009 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);
1010 fListHistCascade->Add(f2dHistAsMCResPtOmegaPlus);
1013 // - Resolution in R(2D) as function of generated R
1015 if(! f2dHistAsMCResRXiMinus) {
1016 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);
1017 fListHistCascade->Add(f2dHistAsMCResRXiMinus);
1020 if(! f2dHistAsMCResRXiPlus) {
1021 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);
1022 fListHistCascade->Add(f2dHistAsMCResRXiPlus);
1025 if(! f2dHistAsMCResROmegaMinus) {
1026 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);
1027 fListHistCascade->Add(f2dHistAsMCResROmegaMinus);
1030 if(! f2dHistAsMCResROmegaPlus) {
1031 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);
1032 fListHistCascade->Add(f2dHistAsMCResROmegaPlus);
1039 if(! fCFContCascadePIDAsXiMinus) {
1040 const Int_t lNbSteps = 7 ;
1041 const Int_t lNbVariables = 4 ;
1043 //array for the number of bins in each dimension :
1044 Int_t lNbBinsPerVar[4];
1045 lNbBinsPerVar[0] = 200;
1046 lNbBinsPerVar[1] = 400;
1047 lNbBinsPerVar[2] = 48;
1048 lNbBinsPerVar[3] = 250;
1051 fCFContCascadePIDAsXiMinus = new AliCFContainer("fCFContCascadePIDAsXiMinus","Pt_{cascade} Vs M_{#Xi^{-} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
1053 //setting the bin limits (valid for v4-18-10-AN)
1054 fCFContCascadePIDAsXiMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
1055 fCFContCascadePIDAsXiMinus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
1056 fCFContCascadePIDAsXiMinus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity
1057 if(fCollidingSystems)
1058 fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity
1060 fCFContCascadePIDAsXiMinus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity
1062 // Setting the step title : one per PID case
1063 fCFContCascadePIDAsXiMinus->SetStepTitle(0, "No PID");
1064 fCFContCascadePIDAsXiMinus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track");
1065 fCFContCascadePIDAsXiMinus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks");
1066 fCFContCascadePIDAsXiMinus->SetStepTitle(3, "TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks");
1067 fCFContCascadePIDAsXiMinus->SetStepTitle(4, "Comb. PID / Bachelor");
1068 fCFContCascadePIDAsXiMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
1069 fCFContCascadePIDAsXiMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
1071 // Setting the variable title, per axis
1072 fCFContCascadePIDAsXiMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
1073 fCFContCascadePIDAsXiMinus->SetVarTitle(1, "M( #Lambda , #pi^{-} ) (GeV/c^{2})");
1074 fCFContCascadePIDAsXiMinus->SetVarTitle(2, "Y_{#Xi}");
1075 fCFContCascadePIDAsXiMinus->SetVarTitle(3, "TPCrefit track Multiplicity");
1077 fListHistCascade->Add(fCFContCascadePIDAsXiMinus);
1081 if(! fCFContCascadePIDAsXiPlus) {
1082 const Int_t lNbSteps = 7 ;
1083 const Int_t lNbVariables = 4 ;
1085 //array for the number of bins in each dimension :
1086 Int_t lNbBinsPerVar[4];
1087 lNbBinsPerVar[0] = 200;
1088 lNbBinsPerVar[1] = 400;
1089 lNbBinsPerVar[2] = 48;
1090 lNbBinsPerVar[3] = 250;
1093 fCFContCascadePIDAsXiPlus = new AliCFContainer("fCFContCascadePIDAsXiPlus","Pt_{cascade} Vs M_{#Xi^{+} candidates} Vs Y_{#Xi}", lNbSteps, lNbVariables, lNbBinsPerVar );
1096 //setting the bin limits (valid for v4-18-10-AN)
1097 fCFContCascadePIDAsXiPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
1098 fCFContCascadePIDAsXiPlus->SetBinLimits(1, 1.2 , 2.0 ); // Xi Effective mass
1099 fCFContCascadePIDAsXiPlus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity
1100 if(fCollidingSystems)
1101 fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity
1103 fCFContCascadePIDAsXiPlus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity
1105 // Setting the step title : one per PID case
1106 fCFContCascadePIDAsXiPlus->SetStepTitle(0, "No PID");
1107 fCFContCascadePIDAsXiPlus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track");
1108 fCFContCascadePIDAsXiPlus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks");
1109 fCFContCascadePIDAsXiPlus->SetStepTitle(3, "TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks");
1110 fCFContCascadePIDAsXiPlus->SetStepTitle(4, "Comb. PID / Bachelor");
1111 fCFContCascadePIDAsXiPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
1112 fCFContCascadePIDAsXiPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
1114 // Setting the variable title, per axis
1115 fCFContCascadePIDAsXiPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
1116 fCFContCascadePIDAsXiPlus->SetVarTitle(1, "M( #Lambda , #pi^{+} ) (GeV/c^{2})");
1117 fCFContCascadePIDAsXiPlus->SetVarTitle(2, "Y_{#Xi}");
1118 fCFContCascadePIDAsXiPlus->SetVarTitle(3, "TPCrefit track Multiplicity");
1120 fListHistCascade->Add(fCFContCascadePIDAsXiPlus);
1125 if(! fCFContCascadePIDAsOmegaMinus) {
1126 const Int_t lNbSteps = 7 ;
1127 const Int_t lNbVariables = 4 ;
1129 //array for the number of bins in each dimension :
1130 Int_t lNbBinsPerVar[4];
1131 lNbBinsPerVar[0] = 200;
1132 lNbBinsPerVar[1] = 500;
1133 lNbBinsPerVar[2] = 48;
1134 lNbBinsPerVar[3] = 250;
1137 fCFContCascadePIDAsOmegaMinus = new AliCFContainer("fCFContCascadePIDAsOmegaMinus","Pt_{cascade} Vs M_{#Omega^{-} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
1140 //setting the bin limits (valid for v4-18-10-AN)
1141 fCFContCascadePIDAsOmegaMinus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
1142 fCFContCascadePIDAsOmegaMinus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
1143 fCFContCascadePIDAsOmegaMinus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity
1144 if(fCollidingSystems)
1145 fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity
1147 fCFContCascadePIDAsOmegaMinus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity
1149 // Setting the step title : one per PID case
1150 fCFContCascadePIDAsOmegaMinus->SetStepTitle(0, "No PID");
1151 fCFContCascadePIDAsOmegaMinus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track");
1152 fCFContCascadePIDAsOmegaMinus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks");
1153 fCFContCascadePIDAsOmegaMinus->SetStepTitle(3, "TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks");
1154 fCFContCascadePIDAsOmegaMinus->SetStepTitle(4, "Comb. PID / Bachelor");
1155 fCFContCascadePIDAsOmegaMinus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
1156 fCFContCascadePIDAsOmegaMinus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
1158 // Setting the variable title, per axis
1159 fCFContCascadePIDAsOmegaMinus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
1160 fCFContCascadePIDAsOmegaMinus->SetVarTitle(1, "M( #Lambda , K^{-} ) (GeV/c^{2})");
1161 fCFContCascadePIDAsOmegaMinus->SetVarTitle(2, "Y_{#Omega}");
1162 fCFContCascadePIDAsOmegaMinus->SetVarTitle(3, "TPCrefit track Multiplicity");
1164 fListHistCascade->Add(fCFContCascadePIDAsOmegaMinus);
1168 if(! fCFContCascadePIDAsOmegaPlus) {
1169 const Int_t lNbSteps = 7 ;
1170 const Int_t lNbVariables = 4 ;
1172 //array for the number of bins in each dimension :
1173 Int_t lNbBinsPerVar[4];
1174 lNbBinsPerVar[0] = 200;
1175 lNbBinsPerVar[1] = 500;
1176 lNbBinsPerVar[2] = 48;
1177 lNbBinsPerVar[3] = 250;
1180 fCFContCascadePIDAsOmegaPlus = new AliCFContainer("fCFContCascadePIDAsOmegaPlus","Pt_{cascade} Vs M_{#Omega^{+} candidates} Vs Y_{#Omega}", lNbSteps, lNbVariables, lNbBinsPerVar );
1183 //setting the bin limits (valid for v4-18-10-AN)
1184 fCFContCascadePIDAsOmegaPlus->SetBinLimits(0, 0.0 , 10.0 ); // Pt(Cascade)
1185 fCFContCascadePIDAsOmegaPlus->SetBinLimits(1, 1.5 , 2.5 ); // Omega Effective mass
1186 fCFContCascadePIDAsOmegaPlus->SetBinLimits(2, -1.2 , 1.2 ); // Rapidity
1187 if(fCollidingSystems)
1188 fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 20000.0 ); // TPCrefitTrackMultiplicity
1190 fCFContCascadePIDAsOmegaPlus->SetBinLimits(3, 0.0, 250.0 ); // TPCrefitTrackMultiplicity
1192 // Setting the step title : one per PID case
1193 fCFContCascadePIDAsOmegaPlus->SetStepTitle(0, "No PID");
1194 fCFContCascadePIDAsOmegaPlus->SetStepTitle(1, "TPC PID / 3-#sigma cut on Bachelor track");
1195 fCFContCascadePIDAsOmegaPlus->SetStepTitle(2, "TPC PID / 3-#sigma cut on Bachelor+Baryon tracks");
1196 fCFContCascadePIDAsOmegaPlus->SetStepTitle(3, "TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks");
1197 fCFContCascadePIDAsOmegaPlus->SetStepTitle(4, "Comb. PID / Bachelor");
1198 fCFContCascadePIDAsOmegaPlus->SetStepTitle(5, "Comb. PID / Bachelor+Baryon");
1199 fCFContCascadePIDAsOmegaPlus->SetStepTitle(6, "Comb. PID / Bachelor+Baryon+Meson");
1201 // Setting the variable title, per axis
1202 fCFContCascadePIDAsOmegaPlus->SetVarTitle(0, "Pt_{cascade} (GeV/c)");
1203 fCFContCascadePIDAsOmegaPlus->SetVarTitle(1, "M( #Lambda , K^{+} ) (GeV/c^{2})");
1204 fCFContCascadePIDAsOmegaPlus->SetVarTitle(2, "Y_{#Omega}");
1205 fCFContCascadePIDAsOmegaPlus->SetVarTitle(3, "TPCrefit track Multiplicity");
1207 fListHistCascade->Add(fCFContCascadePIDAsOmegaPlus);
1211 // Part 3 : Towards the optimisation of topological selections -------
1212 if(! fCFContAsCascadeCuts){
1214 // Container meant to store all the relevant distributions corresponding to the cut variables.
1215 // So far, 20 variables have been identified.
1216 // The following will be done in quite a brut force way ...
1217 // FIXME Improvement expected later (before Pb-Pb data at least)
1218 // - Define a user binning to have less bins in each dimension
1219 // - boolean for enabling/disbaling this CFContainer
1220 const Int_t lNbSteps = 4 ;
1221 const Int_t lNbVariables = 20 ;
1223 //array for the number of bins in each dimension :
1224 Int_t lNbBinsPerVar[20];
1225 lNbBinsPerVar[0] = 25;
1226 lNbBinsPerVar[1] = 25;
1227 lNbBinsPerVar[2] = 20;
1228 lNbBinsPerVar[3] = 40;
1229 lNbBinsPerVar[4] = 50;
1230 lNbBinsPerVar[5] = 12;
1232 lNbBinsPerVar[6] = 20;
1233 lNbBinsPerVar[7] = 40;
1234 lNbBinsPerVar[8] = 40;
1235 lNbBinsPerVar[9] = 25;
1236 lNbBinsPerVar[10] = 25;
1238 lNbBinsPerVar[11] = 100; // 2-MeV/c2 bins
1239 lNbBinsPerVar[12] = 100; // 2-MeV/c2 bins
1241 lNbBinsPerVar[13] = 20;
1243 lNbBinsPerVar[14] = 44; // 0.05 in rapidity units
1244 lNbBinsPerVar[15] = 44; // 0.05 in rapidity units
1246 lNbBinsPerVar[16] = 20;
1248 lNbBinsPerVar[17] = 50;
1249 lNbBinsPerVar[18] = 50;
1250 lNbBinsPerVar[19] = 35;
1252 fCFContAsCascadeCuts = new AliCFContainer("fCFContAsCascadeCuts","Cut Container for Asso. Cascades", lNbSteps, lNbVariables, lNbBinsPerVar );
1255 //setting the bin limits (valid for v4-18-10-AN on)
1256 fCFContAsCascadeCuts->SetBinLimits(0, 0.0 , 0.25 ); // DcaXiDaughters
1257 fCFContAsCascadeCuts->SetBinLimits(1, 0.0 , 0.25 ); // DcaBachToPrimVertexXi
1258 fCFContAsCascadeCuts->SetBinLimits(2, 0.995, 1.0 ); // XiCosineOfPointingAngle
1259 fCFContAsCascadeCuts->SetBinLimits(3, 0.0 , 4.0 ); // XiRadius
1260 fCFContAsCascadeCuts->SetBinLimits(4, 1.1 , 1.15 ); // InvMassLambdaAsCascDghter
1261 fCFContAsCascadeCuts->SetBinLimits(5, 0.0 , 0.6 ); // DcaV0DaughtersXi
1262 fCFContAsCascadeCuts->SetBinLimits(6, 0.98 , 1.0 ); // V0CosineOfPointingAngleXi
1263 fCFContAsCascadeCuts->SetBinLimits(7, 0.0 , 20.0 ); // V0RadiusXi
1264 fCFContAsCascadeCuts->SetBinLimits(8, 0.0 , 1.0 ); // DcaV0ToPrimVertexXi
1265 fCFContAsCascadeCuts->SetBinLimits(9, 0.0 , 2.5 ); // DcaPosToPrimVertexXi
1266 fCFContAsCascadeCuts->SetBinLimits(10, 0.0 , 2.5 ); // DcaNegToPrimVertexXi
1267 fCFContAsCascadeCuts->SetBinLimits(11, 1.25 , 1.45 ); // InvMassXi
1268 fCFContAsCascadeCuts->SetBinLimits(12, 1.6 , 1.8 ); // InvMassOmega
1269 fCFContAsCascadeCuts->SetBinLimits(13, 0.0 , 10.0 ); // pt_MC(Xi)
1270 fCFContAsCascadeCuts->SetBinLimits(14, -1.1 , 1.1 ); // Y_MC(Xi)
1271 fCFContAsCascadeCuts->SetBinLimits(15, -1.1 , 1.1 ); // Y_MC(Omega)
1272 fCFContAsCascadeCuts->SetBinLimits(16, -10.0 , 10.0 ); // BestPrimaryVtxPosZ
1273 if(fCollidingSystems){
1274 fCFContAsCascadeCuts->SetBinLimits(17, 0.0, 10000.0 ); // TPCrefitTrackMultiplicity
1275 fCFContAsCascadeCuts->SetBinLimits(18, 0.0, 10000.0 ); // SPDTrackletsMultiplicity
1278 fCFContAsCascadeCuts->SetBinLimits(17, 0.0, 250.0 ); // TPCrefitTrackMultiplicity
1279 fCFContAsCascadeCuts->SetBinLimits(18, 0.0, 250.0 ); // SPDTrackletsMultiplicity
1281 fCFContAsCascadeCuts->SetBinLimits(19, 25.0 ,165.0 ); // BachTPCClusters
1285 // Setting the number of steps : one for each cascade species (Xi-, Xi+ and Omega-, Omega+)
1286 fCFContAsCascadeCuts->SetStepTitle(0, "#Xi^{-} candidates associated to MC");
1287 fCFContAsCascadeCuts->SetStepTitle(1, "#bar{#Xi}^{+} candidates associated to MC");
1288 fCFContAsCascadeCuts->SetStepTitle(2, "#Omega^{-} candidates associated to MC");
1289 fCFContAsCascadeCuts->SetStepTitle(3, "#bar{#Omega}^{+} candidates associated to MC");
1291 // Setting the variable title, per axis
1292 // fCFContAsCascadeCuts->SetVarTitle(40, "Chi2Xi");
1293 fCFContAsCascadeCuts->SetVarTitle(0, "Dca(XiDaughters) (cm)");
1294 fCFContAsCascadeCuts->SetVarTitle(1, "Dca(Bach/PrimVertex) (cm)");
1295 fCFContAsCascadeCuts->SetVarTitle(2, "cos(Xi pointing angle)");
1296 fCFContAsCascadeCuts->SetVarTitle(3, "R_{2d}(Xi decay) (cm)");
1297 fCFContAsCascadeCuts->SetVarTitle(4, "M_{#Lambda}(As Casc Dghter) (GeV/c^{2})");
1298 // fCFContAsCascadeCuts->SetVarTitle(40, "V0Chi2Xi");
1299 fCFContAsCascadeCuts->SetVarTitle(5, "Dca(V0 Daughters Xi) (cm)");
1301 fCFContAsCascadeCuts->SetVarTitle(6, "cos(V0 pointing Angle) in Casc");
1302 fCFContAsCascadeCuts->SetVarTitle(7, "R_{2d}(V0 decay) (cm)");
1303 fCFContAsCascadeCuts->SetVarTitle(8, "Dca(V0/PrimVertex) (cm)");
1304 fCFContAsCascadeCuts->SetVarTitle(9, "Dca(Pos/PrimVertex) (cm)");
1305 fCFContAsCascadeCuts->SetVarTitle(10, "Dca(Neg/PrimVertex) (cm)");
1307 fCFContAsCascadeCuts->SetVarTitle(11, "Inv. Mass(Xi) (GeV/c^{2})");
1308 fCFContAsCascadeCuts->SetVarTitle(12, "Inv. Mass(Omega) (GeV/c^{2})");
1310 fCFContAsCascadeCuts->SetVarTitle(13, "Pt_{MC}(Casc.) (GeV/c)");
1311 //fCFContAsCascadeCuts->SetVarTitle(40, "V0toXiCosineOfPointingAngle");
1313 fCFContAsCascadeCuts->SetVarTitle(14, "Y_{MC}(Xi)");
1314 fCFContAsCascadeCuts->SetVarTitle(15, "Y_{MC}(Omega)");
1316 fCFContAsCascadeCuts->SetVarTitle(16, "Z-position(BestPrimVtx) (cm)");
1318 fCFContAsCascadeCuts->SetVarTitle(17, "TPCrefit track Multiplicity");
1319 fCFContAsCascadeCuts->SetVarTitle(18, "SPD tracklets Multiplicity");
1320 fCFContAsCascadeCuts->SetVarTitle(19, "Bach.TPC Clusters");
1322 fListHistCascade->Add(fCFContAsCascadeCuts);
1326 PostData(1, fListHistCascade);
1327 }// end CreateOutputObjects
1334 //________________________________________________________________________
1335 void AliAnalysisTaskCheckPerformanceCascade::UserExec(Option_t *)
1339 // Called for each event
1341 AliESDEvent *lESDevent = 0x0;
1342 AliAODEvent *lAODevent = 0x0;
1343 AliMCEvent *lMCevent = 0x0;
1344 AliStack *lMCstack = 0x0;
1345 Int_t ncascades = -1;
1348 // Connect to the InputEvent
1349 // After these lines, we should have an ESD/AOD event + the number of cascades in it.
1351 if(fAnalysisType == "ESD"){
1352 lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() );
1354 Printf("ERROR: lESDevent not available \n");
1355 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; // or AliAnalysisTaskSE::CurrentFileName()
1360 else if(fAnalysisType == "AOD"){
1361 lAODevent = dynamic_cast<AliAODEvent*>( InputEvent() );
1363 Printf("ERROR: lAODevent not available \n");
1364 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
1370 lMCevent = MCEvent();
1372 Printf("ERROR: Could not retrieve MC event \n");
1373 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
1377 lMCstack = lMCevent->Stack();
1379 Printf("ERROR: Could not retrieve MC stack \n");
1380 cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
1386 // Temporary way : AOD awareness of the code to be developed FIXME
1387 if(fAnalysisType == "AOD") return;
1392 //-------------------------------------------------
1393 // 0 - Trigger managment + global event selection
1394 // NOTE : Check the availability of the proper trigger
1396 // Note : Presuppose the presence of AliPhysicsSelectionTask
1398 Bool_t isSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1399 if ( ! isSelected ) {
1400 PostData(1, fListHistCascade);
1403 //else Printf("Event selected ... \n");
1406 //-------------------------------------------------
1407 // 1 - Cascade vertexer (ESD)
1408 if(fkRerunV0CascVertexers){
1409 // if(fAnalysisType == "ESD" ){
1410 // lESDevent->ResetCascades();
1411 // lESDevent->ResetV0s();
1413 // AliV0vertexer lV0vtxer;
1414 // AliCascadeVertexer lCascVtxer;
1416 // lV0vtxer.SetDefaultCuts(fV0Sels);
1417 // lCascVtxer.SetDefaultCuts(fCascSels);
1419 // lV0vtxer.Tracks2V0vertices(lESDevent);
1420 // lCascVtxer.V0sTracks2CascadeVertices(lESDevent);
1425 //------------------------------------------------
1426 // 2 - Preparing the general info about of the event = prim. Vtx + magnetic field (ESD)
1429 // if(fAnalysisType == "ESD" ){
1432 const Double_t lMagneticField = lESDevent->GetMagneticField( );
1435 const AliESDVertex *lPrimaryTrackingVtx = lESDevent->GetPrimaryVertexTracks(); // get the vtx stored in ESD found with tracks
1436 const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD(); // get the vtx stored in ESD found with SPD tracklets
1438 const AliESDVertex *lPrimaryBestVtx = lESDevent->GetPrimaryVertex();
1439 // get the best primary vertex available for the event
1440 // As done in AliCascadeVertexer, we keep the one which is the best one available.
1441 // between : Tracking vertex > SPD vertex > TPC vertex > default SPD vertex
1442 Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
1443 lPrimaryBestVtx->GetXYZ( lBestPrimaryVtxPos );
1445 // FIXME : quality cut on the z-position of the prim vertex.
1446 if(fkQualityCutZprimVtxPos) {
1447 if(TMath::Abs(lBestPrimaryVtxPos[2]) > 10.0 ) {
1448 AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
1449 PostData(1, fListHistCascade);
1453 // FIXME : remove TPC-only primary vertex : retain only events with tracking + SPD vertex
1454 if(fkQualityCutNoTPConlyPrimVtx) {
1455 if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingVtx->GetStatus() ){
1456 AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !");
1457 PostData(1, fListHistCascade);
1464 // cout << "Name of the accessed file :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl;
1466 // cout << "Tree characteristics ..." << endl;
1467 // fInputHandler->GetTree()->Print("toponly");
1468 // fInputHandler->GetTree()->GetBranch("PrimaryVertex")->Print();
1469 // fInputHandler->GetTree()->GetBranch("SPDVertex")->Print();
1473 // ---------------------------------------------------------------
1474 // - Initialisation of the part dedicated to cascade vertices
1476 if(fAnalysisType == "ESD") ncascades = lESDevent->GetNumberOfCascades();
1477 else if(fAnalysisType == "AOD") ncascades = lAODevent->GetNumberOfCascades();
1480 Int_t iNumberOfPrimaries = -1;
1481 iNumberOfPrimaries = lMCstack->GetNprimary();
1483 if(iNumberOfPrimaries < 1) return;
1485 fHistMCTrackMultiplicity->Fill( lMCstack->GetNtrack() );
1489 for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++)
1490 {// This is the begining of the loop on primaries, for protons
1492 TParticle* lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
1493 if(!lCurrentParticle){
1494 Printf("Proton loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
1499 if( lCurrentParticle->GetPdgCode() == 2212 )
1500 fHistEtaGenProton->Fill( lCurrentParticle->Eta() );
1502 if( lCurrentParticle->GetPdgCode() == -2212 )
1503 fHistEtaGenAntiProton->Fill( lCurrentParticle->Eta() );
1504 }// end loop over primary proton
1509 //__________________________________________________________________________
1510 // Part 1 - Loop over the different types of GENERATED cascades (Xi-+, Omega-+)
1512 // - Initialisation of useful local variables
1514 Int_t lPdgCodeCasc = 0;
1515 Int_t lPdgCodeBach = 0;
1516 Int_t lPdgCodeLambda = 0;
1517 Int_t lPdgCodeDghtMesV0 = 0;
1518 Int_t lPdgCodeDghtBarV0 = 0;
1521 TH1F *lHistEtaGenCasc = 0;
1522 TH2F *l2dHistGenPtVsGenYGen = 0;
1524 TH1F *lHistThetaGenCasc = 0;
1525 TH2F *l2dHistGenPtVsGenYFdbl = 0;
1526 TH1F *lHistThetaLambda = 0;
1527 TH1F *lHistThetaBach = 0;
1528 TH1F *lHistThetaBarDghter = 0;
1529 TH1F *lHistThetaMesDghter = 0;
1530 TH1F *lHistPtBach = 0;
1531 TH1F *lHistPtBarDghter = 0;
1532 TH1F *lHistPtMesDghter = 0;
1535 for(Int_t iCascType = 1; iCascType < 5; iCascType++)
1541 lPdgCodeCasc = 3312; //Xi-
1542 lPdgCodeBach = -211; //Pi-
1543 lPdgCodeLambda = 3122; //Lambda0
1544 lPdgCodeDghtMesV0 = -211; //Pi-
1545 lPdgCodeDghtBarV0 = 2212; //Proton
1548 lHistEtaGenCasc = fHistEtaGenCascXiMinus;
1549 l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenXiMinus;
1551 // cascades generated within acceptance (cut in pt + theta)
1552 lHistThetaGenCasc = fHistThetaGenCascXiMinus;
1553 l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiMinus;
1554 lHistThetaLambda = fHistThetaLambdaXiMinus;
1555 lHistThetaBach = fHistThetaBachXiMinus;
1556 lHistThetaBarDghter = fHistThetaBarDghterXiMinus;
1557 lHistThetaMesDghter = fHistThetaMesDghterXiMinus;
1558 lHistPtBach = fHistPtBachXiMinus;
1559 lHistPtBarDghter = fHistPtBarDghterXiMinus;
1560 lHistPtMesDghter = fHistPtMesDghterXiMinus;
1564 lPdgCodeCasc = -3312; //Xi+
1565 lPdgCodeBach = 211; //Pi+
1566 lPdgCodeLambda = -3122; //AntiLambda0
1567 lPdgCodeDghtMesV0 = 211; //Pi+
1568 lPdgCodeDghtBarV0 = -2212; //AntiProton
1571 lHistEtaGenCasc = fHistEtaGenCascXiPlus;
1572 l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenXiPlus;
1574 // cascades generated within acceptance (cut in pt + theta)
1575 lHistThetaGenCasc = fHistThetaGenCascXiPlus;
1576 l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblXiPlus;
1577 lHistThetaLambda = fHistThetaLambdaXiPlus;
1578 lHistThetaBach = fHistThetaBachXiPlus;
1579 lHistThetaBarDghter = fHistThetaBarDghterXiPlus;
1580 lHistThetaMesDghter = fHistThetaMesDghterXiPlus;
1581 lHistPtBach = fHistPtBachXiPlus;
1582 lHistPtBarDghter = fHistPtBarDghterXiPlus;
1583 lHistPtMesDghter = fHistPtMesDghterXiPlus;
1587 lPdgCodeCasc = 3334; //Omega-
1588 lPdgCodeBach = -321; //K-
1589 lPdgCodeLambda = 3122; //Lambda0
1590 lPdgCodeDghtMesV0 = -211; //Pi-
1591 lPdgCodeDghtBarV0 = 2212; //Proton
1594 lHistEtaGenCasc = fHistEtaGenCascOmegaMinus;
1595 l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenOmegaMinus;
1597 // cascades generated within acceptance (cut in pt + theta)
1598 lHistThetaGenCasc = fHistThetaGenCascOmegaMinus;
1599 l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaMinus;
1600 lHistThetaLambda = fHistThetaLambdaOmegaMinus;
1601 lHistThetaBach = fHistThetaBachOmegaMinus;
1602 lHistThetaBarDghter = fHistThetaBarDghterOmegaMinus;
1603 lHistThetaMesDghter = fHistThetaMesDghterOmegaMinus;
1604 lHistPtBach = fHistPtBachOmegaMinus;
1605 lHistPtBarDghter = fHistPtBarDghterOmegaMinus;
1606 lHistPtMesDghter = fHistPtMesDghterOmegaMinus;
1610 lPdgCodeCasc = -3334; //Omega+
1611 lPdgCodeBach = 321; //K+
1612 lPdgCodeLambda = -3122; //AntiLambda0
1613 lPdgCodeDghtMesV0 = 211; //Pi+
1614 lPdgCodeDghtBarV0 = -2212; //AntiProton
1617 lHistEtaGenCasc = fHistEtaGenCascOmegaPlus;
1618 l2dHistGenPtVsGenYGen = f2dHistGenPtVsGenYGenOmegaPlus;
1620 // cascades generated within acceptance (cut in pt + theta)
1621 lHistThetaGenCasc = fHistThetaGenCascOmegaPlus;
1622 l2dHistGenPtVsGenYFdbl = f2dHistGenPtVsGenYFdblOmegaPlus;
1623 lHistThetaLambda = fHistThetaLambdaOmegaPlus;
1624 lHistThetaBach = fHistThetaBachOmegaPlus;
1625 lHistThetaBarDghter = fHistThetaBarDghterOmegaPlus;
1626 lHistThetaMesDghter = fHistThetaMesDghterOmegaPlus;
1627 lHistPtBach = fHistPtBachOmegaPlus;
1628 lHistPtBarDghter = fHistPtBarDghterOmegaPlus;
1629 lHistPtMesDghter = fHistPtMesDghterOmegaPlus;
1632 }// end switch cascade
1635 for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < iNumberOfPrimaries; iCurrentLabelStack++)
1636 {// This is the begining of the loop on primaries
1638 TParticle* lCurrentParticle = 0x0;
1639 lCurrentParticle = lMCstack->Particle( iCurrentLabelStack );
1640 if(!lCurrentParticle){
1641 Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
1646 if( lCurrentParticle->GetPdgCode() == lPdgCodeCasc ){ // Here !
1647 //cout << "Xi- within loop " << iCurrentLabelStack << "/ " << iNumberOfPrimaries << endl;
1649 // - Xi level ... _____________________________________________________________
1650 TParticle* xiMC = 0x0;
1651 xiMC = lCurrentParticle;
1653 Printf("MC TParticle pointer to Cascade = 0x0 ! Skip ...");
1658 // Fill the first histos : = any generated Xi, not necessarily within the acceptance
1659 Double_t lRapXiMC = 0.5*TMath::Log((xiMC->Energy() + xiMC->Pz()) / (xiMC->Energy() - xiMC->Pz() +1.e-13));
1661 lHistEtaGenCasc ->Fill( xiMC->Eta() );
1662 l2dHistGenPtVsGenYGen ->Fill( xiMC->Pt(), lRapXiMC );
1666 // Check the emission of particle stays within the acceptance of the detector (cut in theta)
1667 if( xiMC->Theta() < TMath::Pi()/4.0 || xiMC->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1668 if( xiMC->GetNDaughters() != 2) continue;
1669 if( xiMC->GetDaughter(0) < 0 ) continue;
1670 if( xiMC->GetDaughter(1) < 0 ) continue;
1672 TParticle* lDght0ofXi = lMCstack->Particle( xiMC->GetDaughter(0) );
1673 TParticle* lDght1ofXi = lMCstack->Particle( xiMC->GetDaughter(1) );
1675 TParticle* lLambda = 0;
1676 TParticle* lBach = 0;
1679 if( lDght0ofXi->GetPdgCode() == lPdgCodeLambda && // Here !
1680 lDght1ofXi->GetPdgCode() == lPdgCodeBach ){ // Here !
1682 lLambda = lDght0ofXi;
1684 }// end if dghter 0 = Lambda and dghter 1 = Pi-
1687 else if( lDght0ofXi->GetPdgCode() == lPdgCodeBach && // Here !
1688 lDght1ofXi->GetPdgCode() == lPdgCodeLambda ){ // Here !
1691 lLambda = lDght1ofXi;
1692 }// end if dghter 0 = Pi- and dghter 1 = Lambda
1694 // V0 otherwise - Case 3
1697 // Check the emission of particle stays within the acceptance of the detector (cut in pt + theta)
1698 if( lLambda->Theta() < TMath::Pi()/4.0 || lLambda->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1699 if( lBach->Theta() < TMath::Pi()/4.0 || lBach->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1701 if( lBach->Pt() < 0.2 ) continue; //FIXME : maybe tuned for Xi but not for K- from Omega ...
1705 // - V0 level ... _____________________________________________________________
1706 TParticle* lDghtBarV0 = 0;
1707 TParticle* lDghtMesV0 = 0;
1709 if( lLambda->GetNDaughters() != 2 ) continue;
1710 if( lLambda->GetDaughter(0) < 0 ) continue;
1711 if( lLambda->GetDaughter(1) < 0 ) continue;
1714 TParticle* lDght0ofLambda = lMCstack->Particle( lLambda->GetDaughter(0) );
1715 TParticle* lDght1ofLambda = lMCstack->Particle( lLambda->GetDaughter(1) );
1718 if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 && // Here !
1719 lDght1ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 ){ // Here !
1721 lDghtBarV0 = lDght0ofLambda;
1722 lDghtMesV0 = lDght1ofLambda;
1723 }// end if dghter 0 = Proton and dghter 1 = Pi-
1726 else if( lDght0ofLambda->GetPdgCode() == lPdgCodeDghtMesV0 && // Here !
1727 lDght1ofLambda->GetPdgCode() == lPdgCodeDghtBarV0 ){ // Here !
1729 lDghtMesV0 = lDght0ofLambda;
1730 lDghtBarV0 = lDght1ofLambda;
1731 }// end if dghter 0 = Pi- and dghter 1 = proton
1733 // V0 otherwise - Case 3
1737 // Check the emission of particle stays within the acceptance of the detector
1738 if( lDghtBarV0->Theta() < TMath::Pi()/4.0 || lDghtBarV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1739 if( lDghtMesV0->Theta() < TMath::Pi()/4.0 || lDghtMesV0->Theta() > 3.0*TMath::Pi()/4.0 ) continue;
1741 if( lDghtBarV0->Pt() < 0.3 ) continue;
1742 if( lDghtMesV0->Pt() < 0.2 ) continue;
1746 // - Just to know which file is currently open : locate the file containing Xi
1747 //cout << "Name of the file containing generated Xi :" << fInputHandler->GetTree()->GetCurrentFile()->GetName()
1750 Double_t lRadToDeg = 180.0/TMath::Pi();
1752 // - Filling histos ... _________________________________________________________________
1753 lHistThetaGenCasc ->Fill( lRadToDeg * xiMC->Theta() );
1754 l2dHistGenPtVsGenYFdbl ->Fill( xiMC->Pt(), lRapXiMC );
1756 // - Fill theta histos for Lambda and Bach
1757 lHistThetaLambda ->Fill( lRadToDeg * lLambda->Theta() );
1758 lHistThetaBach ->Fill( lRadToDeg * lBach->Theta() );
1760 // - Fill theta histos for V0 daughters
1761 lHistThetaBarDghter ->Fill( lRadToDeg * lDghtBarV0->Theta() );
1762 lHistThetaMesDghter ->Fill( lRadToDeg * lDghtMesV0->Theta() );
1764 // - Fill pt histos.
1765 lHistPtBach ->Fill( lBach->Pt() );
1766 lHistPtBarDghter ->Fill( lDghtBarV0->Pt() );
1767 lHistPtMesDghter ->Fill( lDghtMesV0->Pt() );
1769 }// end if current particle = Xi-
1771 }// This is the end of the loop on primaries
1773 // - Re-initialisation of the local TH1F pointers
1774 lHistEtaGenCasc = 0x0;
1775 l2dHistGenPtVsGenYGen = 0x0;
1777 lHistThetaGenCasc = 0x0;
1778 l2dHistGenPtVsGenYFdbl = 0x0;
1779 lHistThetaLambda = 0x0;
1780 lHistThetaBach = 0x0;
1781 lHistThetaBarDghter = 0x0;
1782 lHistThetaMesDghter = 0x0;
1784 lHistPtBarDghter = 0x0;
1785 lHistPtMesDghter = 0x0;
1787 } // end of loop over the different types of cascades (Xi-+, Omega-+)
1791 //__________________________________________________________________________
1792 // Part 2 - Loop over the reconstructed candidates
1795 for (Int_t iXi = 0; iXi < ncascades; iXi++)
1796 {// This is the begining of the Cascade loop
1798 AliESDcascade *xiESD = lESDevent->GetCascade(iXi);
1799 if (!xiESD) continue;
1801 // - Step II.1 : Connection to daughter tracks of the current cascade
1804 UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xiESD->GetPindex() );
1805 UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xiESD->GetNindex() );
1806 UInt_t lBachIdx = (UInt_t) TMath::Abs( xiESD->GetBindex() );
1807 // abs value not needed ; the index should always be positive (!= label ...)
1810 // FIXME : rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer)
1811 if(lBachIdx == lIdxNegXi) {
1812 AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue;
1814 if(lBachIdx == lIdxPosXi) {
1815 AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue;
1818 AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi );
1819 AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi );
1820 AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx );
1821 if (!pTrackXi || !nTrackXi || !bachTrackXi ) {
1822 Printf("ERROR: Could not retrieve one of the 3 daughter tracks of the cascade ...");
1826 Int_t lPosTPCClusters = pTrackXi->GetTPCNcls();
1827 Int_t lNegTPCClusters = nTrackXi->GetTPCNcls();
1828 Int_t lBachTPCClusters = bachTrackXi->GetTPCNcls();
1830 // FIXME : rejection of a poor quality tracks
1831 if(fkQualityCutTPCrefit){
1832 // 1 - Poor quality related to TPCrefit
1833 ULong_t pStatus = pTrackXi->GetStatus();
1834 ULong_t nStatus = nTrackXi->GetStatus();
1835 ULong_t bachStatus = bachTrackXi->GetStatus();
1836 if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
1837 if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
1838 if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
1840 if(fkQualityCut80TPCcls){
1841 // 2 - Poor quality related to TPC clusters
1842 if(lPosTPCClusters < 80) { AliWarning("Pb / V0 Pos. track has less than 80 TPC clusters ... continue!"); continue; }
1843 if(lNegTPCClusters < 80) { AliWarning("Pb / V0 Neg. track has less than 80 TPC clusters ... continue!"); continue; }
1844 if(lBachTPCClusters < 80) { AliWarning("Pb / Bach. track has less than 80 TPC clusters ... continue!"); continue; }
1847 // - Step II.2 : Info over reconstructed cascades
1850 Double_t lInvMassXiMinus = 0.;
1851 Double_t lInvMassXiPlus = 0.;
1852 Double_t lInvMassOmegaMinus = 0.;
1853 Double_t lInvMassOmegaPlus = 0.;
1855 Double_t lV0quality = 0.;
1857 if( bachTrackXi->Charge() < 0 ) {
1859 xiESD->ChangeMassHypothesis(lV0quality , 3312);
1860 // Calculate the effective mass of the Xi- candidate.
1861 // pdg code 3312 = Xi-
1862 lInvMassXiMinus = xiESD->GetEffMassXi();
1865 xiESD->ChangeMassHypothesis(lV0quality , 3334);
1866 // Calculate the effective mass of the Xi- candidate.
1867 // pdg code 3334 = Omega-
1868 lInvMassOmegaMinus = xiESD->GetEffMassXi();
1871 xiESD->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp.
1875 if( bachTrackXi->Charge() > 0 ){
1877 xiESD->ChangeMassHypothesis(lV0quality , -3312);
1878 // Calculate the effective mass of the Xi+ candidate.
1879 // pdg code -3312 = Xi+
1880 lInvMassXiPlus = xiESD->GetEffMassXi();
1883 xiESD->ChangeMassHypothesis(lV0quality , -3334);
1884 // Calculate the effective mass of the Xi+ candidate.
1885 // pdg code -3334 = Omega+
1886 lInvMassOmegaPlus = xiESD->GetEffMassXi();
1889 xiESD->ChangeMassHypothesis(lV0quality , -3312); // Back to "default" hyp.
1892 Double_t lChargeXi = xiESD->Charge();
1894 if( lChargeXi < 0 ) fHistMassXiMinus ->Fill( lInvMassXiMinus );
1895 if( lChargeXi > 0 ) fHistMassXiPlus ->Fill( lInvMassXiPlus );
1896 if( lChargeXi < 0 ) fHistMassOmegaMinus ->Fill( lInvMassOmegaMinus );
1897 if( lChargeXi > 0 ) fHistMassOmegaPlus ->Fill( lInvMassOmegaPlus );
1900 // - Step II.3 : PID info
1904 // 3.1 - PID Information
1906 Bool_t lIsPosInXiProton = kFALSE;
1907 Bool_t lIsPosInXiPion = kFALSE;
1908 Bool_t lIsPosInOmegaProton = kFALSE;
1909 Bool_t lIsPosInOmegaPion = kFALSE;
1911 Bool_t lIsNegInXiProton = kFALSE;
1912 Bool_t lIsNegInXiPion = kFALSE;
1913 Bool_t lIsNegInOmegaProton = kFALSE;
1914 Bool_t lIsNegInOmegaPion = kFALSE;
1916 Bool_t lIsBachelorKaon = kFALSE;
1917 Bool_t lIsBachelorPion = kFALSE;
1919 Bool_t lIsBachelorKaonForTPC = kFALSE; // For ESD only ...//FIXME : wait for availability in AOD
1920 Bool_t lIsBachelorPionForTPC = kFALSE; // For ESD only ...
1921 Bool_t lIsNegPionForTPC = kFALSE; // For ESD only ...
1922 Bool_t lIsPosPionForTPC = kFALSE; // For ESD only ...
1923 Bool_t lIsNegProtonForTPC = kFALSE; // For ESD only ...
1924 Bool_t lIsPosProtonForTPC = kFALSE; // For ESD only ...
1926 // 3.1.A - Combined PID
1927 // Reasonable guess for the priors for the cascade track sample (e-, mu, pi, K, p)
1928 Double_t lPriorsGuessXi[5] = {0, 0, 2, 0, 1};
1929 Double_t lPriorsGuessOmega[5] = {0, 0, 1, 1, 1};
1931 // Combined VO-positive-daughter PID
1932 AliPID pPidXi; pPidXi.SetPriors( lPriorsGuessXi );
1933 AliPID pPidOmega; pPidOmega.SetPriors( lPriorsGuessOmega );
1935 if( pTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists
1936 Double_t r[10] = {0.}; pTrackXi->GetESDpid(r);
1937 pPidXi.SetProbabilities(r);
1938 pPidOmega.SetProbabilities(r);
1940 // Check if the V0 positive track is a proton (case for Xi-)
1941 Double_t pproton = pPidXi.GetProbability(AliPID::kProton);
1942 if (pproton > pPidXi.GetProbability(AliPID::kElectron) &&
1943 pproton > pPidXi.GetProbability(AliPID::kMuon) &&
1944 pproton > pPidXi.GetProbability(AliPID::kPion) &&
1945 pproton > pPidXi.GetProbability(AliPID::kKaon) ) lIsPosInXiProton = kTRUE;
1947 // Check if the V0 positive track is a pi+ (case for Xi+)
1948 Double_t ppion = pPidXi.GetProbability(AliPID::kPion);
1949 if (ppion > pPidXi.GetProbability(AliPID::kElectron) &&
1950 ppion > pPidXi.GetProbability(AliPID::kMuon) &&
1951 ppion > pPidXi.GetProbability(AliPID::kKaon) &&
1952 ppion > pPidXi.GetProbability(AliPID::kProton) ) lIsPosInXiPion = kTRUE;
1955 // Check if the V0 positive track is a proton (case for Omega-)
1957 pproton = pPidOmega.GetProbability(AliPID::kProton);
1958 if (pproton > pPidOmega.GetProbability(AliPID::kElectron) &&
1959 pproton > pPidOmega.GetProbability(AliPID::kMuon) &&
1960 pproton > pPidOmega.GetProbability(AliPID::kPion) &&
1961 pproton > pPidOmega.GetProbability(AliPID::kKaon) ) lIsPosInOmegaProton = kTRUE;
1963 // Check if the V0 positive track is a pi+ (case for Omega+)
1965 ppion = pPidOmega.GetProbability(AliPID::kPion);
1966 if (ppion > pPidOmega.GetProbability(AliPID::kElectron) &&
1967 ppion > pPidOmega.GetProbability(AliPID::kMuon) &&
1968 ppion > pPidOmega.GetProbability(AliPID::kKaon) &&
1969 ppion > pPidOmega.GetProbability(AliPID::kProton) ) lIsPosInOmegaPion = kTRUE;
1971 }// end if V0 positive track with existing combined PID
1974 // Combined VO-negative-daughter PID
1975 AliPID nPidXi; nPidXi.SetPriors( lPriorsGuessXi );
1976 AliPID nPidOmega; nPidOmega.SetPriors( lPriorsGuessOmega );
1978 if( nTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists
1979 Double_t r[10] = {0.}; nTrackXi->GetESDpid(r);
1980 nPidXi.SetProbabilities(r);
1981 nPidOmega.SetProbabilities(r);
1983 // Check if the V0 negative track is a pi- (case for Xi-)
1984 Double_t ppion = nPidXi.GetProbability(AliPID::kPion);
1985 if (ppion > nPidXi.GetProbability(AliPID::kElectron) &&
1986 ppion > nPidXi.GetProbability(AliPID::kMuon) &&
1987 ppion > nPidXi.GetProbability(AliPID::kKaon) &&
1988 ppion > nPidXi.GetProbability(AliPID::kProton) ) lIsNegInXiPion = kTRUE;
1990 // Check if the V0 negative track is an anti-proton (case for Xi+)
1991 Double_t pproton = nPidXi.GetProbability(AliPID::kProton);
1992 if (pproton > nPidXi.GetProbability(AliPID::kElectron) &&
1993 pproton > nPidXi.GetProbability(AliPID::kMuon) &&
1994 pproton > nPidXi.GetProbability(AliPID::kPion) &&
1995 pproton > nPidXi.GetProbability(AliPID::kKaon) ) lIsNegInXiProton = kTRUE;
1997 // Check if the V0 negative track is a pi- (case for Omega-)
1999 ppion = nPidOmega.GetProbability(AliPID::kPion);
2000 if (ppion > nPidOmega.GetProbability(AliPID::kElectron) &&
2001 ppion > nPidOmega.GetProbability(AliPID::kMuon) &&
2002 ppion > nPidOmega.GetProbability(AliPID::kKaon) &&
2003 ppion > nPidOmega.GetProbability(AliPID::kProton) ) lIsNegInOmegaPion = kTRUE;
2005 // Check if the V0 negative track is an anti-proton (case for Omega+)
2007 pproton = nPidOmega.GetProbability(AliPID::kProton);
2008 if (pproton > nPidOmega.GetProbability(AliPID::kElectron) &&
2009 pproton > nPidOmega.GetProbability(AliPID::kMuon) &&
2010 pproton > nPidOmega.GetProbability(AliPID::kPion) &&
2011 pproton > nPidOmega.GetProbability(AliPID::kKaon) ) lIsNegInOmegaProton = kTRUE;
2013 }// end if V0 negative track with existing combined PID
2016 // Combined bachelor PID
2017 AliPID bachPidXi; bachPidXi.SetPriors( lPriorsGuessXi );
2018 AliPID bachPidOmega; bachPidOmega.SetPriors( lPriorsGuessOmega );
2020 Double_t ppionBach = 0.0, pkaonBach = 0.0;
2022 if( bachTrackXi->IsOn(AliESDtrack::kESDpid) ){ // Combined PID exists
2023 Double_t r[10] = {0.}; bachTrackXi->GetESDpid(r);
2024 bachPidXi.SetProbabilities(r);
2025 bachPidOmega.SetProbabilities(r);
2026 // Check if the bachelor track is a pion
2027 ppionBach = bachPidXi.GetProbability(AliPID::kPion);
2028 if (ppionBach > bachPidXi.GetProbability(AliPID::kElectron) &&
2029 ppionBach > bachPidXi.GetProbability(AliPID::kMuon) &&
2030 ppionBach > bachPidXi.GetProbability(AliPID::kKaon) &&
2031 ppionBach > bachPidXi.GetProbability(AliPID::kProton) ) lIsBachelorPion = kTRUE;
2032 // Check if the bachelor track is a kaon
2033 pkaonBach = bachPidOmega.GetProbability(AliPID::kKaon);
2034 if (pkaonBach > bachPidOmega.GetProbability(AliPID::kElectron) &&
2035 pkaonBach > bachPidOmega.GetProbability(AliPID::kMuon) &&
2036 pkaonBach > bachPidOmega.GetProbability(AliPID::kPion) &&
2037 pkaonBach > bachPidOmega.GetProbability(AliPID::kProton) ) lIsBachelorKaon = kTRUE;
2038 }// end if bachelor track with existing combined PID
2041 // 3.1.B - TPC PID : 3-sigma bands on Bethe-Bloch curve
2043 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kKaon)) < 3) lIsBachelorKaonForTPC = kTRUE;
2044 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( bachTrackXi,AliPID::kPion)) < 3) lIsBachelorPionForTPC = kTRUE;
2046 // Negative V0 daughter
2047 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kPion )) < 3) lIsNegPionForTPC = kTRUE;
2048 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( nTrackXi,AliPID::kProton )) < 3) lIsNegProtonForTPC = kTRUE;
2050 // Positive V0 daughter
2051 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kPion )) < 3) lIsPosPionForTPC = kTRUE;
2052 if (TMath::Abs(fESDpid->NumberOfSigmasTPC( pTrackXi,AliPID::kProton )) < 3) lIsPosProtonForTPC = kTRUE;
2055 // Combined PID TH1s
2056 if( lChargeXi < 0 && lIsBachelorPion ) fHistMassWithCombPIDXiMinus ->Fill( lInvMassXiMinus );
2057 if( lChargeXi > 0 && lIsBachelorPion ) fHistMassWithCombPIDXiPlus ->Fill( lInvMassXiPlus );
2058 if( lChargeXi < 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaMinus ->Fill( lInvMassOmegaMinus );
2059 if( lChargeXi > 0 && lIsBachelorKaon ) fHistMassWithCombPIDOmegaPlus ->Fill( lInvMassOmegaPlus );
2062 // 3.2 - PID proba Vs Pt(Bach)
2063 Int_t lblBachForPID = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
2064 TParticle* mcBachForPID = lMCstack->Particle( lblBachForPID );
2065 Double_t lmcPtBach = mcBachForPID->Pt();
2067 if(lIsBachelorPion) f2dHistPIDprobaPionVsMCPtBach->Fill( lmcPtBach, ppionBach );
2068 if(lIsBachelorKaon) f2dHistPIDprobaKaonVsMCPtBach->Fill( lmcPtBach, pkaonBach );
2071 // 3.3 - MC perfect PID
2072 Bool_t lIsBachelorMCPiMinus = kFALSE;
2073 Bool_t lIsBachelorMCPiPlus = kFALSE;
2074 Bool_t lIsBachelorMCKMinus = kFALSE;
2075 Bool_t lIsBachelorMCKPlus = kFALSE;
2077 if( mcBachForPID->GetPdgCode() == -211) lIsBachelorMCPiMinus = kTRUE;
2078 if( mcBachForPID->GetPdgCode() == 211) lIsBachelorMCPiPlus = kTRUE;
2079 if( mcBachForPID->GetPdgCode() == -321) lIsBachelorMCKMinus = kTRUE;
2080 if( mcBachForPID->GetPdgCode() == 321) lIsBachelorMCKPlus = kTRUE;
2082 if( lChargeXi < 0 && lIsBachelorMCPiMinus ) fHistMassWithMcPIDXiMinus ->Fill( lInvMassXiMinus );
2083 if( lChargeXi > 0 && lIsBachelorMCPiPlus ) fHistMassWithMcPIDXiPlus ->Fill( lInvMassXiPlus );
2084 if( lChargeXi < 0 && lIsBachelorMCKMinus ) fHistMassWithMcPIDOmegaMinus ->Fill( lInvMassOmegaMinus );
2085 if( lChargeXi > 0 && lIsBachelorMCKPlus ) fHistMassWithMcPIDOmegaPlus ->Fill( lInvMassOmegaPlus );
2090 // - Step II.4 : MC association (care : lots of "continue;" below this line)
2093 Bool_t lAssoXiMinus = kFALSE;
2094 Bool_t lAssoXiPlus = kFALSE;
2095 Bool_t lAssoOmegaMinus = kFALSE;
2096 Bool_t lAssoOmegaPlus = kFALSE;
2100 cout << "MC EventNumber : " << lMCevent->Header()->GetEvent()
2101 << " / MC event Number in Run : " << lMCevent->Header()->GetEventNrInRun() << endl;
2103 // - Step 4.1 : level of the V0 daughters
2105 Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() );
2106 // Abs value = needed ! question of quality track association ...
2107 Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() );
2109 TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter );
2110 TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter );
2113 // - Step 4.2 : level of the Xi daughters
2115 Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ;
2116 Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother();
2118 if( lblMotherPosV0Dghter != lblMotherNegV0Dghter) continue; // same mother
2119 if( lblMotherPosV0Dghter < 0 ) continue; // mother != primary (!= -1)
2120 if( lblMotherNegV0Dghter < 0 ) continue;
2123 // mothers = Lambda candidate ... a priori
2125 TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter );
2126 TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter );
2128 Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
2129 TParticle* mcBach = lMCstack->Particle( lblBach );
2132 // - Step 4.3 : level of Xi candidate
2134 Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ;
2135 Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ;
2137 if( lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter ) continue;
2138 if( lblGdMotherPosV0Dghter < 0 ) continue; // primary lambda ...
2139 if( lblGdMotherNegV0Dghter < 0 ) continue; // primary lambda ...
2142 // Gd mothers = Xi candidate ... a priori
2144 TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter );
2145 TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter );
2147 Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() );
2149 if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters
2151 TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach );
2154 // - Step 4.4 : Manage boolean for association
2156 if( mcMotherBach ->GetPdgCode() == 3312 &&
2157 mcGdMotherPosV0Dghter ->GetPdgCode() == 3312 &&
2158 mcGdMotherNegV0Dghter ->GetPdgCode() == 3312) lAssoXiMinus = kTRUE;
2160 else if( mcMotherBach ->GetPdgCode() == -3312 &&
2161 mcGdMotherPosV0Dghter ->GetPdgCode() == -3312 &&
2162 mcGdMotherNegV0Dghter ->GetPdgCode() == -3312) lAssoXiPlus = kTRUE;
2164 else if( mcMotherBach ->GetPdgCode() == 3334 &&
2165 mcGdMotherPosV0Dghter ->GetPdgCode() == 3334 &&
2166 mcGdMotherNegV0Dghter ->GetPdgCode() == 3334) lAssoOmegaMinus = kTRUE;
2168 else if( mcMotherBach ->GetPdgCode() == -3334 &&
2169 mcGdMotherPosV0Dghter ->GetPdgCode() == -3334 &&
2170 mcGdMotherNegV0Dghter ->GetPdgCode() == -3334) lAssoOmegaPlus = kTRUE;
2174 if(!lAssoXiMinus && !lAssoXiPlus && !lAssoOmegaMinus && !lAssoOmegaPlus) continue; // no association, skip the rest of the code
2175 // If a proper association exists ...
2178 cout << "XiMinus = " << lAssoXiMinus << endl;
2179 cout << "XiPlus = " << lAssoXiPlus << endl;
2180 cout << "OmegaMinus = " << lAssoOmegaMinus << endl;
2181 cout << "OmegaPlus = " << lAssoOmegaPlus << endl
2188 cout << "- V0 daughters - " << endl;
2189 cout << " + V0 Pos. / Label : " << lblPosV0Dghter
2190 << " - Pdg Code : " << mcPosV0Dghter->GetTitle() << endl;
2191 cout << " - V0 Neg. / Label : " << lblNegV0Dghter
2192 << " - Pdg Code : " << mcNegV0Dghter->GetTitle() << endl;
2194 cout << "- Xi daughters - " << endl;
2195 cout << " + V0 Pos. mother / Label : " << lblMotherPosV0Dghter
2196 << " - Pdg Code : " << mcMotherPosV0Dghter->GetTitle() << endl;
2197 cout << " - V0 Neg. mother / Label : " << lblMotherNegV0Dghter
2198 << " - Pdg Code : " << mcMotherNegV0Dghter->GetTitle() << endl;
2200 cout << " -- Bach. / Label :" << lblBach
2201 << " - Pdg Code : " << mcBach->GetTitle() << endl;
2203 cout << "- Xi candidate -" << endl;
2204 cout << " + V0 Pos. Gd Mother / Label : " << lblGdMotherPosV0Dghter
2205 << " - Pdg Code : " << mcGdMotherPosV0Dghter->GetTitle() << endl;
2206 cout << " - V0 Neg. Gd Mother / Label : " << lblGdMotherNegV0Dghter
2207 << " - Pdg Code : "<< mcGdMotherNegV0Dghter->GetTitle() << endl;
2209 cout << " -- Mother Bach. / Label : " << lblMotherBach
2210 << " - Pdg Code : " << mcMotherBach->GetTitle() << endl;
2215 // - Step 5 : Plots around the cascade candidates associated with MC
2218 Double_t lmcPt = mcMotherBach->Pt();
2219 Double_t lmcRapCasc = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) /
2220 (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) );
2221 Double_t lmcEta = mcMotherBach->Eta();
2222 Double_t lmcTransvRadius = mcBach->R(); // to get the decay point of Xi, = the production vertex of Bachelor ...
2224 Double_t lrecoPt = xiESD->Pt();
2225 Double_t lrecoTransvRadius = TMath::Sqrt( xiESD->Xv() * xiESD->Xv() + xiESD->Yv() * xiESD->Yv() );
2228 // - Histos for the cascade candidates associated with MC
2230 if( lChargeXi < 0 && lAssoXiMinus){
2231 fHistAsMCMassXiMinus ->Fill( lInvMassXiMinus );
2232 if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiMinus->Fill( lmcPt, lmcRapCasc );
2233 f2dHistAsMCGenPtVsGenYXiMinus ->Fill( lmcPt, lmcRapCasc);
2234 fHistAsMCGenEtaXiMinus ->Fill( lmcEta );
2235 f2dHistAsMCResPtXiMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
2236 f2dHistAsMCResRXiMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
2239 else if( lChargeXi > 0 && lAssoXiPlus){
2240 fHistAsMCMassXiPlus ->Fill( lInvMassXiPlus );
2241 if(lIsBachelorPion) f2dHistAsMCandCombPIDGenPtVsGenYXiPlus->Fill( lmcPt, lmcRapCasc );
2242 f2dHistAsMCGenPtVsGenYXiPlus ->Fill( lmcPt, lmcRapCasc);
2243 fHistAsMCGenEtaXiPlus ->Fill( lmcEta );
2244 f2dHistAsMCResPtXiPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
2245 f2dHistAsMCResRXiPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
2248 else if( lChargeXi < 0 && lAssoOmegaMinus){
2249 fHistAsMCMassOmegaMinus ->Fill( lInvMassOmegaMinus );
2250 if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus->Fill( lmcPt, lmcRapCasc );
2251 f2dHistAsMCGenPtVsGenYOmegaMinus ->Fill( lmcPt, lmcRapCasc );
2252 fHistAsMCGenEtaOmegaMinus ->Fill( lmcEta );
2253 f2dHistAsMCResPtOmegaMinus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
2254 f2dHistAsMCResROmegaMinus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
2257 else if( lChargeXi > 0 && lAssoOmegaPlus){
2258 fHistAsMCMassOmegaPlus ->Fill( lInvMassOmegaPlus );
2259 if(lIsBachelorKaon) f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus->Fill( lmcPt, lmcRapCasc );
2260 f2dHistAsMCGenPtVsGenYOmegaPlus ->Fill( lmcPt, lmcRapCasc );
2261 fHistAsMCGenEtaOmegaPlus ->Fill( lmcEta );
2262 f2dHistAsMCResPtOmegaPlus ->Fill( lmcPt, (lrecoPt - lmcPt)/ lmcPt );
2263 f2dHistAsMCResROmegaPlus ->Fill( lmcTransvRadius, (lrecoTransvRadius - lmcTransvRadius)/ lmcTransvRadius );
2267 // - Step 6 : Containers = Cascade cuts + PID
2270 // Double_t lChi2Xi = -1. ;
2271 Double_t lDcaXiDaughters = -1. ;
2272 Double_t lDcaBachToPrimVertexXi = -1. ;
2273 Double_t lXiCosineOfPointingAngle = -1. ;
2274 Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 };
2275 Double_t lXiRadius = -1000. ;
2277 Double_t lInvMassLambdaAsCascDghter = 0.;
2278 Double_t lDcaV0DaughtersXi = -1.;
2279 // Double_t lV0Chi2Xi = -1. ;
2280 Double_t lV0CosineOfPointingAngleXi = -1.;
2281 Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade
2282 Double_t lV0RadiusXi = -1000.;
2283 Double_t lDcaV0ToPrimVertexXi = -1.;
2284 Double_t lDcaPosToPrimVertexXi = -1.;
2285 Double_t lDcaNegToPrimVertexXi = -1.;
2287 Int_t nTrackWithTPCrefitMultiplicity = 0;
2288 Int_t lSPDTrackletsMultiplicity = -1;
2291 // 6.2 - Definition of the needed variables
2293 //lChi2Xi = xiESD->GetChi2Xi();
2294 lDcaXiDaughters = xiESD->GetDcaXiDaughters();
2295 lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD( lBestPrimaryVtxPos[0],
2296 lBestPrimaryVtxPos[1],
2298 // NOTE : AliExternalTrackParam::GetD returns an algebraic value
2299 lXiCosineOfPointingAngle = xiESD->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0],
2300 lBestPrimaryVtxPos[1],
2301 lBestPrimaryVtxPos[2] );
2302 // Take care : the best available vertex should be used (like in AliCascadeVertexer)
2303 xiESD->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] );
2304 lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] );
2305 lInvMassLambdaAsCascDghter = xiESD->GetEffMass();
2306 // This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+
2307 lDcaV0DaughtersXi = xiESD->GetDcaV0Daughters();
2308 // lV0Chi2Xi = xiESD->GetChi2V0();
2309 lV0CosineOfPointingAngleXi = xiESD->GetV0CosineOfPointingAngle( lBestPrimaryVtxPos[0],
2310 lBestPrimaryVtxPos[1],
2311 lBestPrimaryVtxPos[2] );
2312 xiESD->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] );
2313 lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] );
2315 lDcaV0ToPrimVertexXi = xiESD->GetD( lBestPrimaryVtxPos[0],
2316 lBestPrimaryVtxPos[1],
2317 lBestPrimaryVtxPos[2] );
2319 lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi ->GetD( lBestPrimaryVtxPos[0],
2320 lBestPrimaryVtxPos[1],
2323 lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0],
2324 lBestPrimaryVtxPos[1],
2329 nTrackWithTPCrefitMultiplicity = DoESDTrackWithTPCrefitMultiplicity(lESDevent);
2332 const AliMultiplicity *lAliMult = lESDevent->GetMultiplicity();
2333 lSPDTrackletsMultiplicity = lAliMult->GetNumberOfTracklets();
2336 // 6.3 - Filling the AliCFContainer (optimisation of topological selections + systematics)
2337 Double_t lContainerCutVars[20] = {0.0};
2339 lContainerCutVars[0] = lDcaXiDaughters;
2340 lContainerCutVars[1] = lDcaBachToPrimVertexXi;
2341 lContainerCutVars[2] = lXiCosineOfPointingAngle;
2342 lContainerCutVars[3] = lXiRadius;
2343 lContainerCutVars[4] = lInvMassLambdaAsCascDghter;
2344 lContainerCutVars[5] = lDcaV0DaughtersXi;
2345 lContainerCutVars[6] = lV0CosineOfPointingAngleXi;
2346 lContainerCutVars[7] = lV0RadiusXi;
2347 lContainerCutVars[8] = lDcaV0ToPrimVertexXi;
2348 lContainerCutVars[9] = lDcaPosToPrimVertexXi;
2349 lContainerCutVars[10] = lDcaNegToPrimVertexXi;
2351 lContainerCutVars[13] = lmcPt;
2353 lContainerCutVars[16] = lBestPrimaryVtxPos[2];
2354 lContainerCutVars[17] = nTrackWithTPCrefitMultiplicity; // FIXME : nTrackWithTPCrefitMultiplicity not checked for AOD ...
2355 lContainerCutVars[18] = lSPDTrackletsMultiplicity; // FIXME : SPDTrackletsMultiplicity is not available for AOD ...
2356 lContainerCutVars[19] = lBachTPCClusters; // FIXME : BachTPCClusters is not available for AOD ...
2358 // All cases should be covered below
2359 if( lChargeXi < 0 && lAssoXiMinus ) {
2360 lContainerCutVars[11] = lInvMassXiMinus;
2361 lContainerCutVars[12] = 1.75;
2362 lContainerCutVars[14] = lmcRapCasc;
2363 lContainerCutVars[15] = -1.;
2364 fCFContAsCascadeCuts->Fill(lContainerCutVars,0); // for Xi-
2366 if( lChargeXi > 0 && lAssoXiPlus ){
2367 lContainerCutVars[11] = lInvMassXiPlus;
2368 lContainerCutVars[12] = 1.75;
2369 lContainerCutVars[14] = lmcRapCasc;
2370 lContainerCutVars[15] = -1.;
2371 fCFContAsCascadeCuts->Fill(lContainerCutVars,1); // for Xi+
2373 if( lChargeXi < 0 && lAssoOmegaMinus ) {
2374 lContainerCutVars[11] = 1.4;
2375 lContainerCutVars[12] = lInvMassOmegaMinus;
2376 lContainerCutVars[14] = -1.;
2377 lContainerCutVars[15] = lmcRapCasc;
2378 fCFContAsCascadeCuts->Fill(lContainerCutVars,2); // for Omega-
2380 if( lChargeXi > 0 && lAssoOmegaPlus ){
2381 lContainerCutVars[11] = 1.4;
2382 lContainerCutVars[12] = lInvMassOmegaPlus;
2383 lContainerCutVars[14] = -1.;
2384 lContainerCutVars[15] = lmcRapCasc;
2385 fCFContAsCascadeCuts->Fill(lContainerCutVars,3); // for Omega+
2389 // 6.4 - Filling the AliCFContainers related to PID
2391 Double_t lContainerPIDVars[4] = {0.0};
2395 if( lChargeXi < 0 && lAssoXiMinus ) {
2396 lContainerPIDVars[0] = lmcPt ;
2397 lContainerPIDVars[1] = lInvMassXiMinus ;
2398 lContainerPIDVars[2] = lmcRapCasc ;
2399 lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ;
2402 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 0); // No PID
2404 if( lIsBachelorPionForTPC )
2405 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track
2407 if( lIsBachelorPionForTPC &&
2408 lIsPosProtonForTPC )
2409 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks
2411 if( lIsBachelorPionForTPC &&
2412 lIsPosProtonForTPC &&
2414 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks
2417 if( lIsBachelorPion )
2418 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2420 if( lIsBachelorPion &&
2422 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2424 if(lIsBachelorPion &&
2427 fCFContCascadePIDAsXiMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2430 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; lContainerPIDVars[3] = 0.;
2433 if( lChargeXi > 0 && lAssoXiPlus ) {
2434 lContainerPIDVars[0] = lmcPt ;
2435 lContainerPIDVars[1] = lInvMassXiPlus ;
2436 lContainerPIDVars[2] = lmcRapCasc ;
2437 lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ;
2440 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 0); // No PID
2442 if( lIsBachelorPionForTPC )
2443 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track
2445 if( lIsBachelorPionForTPC &&
2446 lIsNegProtonForTPC )
2447 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks
2449 if( lIsBachelorPionForTPC &&
2450 lIsNegProtonForTPC &&
2452 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks
2455 if( lIsBachelorPion )
2456 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2458 if( lIsBachelorPion &&
2460 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2462 if(lIsBachelorPion &&
2465 fCFContCascadePIDAsXiPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2468 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; lContainerPIDVars[3] = 0.;
2471 if( lChargeXi < 0 && lAssoOmegaMinus ) {
2472 lContainerPIDVars[0] = lmcPt ;
2473 lContainerPIDVars[1] = lInvMassOmegaMinus ;
2474 lContainerPIDVars[2] = lmcRapCasc ;
2475 lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ;
2478 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 0); // No PID
2480 if( lIsBachelorKaonForTPC )
2481 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track
2483 if( lIsBachelorKaonForTPC &&
2484 lIsPosProtonForTPC )
2485 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks
2487 if( lIsBachelorKaonForTPC &&
2488 lIsPosProtonForTPC &&
2490 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks
2493 if( lIsBachelorKaon )
2494 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2496 if( lIsBachelorKaon &&
2497 lIsPosInOmegaProton )
2498 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2500 if(lIsBachelorKaon &&
2501 lIsPosInOmegaProton &&
2503 fCFContCascadePIDAsOmegaMinus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2506 lContainerPIDVars[0] = 0.; lContainerPIDVars[1] = 0.; lContainerPIDVars[2] = 0.; lContainerPIDVars[3] = 0.;
2509 if( lChargeXi > 0 && lAssoOmegaPlus) {
2510 lContainerPIDVars[0] = lmcPt ;
2511 lContainerPIDVars[1] = lInvMassOmegaPlus ;
2512 lContainerPIDVars[2] = lmcRapCasc ;
2513 lContainerPIDVars[3] = nTrackWithTPCrefitMultiplicity ;
2516 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 0); // No PID
2518 if( lIsBachelorKaonForTPC )
2519 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 1); // TPC PID / 3-#sigma cut on Bachelor track
2521 if( lIsBachelorKaonForTPC &&
2522 lIsNegProtonForTPC )
2523 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 2); // TPC PID / 3-#sigma cut on Bachelor+Baryon tracks
2525 if( lIsBachelorKaonForTPC &&
2526 lIsNegProtonForTPC &&
2528 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 3); // TPC PID / 3-#sigma cut on Bachelor+Baryon+Meson tracks
2531 if( lIsBachelorKaon )
2532 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 4); // Comb. PID / Bachelor
2534 if( lIsBachelorKaon &&
2535 lIsNegInOmegaProton )
2536 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 5); // Comb. PID / Bachelor+Baryon
2538 if(lIsBachelorKaon &&
2539 lIsNegInOmegaProton &&
2541 fCFContCascadePIDAsOmegaPlus->Fill(lContainerPIDVars, 6); // Comb. PID / Bachelor+Baryon+Meson
2546 }// End of loop over reconstructed cascades
2551 // Post output data.
2552 PostData(1, fListHistCascade);
2557 Int_t AliAnalysisTaskCheckPerformanceCascade::DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent)
2559 // Checking the number of tracks with TPCrefit for each event
2560 // Needed for a rough assessment of the event multiplicity
2562 Int_t nTrackWithTPCrefitMultiplicity = 0;
2563 for(Int_t iTrackIdx = 0; iTrackIdx < (InputEvent())->GetNumberOfTracks(); iTrackIdx++){
2564 AliESDtrack *esdTrack = 0x0;
2565 esdTrack = lESDevent->GetTrack( iTrackIdx );
2566 if (!esdTrack) { AliWarning("Pb / Could not retrieve one track within the track loop for TPCrefit check ..."); continue; }
2568 ULong_t lTrackStatus = esdTrack->GetStatus();
2569 if ((lTrackStatus&AliESDtrack::kTPCrefit) == 0) continue;
2570 else nTrackWithTPCrefitMultiplicity++;
2572 // The goal here is to get a better assessment of the event multiplicity.
2573 // (InputEvent())->GetNumberOfTracks() takes into account ITS std alone tracks + global tracks
2574 // This may introduce a bias. Hence the number of TPC refit tracks.
2575 // Note : the event multiplicity = analysis on its own... See Jacek's or Jan Fiete's analysis on dN/d(pt) and dN/d(eta)
2577 }// end loop over all event tracks
2578 return nTrackWithTPCrefitMultiplicity;
2587 //________________________________________________________________________
2588 void AliAnalysisTaskCheckPerformanceCascade::Terminate(Option_t *)
2590 // Draw result to the screen
2591 // Called once at the end of the query
2593 TList *cRetrievedList = 0x0;
2594 cRetrievedList = (TList*)GetOutputData(1);
2595 if(!cRetrievedList){
2596 Printf("ERROR - AliAnalysisTaskCheckPerformanceCascade : ouput data container list not available\n");
2600 fHistMCTrackMultiplicity = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistMCTrackMultiplicity") );
2601 if (!fHistMCTrackMultiplicity) {
2602 Printf("ERROR - AliAnalysisTaskCheckPerformanceCascade : fHistMCTrackMultiplicity not available");
2607 TCanvas *canCheckPerformanceCascade = new TCanvas("AliAnalysisTaskCheckPerformanceCascade","Multiplicity",10,10,510,510);
2608 canCheckPerformanceCascade->cd(1)->SetLogy();
2610 fHistMCTrackMultiplicity->SetMarkerStyle(22);
2611 fHistMCTrackMultiplicity->DrawCopy("E");