]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
17 | // | |
18 | // Modified version of AliAnalysisTaskCheckCascade.cxx. | |
19 | // This is a 'hybrid' output version, in that it uses a classic TTree | |
20 | // ROOT object to store the candidates, plus a couple of histograms filled on | |
21 | // a per-event basis for storing variables too numerous to put in a tree. | |
22 | // | |
23 | // --- Adapted to look for lambdas as well, using code from | |
24 | // AliAnalysisTaskCheckPerformanceStrange.cxx | |
25 | // | |
26 | // --- Algorithm Description | |
27 | // 1. Loop over primaries in stack to acquire generated charged Xi | |
28 | // 2. Loop over stack to find Cascades, fill TH3Fs "PrimRawPt"s for Efficiency | |
29 | // 3. Perform Physics Selection | |
30 | // 4. Perform Primary Vertex |z|<10cm selection | |
31 | // 5. Perform Primary Vertex NoTPCOnly vertexing selection (>0 contrib.) | |
32 | // 6. Perform Pileup Rejection | |
33 | // 7. Analysis Loops: | |
34 | // 7a. Fill TH3Fs "PrimAnalysisPt" for control purposes only | |
35 | // | |
36 | // Please Report Any Bugs! | |
37 | // | |
38 | // --- David Dobrigkeit Chinellato | |
39 | // (david.chinellato@gmail.com) | |
40 | // | |
41 | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
42 | ||
43 | class TTree; | |
44 | class TParticle; | |
45 | class TVector3; | |
46 | ||
47 | //class AliMCEventHandler; | |
48 | //class AliMCEvent; | |
49 | //class AliStack; | |
50 | ||
51 | class AliESDVertex; | |
52 | class AliAODVertex; | |
53 | class AliESDv0; | |
54 | class AliAODv0; | |
55 | ||
56 | #include <Riostream.h> | |
57 | #include "TList.h" | |
58 | #include "TH1.h" | |
59 | #include "TH2.h" | |
60 | #include "TH3.h" | |
61 | #include "TFile.h" | |
62 | #include "THnSparse.h" | |
63 | #include "TVector3.h" | |
64 | #include "TCanvas.h" | |
65 | #include "TMath.h" | |
66 | #include "TLegend.h" | |
67 | #include "AliLog.h" | |
68 | ||
69 | #include "AliESDEvent.h" | |
70 | #include "AliAODEvent.h" | |
71 | #include "AliV0vertexer.h" | |
72 | #include "AliCascadeVertexer.h" | |
73 | #include "AliESDpid.h" | |
74 | #include "AliESDtrack.h" | |
75 | #include "AliESDtrackCuts.h" | |
76 | #include "AliInputEventHandler.h" | |
77 | #include "AliAnalysisManager.h" | |
78 | #include "AliMCEventHandler.h" | |
79 | #include "AliMCEvent.h" | |
80 | #include "AliStack.h" | |
81 | ||
82 | #include "AliCFContainer.h" | |
83 | #include "AliMultiplicity.h" | |
84 | #include "AliAODMCParticle.h" | |
85 | #include "AliESDcascade.h" | |
86 | #include "AliAODcascade.h" | |
87 | #include "AliESDUtils.h" | |
88 | #include "AliAnalysisUtils.h" | |
89 | #include "AliGenEventHeader.h" | |
90 | ||
91 | #include "AliAnalysisTaskExtractPerformanceCascade.h" | |
92 | ||
93 | using std::cout; | |
94 | using std::endl; | |
95 | ||
96 | ClassImp(AliAnalysisTaskExtractPerformanceCascade) | |
97 | ||
98 | AliAnalysisTaskExtractPerformanceCascade::AliAnalysisTaskExtractPerformanceCascade() | |
99 | : AliAnalysisTaskSE(), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0), fUtils(0), | |
100 | fkIsNuclear ( kFALSE ), | |
101 | fkSwitchINT7 ( kFALSE ), | |
102 | fpArapidityShift ( 0.465 ), | |
103 | fCentralityEstimator("V0M"), | |
104 | fkpAVertexSelection( kFALSE ), | |
105 | //------------------------------------------------ | |
106 | // Tree Variables | |
107 | //------------------------------------------------ | |
108 | ||
109 | fTreeCascVarCharge(0), | |
110 | fTreeCascVarMassAsXi(0), | |
111 | fTreeCascVarMassAsOmega(0), | |
112 | fTreeCascVarPt(0), | |
113 | fTreeCascVarPtMC(0), | |
114 | fTreeCascVarRapMC(0), | |
115 | fTreeCascVarRapXi(0), | |
116 | fTreeCascVarRapOmega(0), | |
117 | fTreeCascVarNegEta(0), | |
118 | fTreeCascVarPosEta(0), | |
119 | fTreeCascVarBachEta(0), | |
120 | fTreeCascVarDCACascDaughters(0), | |
121 | fTreeCascVarDCABachToPrimVtx(0), | |
122 | fTreeCascVarDCAV0Daughters(0), | |
123 | fTreeCascVarDCAV0ToPrimVtx(0), | |
124 | fTreeCascVarDCAPosToPrimVtx(0), | |
125 | fTreeCascVarDCANegToPrimVtx(0), | |
126 | fTreeCascVarCascCosPointingAngle(0), | |
127 | fTreeCascVarCascRadius(0), | |
128 | fTreeCascVarV0Mass(0), | |
129 | fTreeCascVarV0CosPointingAngle(0), | |
130 | fTreeCascVarV0Radius(0), | |
131 | fTreeCascVarLeastNbrClusters(0), | |
132 | fTreeCascVarMultiplicity(0), | |
133 | fTreeCascVarMultiplicityV0A(0), | |
134 | fTreeCascVarMultiplicityZNA(0), | |
135 | fTreeCascVarMultiplicityTRK(0), | |
136 | fTreeCascVarMultiplicitySPD(0), | |
137 | fTreeCascVarMultiplicityMC(0), | |
138 | fTreeCascVarDistOverTotMom(0), | |
139 | fTreeCascVarPID(0), | |
140 | fTreeCascVarPIDBachelor(0), | |
141 | fTreeCascVarPIDNegative(0), | |
142 | fTreeCascVarPIDPositive(0), | |
143 | fTreeCascVarPosTransMom(0), | |
144 | fTreeCascVarNegTransMom(0), | |
145 | fTreeCascVarPosTransMomMC(0), | |
146 | fTreeCascVarNegTransMomMC(0), | |
147 | fTreeCascVarNegNSigmaPion(0), | |
148 | fTreeCascVarNegNSigmaProton(0), | |
149 | fTreeCascVarPosNSigmaPion(0), | |
150 | fTreeCascVarPosNSigmaProton(0), | |
151 | fTreeCascVarBachNSigmaPion(0), | |
152 | fTreeCascVarBachNSigmaKaon(0), | |
153 | ||
154 | //------------------------------------------------ | |
155 | // HISTOGRAMS | |
156 | // --- Filled on an Event-by-event basis | |
157 | //------------------------------------------------ | |
158 | fHistV0MultiplicityBeforeTrigSel(0), | |
159 | fHistV0MultiplicityForTrigEvt(0), | |
160 | fHistV0MultiplicityForSelEvt(0), | |
161 | fHistV0MultiplicityForSelEvtNoTPCOnly(0), | |
162 | fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
163 | fHistMultiplicityBeforeTrigSel(0), | |
164 | fHistMultiplicityForTrigEvt(0), | |
165 | fHistMultiplicity(0), | |
166 | fHistMultiplicityNoTPCOnly(0), | |
167 | fHistMultiplicityNoTPCOnlyNoPileup(0), | |
168 | ||
169 | //V0A Centrality | |
170 | fHistMultiplicityV0ABeforeTrigSel(0), | |
171 | fHistMultiplicityV0AForTrigEvt(0), | |
172 | fHistMultiplicityV0A(0), | |
173 | fHistMultiplicityV0ANoTPCOnly(0), | |
174 | fHistMultiplicityV0ANoTPCOnlyNoPileup(0), | |
175 | ||
176 | //ZNA Centrality | |
177 | fHistMultiplicityZNABeforeTrigSel(0), | |
178 | fHistMultiplicityZNAForTrigEvt(0), | |
179 | fHistMultiplicityZNA(0), | |
180 | fHistMultiplicityZNANoTPCOnly(0), | |
181 | fHistMultiplicityZNANoTPCOnlyNoPileup(0), | |
182 | ||
183 | //TRK Centrality | |
184 | fHistMultiplicityTRKBeforeTrigSel(0), | |
185 | fHistMultiplicityTRKForTrigEvt(0), | |
186 | fHistMultiplicityTRK(0), | |
187 | fHistMultiplicityTRKNoTPCOnly(0), | |
188 | fHistMultiplicityTRKNoTPCOnlyNoPileup(0), | |
189 | ||
190 | //SPD Centrality | |
191 | fHistMultiplicitySPDBeforeTrigSel(0), | |
192 | fHistMultiplicitySPDForTrigEvt(0), | |
193 | fHistMultiplicitySPD(0), | |
194 | fHistMultiplicitySPDNoTPCOnly(0), | |
195 | fHistMultiplicitySPDNoTPCOnlyNoPileup(0), | |
196 | ||
197 | ||
198 | //------------------------------------------------ | |
199 | // PARTICLE HISTOGRAMS | |
200 | // --- Filled on a Particle-by-Particle basis | |
201 | //------------------------------------------------ | |
202 | f3dHistGenPtVsYVsMultXiMinus(0), | |
203 | f3dHistGenPtVsYVsMultXiPlus(0), | |
204 | f3dHistGenPtVsYVsMultOmegaMinus(0), | |
205 | f3dHistGenPtVsYVsMultOmegaPlus(0), | |
206 | f3dHistGenSelectedPtVsYVsMultXiMinus(0), | |
207 | f3dHistGenSelectedPtVsYVsMultXiPlus(0), | |
208 | f3dHistGenSelectedPtVsYVsMultOmegaMinus(0), | |
209 | f3dHistGenSelectedPtVsYVsMultOmegaPlus(0), | |
210 | f3dHistGenPtVsYCMSVsMultXiMinus(0), | |
211 | f3dHistGenPtVsYCMSVsMultXiPlus(0), | |
212 | f3dHistGenPtVsYCMSVsMultOmegaMinus(0), | |
213 | f3dHistGenPtVsYCMSVsMultOmegaPlus(0), | |
214 | f3dHistGenSelectedPtVsYCMSVsMultXiMinus(0), | |
215 | f3dHistGenSelectedPtVsYCMSVsMultXiPlus(0), | |
216 | f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus(0), | |
217 | f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus(0), | |
218 | fHistPVx(0), | |
219 | fHistPVy(0), | |
220 | fHistPVz(0), | |
221 | fHistPVxAnalysis(0), | |
222 | fHistPVyAnalysis(0), | |
223 | fHistPVzAnalysis(0) | |
224 | { | |
225 | // Dummy Constructor | |
226 | } | |
227 | ||
228 | AliAnalysisTaskExtractPerformanceCascade::AliAnalysisTaskExtractPerformanceCascade(const char *name) | |
229 | : AliAnalysisTaskSE(name), fListHist(0), fTreeCascade(0), fPIDResponse(0), fESDtrackCuts(0), fUtils(0), | |
230 | fkIsNuclear ( kFALSE ), | |
231 | fkSwitchINT7 ( kFALSE ), | |
232 | fpArapidityShift ( 0.465 ), | |
233 | fCentralityEstimator("V0M"), | |
234 | fkpAVertexSelection( kFALSE ), | |
235 | //------------------------------------------------ | |
236 | // Tree Variables | |
237 | //------------------------------------------------ | |
238 | ||
239 | fTreeCascVarCharge(0), | |
240 | fTreeCascVarMassAsXi(0), | |
241 | fTreeCascVarMassAsOmega(0), | |
242 | fTreeCascVarPt(0), | |
243 | fTreeCascVarPtMC(0), | |
244 | fTreeCascVarRapMC(0), | |
245 | fTreeCascVarRapXi(0), | |
246 | fTreeCascVarRapOmega(0), | |
247 | fTreeCascVarNegEta(0), | |
248 | fTreeCascVarPosEta(0), | |
249 | fTreeCascVarBachEta(0), | |
250 | fTreeCascVarDCACascDaughters(0), | |
251 | fTreeCascVarDCABachToPrimVtx(0), | |
252 | fTreeCascVarDCAV0Daughters(0), | |
253 | fTreeCascVarDCAV0ToPrimVtx(0), | |
254 | fTreeCascVarDCAPosToPrimVtx(0), | |
255 | fTreeCascVarDCANegToPrimVtx(0), | |
256 | fTreeCascVarCascCosPointingAngle(0), | |
257 | fTreeCascVarCascRadius(0), | |
258 | fTreeCascVarV0Mass(0), | |
259 | fTreeCascVarV0CosPointingAngle(0), | |
260 | fTreeCascVarV0Radius(0), | |
261 | fTreeCascVarLeastNbrClusters(0), | |
262 | fTreeCascVarMultiplicity(0), | |
263 | fTreeCascVarMultiplicityV0A(0), | |
264 | fTreeCascVarMultiplicityZNA(0), | |
265 | fTreeCascVarMultiplicityTRK(0), | |
266 | fTreeCascVarMultiplicitySPD(0), | |
267 | fTreeCascVarMultiplicityMC(0), | |
268 | fTreeCascVarDistOverTotMom(0), | |
269 | fTreeCascVarPID(0), | |
270 | fTreeCascVarPIDBachelor(0), | |
271 | fTreeCascVarPIDNegative(0), | |
272 | fTreeCascVarPIDPositive(0), | |
273 | fTreeCascVarPosTransMom(0), | |
274 | fTreeCascVarNegTransMom(0), | |
275 | fTreeCascVarPosTransMomMC(0), | |
276 | fTreeCascVarNegTransMomMC(0), | |
277 | fTreeCascVarNegNSigmaPion(0), | |
278 | fTreeCascVarNegNSigmaProton(0), | |
279 | fTreeCascVarPosNSigmaPion(0), | |
280 | fTreeCascVarPosNSigmaProton(0), | |
281 | fTreeCascVarBachNSigmaPion(0), | |
282 | fTreeCascVarBachNSigmaKaon(0), | |
283 | ||
284 | //------------------------------------------------ | |
285 | // HISTOGRAMS | |
286 | // --- Filled on an Event-by-event basis | |
287 | //------------------------------------------------ | |
288 | fHistV0MultiplicityBeforeTrigSel(0), | |
289 | fHistV0MultiplicityForTrigEvt(0), | |
290 | fHistV0MultiplicityForSelEvt(0), | |
291 | fHistV0MultiplicityForSelEvtNoTPCOnly(0), | |
292 | fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup(0), | |
293 | fHistMultiplicityBeforeTrigSel(0), | |
294 | fHistMultiplicityForTrigEvt(0), | |
295 | fHistMultiplicity(0), | |
296 | fHistMultiplicityNoTPCOnly(0), | |
297 | fHistMultiplicityNoTPCOnlyNoPileup(0), | |
298 | ||
299 | //V0A Centrality | |
300 | fHistMultiplicityV0ABeforeTrigSel(0), | |
301 | fHistMultiplicityV0AForTrigEvt(0), | |
302 | fHistMultiplicityV0A(0), | |
303 | fHistMultiplicityV0ANoTPCOnly(0), | |
304 | fHistMultiplicityV0ANoTPCOnlyNoPileup(0), | |
305 | ||
306 | //ZNA Centrality | |
307 | fHistMultiplicityZNABeforeTrigSel(0), | |
308 | fHistMultiplicityZNAForTrigEvt(0), | |
309 | fHistMultiplicityZNA(0), | |
310 | fHistMultiplicityZNANoTPCOnly(0), | |
311 | fHistMultiplicityZNANoTPCOnlyNoPileup(0), | |
312 | ||
313 | //TRK Centrality | |
314 | fHistMultiplicityTRKBeforeTrigSel(0), | |
315 | fHistMultiplicityTRKForTrigEvt(0), | |
316 | fHistMultiplicityTRK(0), | |
317 | fHistMultiplicityTRKNoTPCOnly(0), | |
318 | fHistMultiplicityTRKNoTPCOnlyNoPileup(0), | |
319 | ||
320 | //SPD Centrality | |
321 | fHistMultiplicitySPDBeforeTrigSel(0), | |
322 | fHistMultiplicitySPDForTrigEvt(0), | |
323 | fHistMultiplicitySPD(0), | |
324 | fHistMultiplicitySPDNoTPCOnly(0), | |
325 | fHistMultiplicitySPDNoTPCOnlyNoPileup(0), | |
326 | ||
327 | //------------------------------------------------ | |
328 | // PARTICLE HISTOGRAMS | |
329 | // --- Filled on a Particle-by-Particle basis | |
330 | //------------------------------------------------ | |
331 | f3dHistGenPtVsYVsMultXiMinus(0), | |
332 | f3dHistGenPtVsYVsMultXiPlus(0), | |
333 | f3dHistGenPtVsYVsMultOmegaMinus(0), | |
334 | f3dHistGenPtVsYVsMultOmegaPlus(0), | |
335 | f3dHistGenSelectedPtVsYVsMultXiMinus(0), | |
336 | f3dHistGenSelectedPtVsYVsMultXiPlus(0), | |
337 | f3dHistGenSelectedPtVsYVsMultOmegaMinus(0), | |
338 | f3dHistGenSelectedPtVsYVsMultOmegaPlus(0), | |
339 | f3dHistGenPtVsYCMSVsMultXiMinus(0), | |
340 | f3dHistGenPtVsYCMSVsMultXiPlus(0), | |
341 | f3dHistGenPtVsYCMSVsMultOmegaMinus(0), | |
342 | f3dHistGenPtVsYCMSVsMultOmegaPlus(0), | |
343 | f3dHistGenSelectedPtVsYCMSVsMultXiMinus(0), | |
344 | f3dHistGenSelectedPtVsYCMSVsMultXiPlus(0), | |
345 | f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus(0), | |
346 | f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus(0), | |
347 | fHistPVx(0), | |
348 | fHistPVy(0), | |
349 | fHistPVz(0), | |
350 | fHistPVxAnalysis(0), | |
351 | fHistPVyAnalysis(0), | |
352 | fHistPVzAnalysis(0) | |
353 | { | |
354 | // Constructor | |
355 | ||
356 | //Set Variables for re-running the cascade vertexers (as done for MS paper) | |
357 | ||
358 | // New Loose : 1st step for the 7 TeV pp analysis | |
359 | /* | |
360 | fV0Sels[0] = 33. ; // max allowed chi2 | |
361 | fV0Sels[1] = 0.02; // min allowed impact parameter for the 1st daughter (LHC09a4 : 0.05) | |
362 | fV0Sels[2] = 0.02; // min allowed impact parameter for the 2nd daughter (LHC09a4 : 0.05) | |
363 | fV0Sels[3] = 2.0 ; // max allowed DCA between the daughter tracks (LHC09a4 : 0.5) | |
364 | fV0Sels[4] = 0.95; // min allowed cosine of V0's pointing angle (LHC09a4 : 0.99) | |
365 | fV0Sels[5] = 1.0 ; // min radius of the fiducial volume (LHC09a4 : 0.2) | |
366 | fV0Sels[6] = 100. ; // max radius of the fiducial volume (LHC09a4 : 100.0) | |
367 | ||
368 | fCascSels[0] = 33. ; // max allowed chi2 (same as PDC07) | |
369 | fCascSels[1] = 0.05 ; // min allowed V0 impact parameter (PDC07 : 0.05 / LHC09a4 : 0.025 ) | |
370 | fCascSels[2] = 0.010; // "window" around the Lambda mass (PDC07 : 0.008 / LHC09a4 : 0.010 ) | |
371 | fCascSels[3] = 0.03 ; // min allowed bachelor's impact parameter (PDC07 : 0.035 / LHC09a4 : 0.025 ) | |
372 | fCascSels[4] = 2.0 ; // max allowed DCA between the V0 and the bachelor (PDC07 : 0.1 / LHC09a4 : 0.2 ) | |
373 | fCascSels[5] = 0.95 ; // min allowed cosine of the cascade pointing angle (PDC07 : 0.9985 / LHC09a4 : 0.998 ) | |
374 | fCascSels[6] = 0.4 ; // min radius of the fiducial volume (PDC07 : 0.9 / LHC09a4 : 0.2 ) | |
375 | fCascSels[7] = 100. ; // max radius of the fiducial volume (PDC07 : 100 / LHC09a4 : 100 ) | |
376 | */ | |
377 | // Output slot #0 writes into a TList container (Cascade) | |
378 | DefineOutput(1, TList::Class()); | |
379 | DefineOutput(2, TTree::Class()); | |
380 | } | |
381 | ||
382 | ||
383 | AliAnalysisTaskExtractPerformanceCascade::~AliAnalysisTaskExtractPerformanceCascade() | |
384 | { | |
385 | //------------------------------------------------ | |
386 | // DESTRUCTOR | |
387 | //------------------------------------------------ | |
388 | ||
389 | if (fListHist){ | |
390 | delete fListHist; | |
391 | fListHist = 0x0; | |
392 | } | |
393 | if (fTreeCascade){ | |
394 | delete fTreeCascade; | |
395 | fTreeCascade = 0x0; | |
396 | } | |
397 | //cleanup esd track cuts object too... | |
398 | if (fESDtrackCuts){ | |
399 | delete fESDtrackCuts; | |
400 | fESDtrackCuts = 0x0; | |
401 | } | |
402 | if (fUtils){ | |
403 | delete fUtils; | |
404 | fUtils = 0x0; | |
405 | } | |
406 | ||
407 | } | |
408 | ||
409 | //________________________________________________________________________ | |
410 | void AliAnalysisTaskExtractPerformanceCascade::UserCreateOutputObjects() | |
411 | { | |
412 | OpenFile(2); | |
413 | // Called once | |
414 | ||
415 | //------------------------------------------------ | |
416 | ||
417 | fTreeCascade = new TTree("fTreeCascade","CascadeCandidates"); | |
418 | ||
419 | //------------------------------------------------ | |
420 | // fTreeCascade Branch definitions - Cascade Tree | |
421 | //------------------------------------------------ | |
422 | ||
423 | //------------------------------------------------ | |
424 | // fTreeCascade Branch definitions | |
425 | //------------------------------------------------ | |
426 | ||
427 | //-----------BASIC-INFO--------------------------- | |
428 | /* 1*/ fTreeCascade->Branch("fTreeCascVarCharge",&fTreeCascVarCharge,"fTreeCascVarCharge/I"); | |
429 | /* 2*/ fTreeCascade->Branch("fTreeCascVarMassAsXi",&fTreeCascVarMassAsXi,"fTreeCascVarMassAsXi/F"); | |
430 | /* 3*/ fTreeCascade->Branch("fTreeCascVarMassAsOmega",&fTreeCascVarMassAsOmega,"fTreeCascVarMassAsOmega/F"); | |
431 | /* 4*/ fTreeCascade->Branch("fTreeCascVarPt",&fTreeCascVarPt,"fTreeCascVarPt/F"); | |
432 | /* 5*/ fTreeCascade->Branch("fTreeCascVarPtMC",&fTreeCascVarPtMC,"fTreeCascVarPtMC/F"); | |
433 | /* 6*/ fTreeCascade->Branch("fTreeCascVarRapXi",&fTreeCascVarRapXi,"fTreeCascVarRapXi/F"); | |
434 | /* 7*/ fTreeCascade->Branch("fTreeCascVarRapMC",&fTreeCascVarRapMC,"fTreeCascVarRapMC/F"); | |
435 | /* 8*/ fTreeCascade->Branch("fTreeCascVarRapOmega",&fTreeCascVarRapOmega,"fTreeCascVarRapOmega/F"); | |
436 | /* 9*/ fTreeCascade->Branch("fTreeCascVarNegEta",&fTreeCascVarNegEta,"fTreeCascVarNegEta/F"); | |
437 | /*10*/ fTreeCascade->Branch("fTreeCascVarPosEta",&fTreeCascVarPosEta,"fTreeCascVarPosEta/F"); | |
438 | /*11*/ fTreeCascade->Branch("fTreeCascVarBachEta",&fTreeCascVarBachEta,"fTreeCascVarBachEta/F"); | |
439 | //-----------INFO-FOR-CUTS------------------------ | |
440 | /*12*/ fTreeCascade->Branch("fTreeCascVarDCACascDaughters",&fTreeCascVarDCACascDaughters,"fTreeCascVarDCACascDaughters/F"); | |
441 | /*13*/ fTreeCascade->Branch("fTreeCascVarDCABachToPrimVtx",&fTreeCascVarDCABachToPrimVtx,"fTreeCascVarDCABachToPrimVtx/F"); | |
442 | /*14*/ fTreeCascade->Branch("fTreeCascVarDCAV0Daughters",&fTreeCascVarDCAV0Daughters,"fTreeCascVarDCAV0Daughters/F"); | |
443 | /*15*/ fTreeCascade->Branch("fTreeCascVarDCAV0ToPrimVtx",&fTreeCascVarDCAV0ToPrimVtx,"fTreeCascVarDCAV0ToPrimVtx/F"); | |
444 | /*16*/ fTreeCascade->Branch("fTreeCascVarDCAPosToPrimVtx",&fTreeCascVarDCAPosToPrimVtx,"fTreeCascVarDCAPosToPrimVtx/F"); | |
445 | /*17*/ fTreeCascade->Branch("fTreeCascVarDCANegToPrimVtx",&fTreeCascVarDCANegToPrimVtx,"fTreeCascVarDCANegToPrimVtx/F"); | |
446 | /*18*/ fTreeCascade->Branch("fTreeCascVarCascCosPointingAngle",&fTreeCascVarCascCosPointingAngle,"fTreeCascVarCascCosPointingAngle/F"); | |
447 | /*19*/ fTreeCascade->Branch("fTreeCascVarCascRadius",&fTreeCascVarCascRadius,"fTreeCascVarCascRadius/F"); | |
448 | /*20*/ fTreeCascade->Branch("fTreeCascVarV0Mass",&fTreeCascVarV0Mass,"fTreeCascVarV0Mass/F"); | |
449 | /*21*/ fTreeCascade->Branch("fTreeCascVarV0CosPointingAngle",&fTreeCascVarV0CosPointingAngle,"fTreeCascVarV0CosPointingAngle/F"); | |
450 | /*22*/ fTreeCascade->Branch("fTreeCascVarV0Radius",&fTreeCascVarV0Radius,"fTreeCascVarV0Radius/F"); | |
451 | /*23*/ fTreeCascade->Branch("fTreeCascVarLeastNbrClusters",&fTreeCascVarLeastNbrClusters,"fTreeCascVarLeastNbrClusters/I"); | |
452 | //-----------MULTIPLICITY-INFO-------------------- | |
453 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicity",&fTreeCascVarMultiplicity,"fTreeCascVarMultiplicity/I"); | |
454 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicityV0A",&fTreeCascVarMultiplicityV0A,"fTreeCascVarMultiplicityV0A/I"); | |
455 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicityZNA",&fTreeCascVarMultiplicityZNA,"fTreeCascVarMultiplicityZNA/I"); | |
456 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicityTRK",&fTreeCascVarMultiplicityTRK,"fTreeCascVarMultiplicityTRK/I"); | |
457 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicitySPD",&fTreeCascVarMultiplicitySPD,"fTreeCascVarMultiplicitySPD/I"); | |
458 | /*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicityMC",&fTreeCascVarMultiplicityMC,"fTreeCascVarMultiplicityMC/I"); | |
459 | //-----------DECAY-LENGTH-INFO-------------------- | |
460 | /*25*/ fTreeCascade->Branch("fTreeCascVarDistOverTotMom",&fTreeCascVarDistOverTotMom,"fTreeCascVarDistOverTotMom/F"); | |
461 | //-----------MC-PID------------------------------- | |
462 | /*26*/ fTreeCascade->Branch("fTreeCascVarPID",&fTreeCascVarPID,"fTreeCascVarPID/I"); | |
463 | /*27*/ fTreeCascade->Branch("fTreeCascVarPIDBachelor",&fTreeCascVarPIDBachelor,"fTreeCascVarPIDBachelor/I"); | |
464 | /*28*/ fTreeCascade->Branch("fTreeCascVarPIDNegative",&fTreeCascVarPIDNegative,"fTreeCascVarPIDNegative/I"); | |
465 | /*29*/ fTreeCascade->Branch("fTreeCascVarPIDPositive",&fTreeCascVarPIDPositive,"fTreeCascVarPIDPositive/I"); | |
466 | /*30*/ fTreeCascade->Branch("fTreeCascVarPosTransMom",&fTreeCascVarPosTransMom,"fTreeCascVarPosTransMom/F"); | |
467 | /*31*/ fTreeCascade->Branch("fTreeCascVarNegTransMom",&fTreeCascVarNegTransMom,"fTreeCascVarNegTransMom/F"); | |
468 | /*32*/ fTreeCascade->Branch("fTreeCascVarPosTransMomMC",&fTreeCascVarPosTransMomMC,"fTreeCascVarPosTransMomMC/F"); | |
469 | /*33*/ fTreeCascade->Branch("fTreeCascVarNegTransMomMC",&fTreeCascVarNegTransMomMC,"fTreeCascVarNegTransMomMC/F"); | |
470 | //------------------------------------------------ | |
471 | /*34*/ fTreeCascade->Branch("fTreeCascVarNegNSigmaPion",&fTreeCascVarNegNSigmaPion,"fTreeCascVarNegNSigmaPion/F"); | |
472 | /*35*/ fTreeCascade->Branch("fTreeCascVarNegNSigmaProton",&fTreeCascVarNegNSigmaProton,"fTreeCascVarNegNSigmaProton/F"); | |
473 | /*36*/ fTreeCascade->Branch("fTreeCascVarPosNSigmaPion",&fTreeCascVarPosNSigmaPion,"fTreeCascVarPosNSigmaPion/F"); | |
474 | /*37*/ fTreeCascade->Branch("fTreeCascVarPosNSigmaProton",&fTreeCascVarPosNSigmaProton,"fTreeCascVarPosNSigmaProton/F"); | |
475 | /*38*/ fTreeCascade->Branch("fTreeCascVarBachNSigmaPion",&fTreeCascVarBachNSigmaPion,"fTreeCascVarBachNSigmaPion/F"); | |
476 | /*39*/ fTreeCascade->Branch("fTreeCascVarBachNSigmaKaon",&fTreeCascVarBachNSigmaKaon,"fTreeCascVarBachNSigmaKaon/F"); | |
477 | ||
478 | //------------------------------------------------ | |
479 | // Particle Identification Setup | |
480 | //------------------------------------------------ | |
481 | ||
482 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
483 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
484 | fPIDResponse = inputHandler->GetPIDResponse(); | |
485 | ||
486 | // Multiplicity | |
487 | ||
488 | if(! fESDtrackCuts ){ | |
489 | fESDtrackCuts = new AliESDtrackCuts(); | |
490 | } | |
491 | if(! fUtils ){ | |
492 | fUtils = new AliAnalysisUtils(); | |
493 | } | |
494 | ||
495 | //------------------------------------------------ | |
496 | // V0 Multiplicity Histograms | |
497 | //------------------------------------------------ | |
498 | ||
499 | // Create histograms | |
500 | OpenFile(1); | |
501 | fListHist = new TList(); | |
502 | fListHist->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner | |
503 | ||
504 | ||
505 | if(! fHistV0MultiplicityBeforeTrigSel) { | |
506 | fHistV0MultiplicityBeforeTrigSel = new TH1F("fHistV0MultiplicityBeforeTrigSel", | |
507 | "V0s per event (before Trig. Sel.);Nbr of V0s/Evt;Events", | |
508 | 25, 0, 25); | |
509 | fListHist->Add(fHistV0MultiplicityBeforeTrigSel); | |
510 | } | |
511 | ||
512 | if(! fHistV0MultiplicityForTrigEvt) { | |
513 | fHistV0MultiplicityForTrigEvt = new TH1F("fHistV0MultiplicityForTrigEvt", | |
514 | "V0s per event (for triggered evt);Nbr of V0s/Evt;Events", | |
515 | 25, 0, 25); | |
516 | fListHist->Add(fHistV0MultiplicityForTrigEvt); | |
517 | } | |
518 | ||
519 | if(! fHistV0MultiplicityForSelEvt) { | |
520 | fHistV0MultiplicityForSelEvt = new TH1F("fHistV0MultiplicityForSelEvt", | |
521 | "V0s per event;Nbr of V0s/Evt;Events", | |
522 | 25, 0, 25); | |
523 | fListHist->Add(fHistV0MultiplicityForSelEvt); | |
524 | } | |
525 | ||
526 | if(! fHistV0MultiplicityForSelEvtNoTPCOnly) { | |
527 | fHistV0MultiplicityForSelEvtNoTPCOnly = new TH1F("fHistV0MultiplicityForSelEvtNoTPCOnly", | |
528 | "V0s per event;Nbr of V0s/Evt;Events", | |
529 | 25, 0, 25); | |
530 | fListHist->Add(fHistV0MultiplicityForSelEvtNoTPCOnly); | |
531 | } | |
532 | if(! fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup) { | |
533 | fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup = new TH1F("fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup", | |
534 | "V0s per event;Nbr of V0s/Evt;Events", | |
535 | 25, 0, 25); | |
536 | fListHist->Add(fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup); | |
537 | } | |
538 | ||
539 | //------------------------------------------------ | |
540 | // Track Multiplicity Histograms | |
541 | //------------------------------------------------ | |
542 | ||
543 | if(! fHistMultiplicityBeforeTrigSel) { | |
544 | fHistMultiplicityBeforeTrigSel = new TH1F("fHistMultiplicityBeforeTrigSel", | |
545 | "Tracks per event;Nbr of Tracks;Events", | |
546 | 200, 0, 200); | |
547 | fListHist->Add(fHistMultiplicityBeforeTrigSel); | |
548 | } | |
549 | if(! fHistMultiplicityForTrigEvt) { | |
550 | fHistMultiplicityForTrigEvt = new TH1F("fHistMultiplicityForTrigEvt", | |
551 | "Tracks per event;Nbr of Tracks;Events", | |
552 | 200, 0, 200); | |
553 | fListHist->Add(fHistMultiplicityForTrigEvt); | |
554 | } | |
555 | if(! fHistMultiplicity) { | |
556 | fHistMultiplicity = new TH1F("fHistMultiplicity", | |
557 | "Tracks per event;Nbr of Tracks;Events", | |
558 | 200, 0, 200); | |
559 | fListHist->Add(fHistMultiplicity); | |
560 | } | |
561 | if(! fHistMultiplicityNoTPCOnly) { | |
562 | fHistMultiplicityNoTPCOnly = new TH1F("fHistMultiplicityNoTPCOnly", | |
563 | "Tracks per event;Nbr of Tracks;Events", | |
564 | 200, 0, 200); | |
565 | fListHist->Add(fHistMultiplicityNoTPCOnly); | |
566 | } | |
567 | if(! fHistMultiplicityNoTPCOnlyNoPileup) { | |
568 | fHistMultiplicityNoTPCOnlyNoPileup = new TH1F("fHistMultiplicityNoTPCOnlyNoPileup", | |
569 | "Tracks per event;Nbr of Tracks;Events", | |
570 | 200, 0, 200); | |
571 | fListHist->Add(fHistMultiplicityNoTPCOnlyNoPileup); | |
572 | } | |
573 | ||
574 | ||
575 | //V0A Centrality (if PbPb / pPb) | |
576 | if(! fHistMultiplicityV0ABeforeTrigSel) { | |
577 | fHistMultiplicityV0ABeforeTrigSel = new TH1F("fHistMultiplicityV0ABeforeTrigSel", | |
578 | "Centrality Distribution: V0A;V0A Centrality;Events", | |
579 | 200, 0, 200); | |
580 | fListHist->Add(fHistMultiplicityV0ABeforeTrigSel); | |
581 | } | |
582 | if(! fHistMultiplicityV0AForTrigEvt) { | |
583 | fHistMultiplicityV0AForTrigEvt = new TH1F("fHistMultiplicityV0AForTrigEvt", | |
584 | "Centrality Distribution: V0A;V0A Centrality;Events", | |
585 | 200, 0, 200); | |
586 | fListHist->Add(fHistMultiplicityV0AForTrigEvt); | |
587 | } | |
588 | if(! fHistMultiplicityV0A) { | |
589 | fHistMultiplicityV0A = new TH1F("fHistMultiplicityV0A", | |
590 | "Centrality Distribution: V0A;V0A Centrality;Events", | |
591 | 200, 0, 200); | |
592 | fListHist->Add(fHistMultiplicityV0A); | |
593 | } | |
594 | if(! fHistMultiplicityV0ANoTPCOnly) { | |
595 | fHistMultiplicityV0ANoTPCOnly = new TH1F("fHistMultiplicityV0ANoTPCOnly", | |
596 | "Centrality Distribution: V0A;V0A Centrality;Events", | |
597 | 200, 0, 200); | |
598 | fListHist->Add(fHistMultiplicityV0ANoTPCOnly); | |
599 | } | |
600 | if(! fHistMultiplicityV0ANoTPCOnlyNoPileup) { | |
601 | fHistMultiplicityV0ANoTPCOnlyNoPileup = new TH1F("fHistMultiplicityV0ANoTPCOnlyNoPileup", | |
602 | "Centrality Distribution: V0A;V0A Centrality;Events", | |
603 | 200, 0, 200); | |
604 | fListHist->Add(fHistMultiplicityV0ANoTPCOnlyNoPileup); | |
605 | } | |
606 | ||
607 | //ZNA Centrality (if PbPb / pPb) | |
608 | if(! fHistMultiplicityZNABeforeTrigSel) { | |
609 | fHistMultiplicityZNABeforeTrigSel = new TH1F("fHistMultiplicityZNABeforeTrigSel", | |
610 | "Centrality Distribution: ZNA;ZNA Centrality;Events", | |
611 | 200, 0, 200); | |
612 | fListHist->Add(fHistMultiplicityZNABeforeTrigSel); | |
613 | } | |
614 | if(! fHistMultiplicityZNAForTrigEvt) { | |
615 | fHistMultiplicityZNAForTrigEvt = new TH1F("fHistMultiplicityZNAForTrigEvt", | |
616 | "Centrality Distribution: ZNA;ZNA Centrality;Events", | |
617 | 200, 0, 200); | |
618 | fListHist->Add(fHistMultiplicityZNAForTrigEvt); | |
619 | } | |
620 | if(! fHistMultiplicityZNA) { | |
621 | fHistMultiplicityZNA = new TH1F("fHistMultiplicityZNA", | |
622 | "Centrality Distribution: ZNA;ZNA Centrality;Events", | |
623 | 200, 0, 200); | |
624 | fListHist->Add(fHistMultiplicityZNA); | |
625 | } | |
626 | if(! fHistMultiplicityZNANoTPCOnly) { | |
627 | fHistMultiplicityZNANoTPCOnly = new TH1F("fHistMultiplicityZNANoTPCOnly", | |
628 | "Centrality Distribution: ZNA;ZNA Centrality;Events", | |
629 | 200, 0, 200); | |
630 | fListHist->Add(fHistMultiplicityZNANoTPCOnly); | |
631 | } | |
632 | if(! fHistMultiplicityZNANoTPCOnlyNoPileup) { | |
633 | fHistMultiplicityZNANoTPCOnlyNoPileup = new TH1F("fHistMultiplicityZNANoTPCOnlyNoPileup", | |
634 | "Centrality Distribution: ZNA;ZNA Centrality;Events", | |
635 | 200, 0, 200); | |
636 | fListHist->Add(fHistMultiplicityZNANoTPCOnlyNoPileup); | |
637 | } | |
638 | ||
639 | //TRK Centrality (if PbPb / pPb) | |
640 | if(! fHistMultiplicityTRKBeforeTrigSel) { | |
641 | fHistMultiplicityTRKBeforeTrigSel = new TH1F("fHistMultiplicityTRKBeforeTrigSel", | |
642 | "Centrality Distribution: TRK;TRK Centrality;Events", | |
643 | 200, 0, 200); | |
644 | fListHist->Add(fHistMultiplicityTRKBeforeTrigSel); | |
645 | } | |
646 | if(! fHistMultiplicityTRKForTrigEvt) { | |
647 | fHistMultiplicityTRKForTrigEvt = new TH1F("fHistMultiplicityTRKForTrigEvt", | |
648 | "Centrality Distribution: TRK;TRK Centrality;Events", | |
649 | 200, 0, 200); | |
650 | fListHist->Add(fHistMultiplicityTRKForTrigEvt); | |
651 | } | |
652 | if(! fHistMultiplicityTRK) { | |
653 | fHistMultiplicityTRK = new TH1F("fHistMultiplicityTRK", | |
654 | "Centrality Distribution: TRK;TRK Centrality;Events", | |
655 | 200, 0, 200); | |
656 | fListHist->Add(fHistMultiplicityTRK); | |
657 | } | |
658 | if(! fHistMultiplicityTRKNoTPCOnly) { | |
659 | fHistMultiplicityTRKNoTPCOnly = new TH1F("fHistMultiplicityTRKNoTPCOnly", | |
660 | "Centrality Distribution: TRK;TRK Centrality;Events", | |
661 | 200, 0, 200); | |
662 | fListHist->Add(fHistMultiplicityTRKNoTPCOnly); | |
663 | } | |
664 | if(! fHistMultiplicityTRKNoTPCOnlyNoPileup) { | |
665 | fHistMultiplicityTRKNoTPCOnlyNoPileup = new TH1F("fHistMultiplicityTRKNoTPCOnlyNoPileup", | |
666 | "Centrality Distribution: TRK;TRK Centrality;Events", | |
667 | 200, 0, 200); | |
668 | fListHist->Add(fHistMultiplicityTRKNoTPCOnlyNoPileup); | |
669 | } | |
670 | ||
671 | //SPD Centrality (if PbPb / pPb) | |
672 | if(! fHistMultiplicitySPDBeforeTrigSel) { | |
673 | fHistMultiplicitySPDBeforeTrigSel = new TH1F("fHistMultiplicitySPDBeforeTrigSel", | |
674 | "Centrality Distribution: SPD;SPD Centrality;Events", | |
675 | 200, 0, 200); | |
676 | fListHist->Add(fHistMultiplicitySPDBeforeTrigSel); | |
677 | } | |
678 | if(! fHistMultiplicitySPDForTrigEvt) { | |
679 | fHistMultiplicitySPDForTrigEvt = new TH1F("fHistMultiplicitySPDForTrigEvt", | |
680 | "Centrality Distribution: SPD;SPD Centrality;Events", | |
681 | 200, 0, 200); | |
682 | fListHist->Add(fHistMultiplicitySPDForTrigEvt); | |
683 | } | |
684 | if(! fHistMultiplicitySPD) { | |
685 | fHistMultiplicitySPD = new TH1F("fHistMultiplicitySPD", | |
686 | "Centrality Distribution: SPD;SPD Centrality;Events", | |
687 | 200, 0, 200); | |
688 | fListHist->Add(fHistMultiplicitySPD); | |
689 | } | |
690 | if(! fHistMultiplicitySPDNoTPCOnly) { | |
691 | fHistMultiplicitySPDNoTPCOnly = new TH1F("fHistMultiplicitySPDNoTPCOnly", | |
692 | "Centrality Distribution: SPD;SPD Centrality;Events", | |
693 | 200, 0, 200); | |
694 | fListHist->Add(fHistMultiplicitySPDNoTPCOnly); | |
695 | } | |
696 | if(! fHistMultiplicitySPDNoTPCOnlyNoPileup) { | |
697 | fHistMultiplicitySPDNoTPCOnlyNoPileup = new TH1F("fHistMultiplicitySPDNoTPCOnlyNoPileup", | |
698 | "Centrality Distribution: SPD;SPD Centrality;Events", | |
699 | 200, 0, 200); | |
700 | fListHist->Add(fHistMultiplicitySPDNoTPCOnlyNoPileup); | |
701 | } | |
702 | ||
703 | ||
704 | ||
705 | ||
706 | //------------------------------------------------ | |
707 | // Generated Particle Histograms | |
708 | //------------------------------------------------ | |
709 | ||
710 | Int_t lCustomNBins = 200; | |
711 | Double_t lCustomPtUpperLimit = 20; | |
712 | Int_t lCustomNBinsMultiplicity = 100; | |
713 | ||
714 | //---------------------------------- | |
715 | // Raw Generated (Pre-physics-selection) | |
716 | //---------------------------------- | |
717 | ||
718 | //-------------------------------------------------------------------------------------- | |
719 | //--- 3D Histo (Pt, Y, Multiplicity) for generated XiMinus/Plus, all generated | |
720 | ||
721 | if(! f3dHistGenPtVsYVsMultXiMinus) { | |
722 | f3dHistGenPtVsYVsMultXiMinus = new TH3F( "f3dHistGenPtVsYVsMultXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
723 | fListHist->Add(f3dHistGenPtVsYVsMultXiMinus); | |
724 | } | |
725 | if(! f3dHistGenPtVsYVsMultXiPlus) { | |
726 | f3dHistGenPtVsYVsMultXiPlus = new TH3F( "f3dHistGenPtVsYVsMultXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
727 | fListHist->Add(f3dHistGenPtVsYVsMultXiPlus); | |
728 | } | |
729 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
730 | ||
731 | if(! f3dHistGenPtVsYVsMultOmegaMinus) { | |
732 | f3dHistGenPtVsYVsMultOmegaMinus = new TH3F( "f3dHistGenPtVsYVsMultOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
733 | fListHist->Add(f3dHistGenPtVsYVsMultOmegaMinus); | |
734 | } | |
735 | if(! f3dHistGenPtVsYVsMultOmegaPlus) { | |
736 | f3dHistGenPtVsYVsMultOmegaPlus = new TH3F( "f3dHistGenPtVsYVsMultOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
737 | fListHist->Add(f3dHistGenPtVsYVsMultOmegaPlus); | |
738 | } | |
739 | ||
740 | //All generated cascades, YCMS | |
741 | ||
742 | if(! f3dHistGenPtVsYCMSVsMultXiMinus) { | |
743 | f3dHistGenPtVsYCMSVsMultXiMinus = new TH3F( "f3dHistGenPtVsYCMSVsMultXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
744 | fListHist->Add(f3dHistGenPtVsYCMSVsMultXiMinus); | |
745 | } | |
746 | if(! f3dHistGenPtVsYCMSVsMultXiPlus) { | |
747 | f3dHistGenPtVsYCMSVsMultXiPlus = new TH3F( "f3dHistGenPtVsYCMSVsMultXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
748 | fListHist->Add(f3dHistGenPtVsYCMSVsMultXiPlus); | |
749 | } | |
750 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
751 | ||
752 | if(! f3dHistGenPtVsYCMSVsMultOmegaMinus) { | |
753 | f3dHistGenPtVsYCMSVsMultOmegaMinus = new TH3F( "f3dHistGenPtVsYCMSVsMultOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
754 | fListHist->Add(f3dHistGenPtVsYCMSVsMultOmegaMinus); | |
755 | } | |
756 | if(! f3dHistGenPtVsYCMSVsMultOmegaPlus) { | |
757 | f3dHistGenPtVsYCMSVsMultOmegaPlus = new TH3F( "f3dHistGenPtVsYCMSVsMultOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
758 | fListHist->Add(f3dHistGenPtVsYCMSVsMultOmegaPlus); | |
759 | } | |
760 | ||
761 | ||
762 | //-------------------------------------------------------------------------------------- | |
763 | //--- 3D Histo (Pt, Y, Multiplicity) for generated XiMinus/Plus, at selected analysis evts | |
764 | ||
765 | if(! f3dHistGenSelectedPtVsYVsMultXiMinus) { | |
766 | f3dHistGenSelectedPtVsYVsMultXiMinus = new TH3F( "f3dHistGenSelectedPtVsYVsMultXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
767 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultXiMinus); | |
768 | } | |
769 | if(! f3dHistGenSelectedPtVsYVsMultXiPlus) { | |
770 | f3dHistGenSelectedPtVsYVsMultXiPlus = new TH3F( "f3dHistGenSelectedPtVsYVsMultXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
771 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultXiPlus); | |
772 | } | |
773 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
774 | ||
775 | if(! f3dHistGenSelectedPtVsYVsMultOmegaMinus) { | |
776 | f3dHistGenSelectedPtVsYVsMultOmegaMinus = new TH3F( "f3dHistGenSelectedPtVsYVsMultOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
777 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultOmegaMinus); | |
778 | } | |
779 | if(! f3dHistGenSelectedPtVsYVsMultOmegaPlus) { | |
780 | f3dHistGenSelectedPtVsYVsMultOmegaPlus = new TH3F( "f3dHistGenSelectedPtVsYVsMultOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
781 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultOmegaPlus); | |
782 | } | |
783 | ||
784 | //ANALYSIS level Cascades, YCMS | |
785 | ||
786 | ||
787 | if(! f3dHistGenSelectedPtVsYCMSVsMultXiMinus) { | |
788 | f3dHistGenSelectedPtVsYCMSVsMultXiMinus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
789 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultXiMinus); | |
790 | } | |
791 | if(! f3dHistGenSelectedPtVsYCMSVsMultXiPlus) { | |
792 | f3dHistGenSelectedPtVsYCMSVsMultXiPlus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
793 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultXiPlus); | |
794 | } | |
795 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
796 | ||
797 | if(! f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus) { | |
798 | f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
799 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus); | |
800 | } | |
801 | if(! f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus) { | |
802 | f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
803 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus); | |
804 | } | |
805 | ||
806 | ||
807 | //-------------------------------------------------------------------------------------- | |
808 | // True Generated (For Multiplicity Unfolding) | |
809 | //-------------------------------------------------------------------------------------- | |
810 | //--- 3D Histo (Pt, Y, Multiplicity) for generated XiMinus/Plus, all generated | |
811 | ||
812 | if(! f3dHistGenPtVsYVsMultMCXiMinus) { | |
813 | f3dHistGenPtVsYVsMultMCXiMinus = new TH3F( "f3dHistGenPtVsYVsMultMCXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
814 | fListHist->Add(f3dHistGenPtVsYVsMultMCXiMinus); | |
815 | } | |
816 | if(! f3dHistGenPtVsYVsMultMCXiPlus) { | |
817 | f3dHistGenPtVsYVsMultMCXiPlus = new TH3F( "f3dHistGenPtVsYVsMultMCXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
818 | fListHist->Add(f3dHistGenPtVsYVsMultMCXiPlus); | |
819 | } | |
820 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
821 | ||
822 | if(! f3dHistGenPtVsYVsMultMCOmegaMinus) { | |
823 | f3dHistGenPtVsYVsMultMCOmegaMinus = new TH3F( "f3dHistGenPtVsYVsMultMCOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
824 | fListHist->Add(f3dHistGenPtVsYVsMultMCOmegaMinus); | |
825 | } | |
826 | if(! f3dHistGenPtVsYVsMultMCOmegaPlus) { | |
827 | f3dHistGenPtVsYVsMultMCOmegaPlus = new TH3F( "f3dHistGenPtVsYVsMultMCOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
828 | fListHist->Add(f3dHistGenPtVsYVsMultMCOmegaPlus); | |
829 | } | |
830 | ||
831 | //All generated cascades, YCMS | |
832 | ||
833 | if(! f3dHistGenPtVsYCMSVsMultMCXiMinus) { | |
834 | f3dHistGenPtVsYCMSVsMultMCXiMinus = new TH3F( "f3dHistGenPtVsYCMSVsMultMCXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
835 | fListHist->Add(f3dHistGenPtVsYCMSVsMultMCXiMinus); | |
836 | } | |
837 | if(! f3dHistGenPtVsYCMSVsMultMCXiPlus) { | |
838 | f3dHistGenPtVsYCMSVsMultMCXiPlus = new TH3F( "f3dHistGenPtVsYCMSVsMultMCXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
839 | fListHist->Add(f3dHistGenPtVsYCMSVsMultMCXiPlus); | |
840 | } | |
841 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
842 | ||
843 | if(! f3dHistGenPtVsYCMSVsMultMCOmegaMinus) { | |
844 | f3dHistGenPtVsYCMSVsMultMCOmegaMinus = new TH3F( "f3dHistGenPtVsYCMSVsMultMCOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
845 | fListHist->Add(f3dHistGenPtVsYCMSVsMultMCOmegaMinus); | |
846 | } | |
847 | if(! f3dHistGenPtVsYCMSVsMultMCOmegaPlus) { | |
848 | f3dHistGenPtVsYCMSVsMultMCOmegaPlus = new TH3F( "f3dHistGenPtVsYCMSVsMultMCOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
849 | fListHist->Add(f3dHistGenPtVsYCMSVsMultMCOmegaPlus); | |
850 | } | |
851 | ||
852 | ||
853 | //-------------------------------------------------------------------------------------- | |
854 | //--- 3D Histo (Pt, Y, Multiplicity) for generated XiMinus/Plus, at selected analysis evts | |
855 | ||
856 | if(! f3dHistGenSelectedPtVsYVsMultMCXiMinus) { | |
857 | f3dHistGenSelectedPtVsYVsMultMCXiMinus = new TH3F( "f3dHistGenSelectedPtVsYVsMultMCXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
858 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultMCXiMinus); | |
859 | } | |
860 | if(! f3dHistGenSelectedPtVsYVsMultMCXiPlus) { | |
861 | f3dHistGenSelectedPtVsYVsMultMCXiPlus = new TH3F( "f3dHistGenSelectedPtVsYVsMultMCXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
862 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultMCXiPlus); | |
863 | } | |
864 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
865 | ||
866 | if(! f3dHistGenSelectedPtVsYVsMultMCOmegaMinus) { | |
867 | f3dHistGenSelectedPtVsYVsMultMCOmegaMinus = new TH3F( "f3dHistGenSelectedPtVsYVsMultMCOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
868 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultMCOmegaMinus); | |
869 | } | |
870 | if(! f3dHistGenSelectedPtVsYVsMultMCOmegaPlus) { | |
871 | f3dHistGenSelectedPtVsYVsMultMCOmegaPlus = new TH3F( "f3dHistGenSelectedPtVsYVsMultMCOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
872 | fListHist->Add(f3dHistGenSelectedPtVsYVsMultMCOmegaPlus); | |
873 | } | |
874 | ||
875 | //ANALYSIS level Cascades, YCMS | |
876 | ||
877 | ||
878 | if(! f3dHistGenSelectedPtVsYCMSVsMultMCXiMinus) { | |
879 | f3dHistGenSelectedPtVsYCMSVsMultMCXiMinus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultMCXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
880 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultMCXiMinus); | |
881 | } | |
882 | if(! f3dHistGenSelectedPtVsYCMSVsMultMCXiPlus) { | |
883 | f3dHistGenSelectedPtVsYCMSVsMultMCXiPlus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultMCXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
884 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultMCXiPlus); | |
885 | } | |
886 | //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus | |
887 | ||
888 | if(! f3dHistGenSelectedPtVsYCMSVsMultMCOmegaMinus) { | |
889 | f3dHistGenSelectedPtVsYCMSVsMultMCOmegaMinus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultMCOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
890 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultMCOmegaMinus); | |
891 | } | |
892 | if(! f3dHistGenSelectedPtVsYCMSVsMultMCOmegaPlus) { | |
893 | f3dHistGenSelectedPtVsYCMSVsMultMCOmegaPlus = new TH3F( "f3dHistGenSelectedPtVsYCMSVsMultMCOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
894 | fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultMCOmegaPlus); | |
895 | } | |
896 | ||
897 | //---------------------------------- | |
898 | // Primary Vertex Position Histos | |
899 | //---------------------------------- | |
900 | ||
901 | if(! fHistPVx) { | |
902 | fHistPVx = new TH1F("fHistPVx", | |
903 | "PV x position;Nbr of Evts;x", | |
904 | 2000, -0.5, 0.5); | |
905 | fListHist->Add(fHistPVx); | |
906 | } | |
907 | if(! fHistPVy) { | |
908 | fHistPVy = new TH1F("fHistPVy", | |
909 | "PV y position;Nbr of Evts;y", | |
910 | 2000, -0.5, 0.5); | |
911 | fListHist->Add(fHistPVy); | |
912 | } | |
913 | if(! fHistPVz) { | |
914 | fHistPVz = new TH1F("fHistPVz", | |
915 | "PV z position;Nbr of Evts;z", | |
916 | 400, -20, 20); | |
917 | fListHist->Add(fHistPVz); | |
918 | } | |
919 | ||
920 | if(! fHistPVxAnalysis) { | |
921 | fHistPVxAnalysis = new TH1F("fHistPVxAnalysis", | |
922 | "PV x position;Nbr of Evts;x", | |
923 | 2000, -0.5, 0.5); | |
924 | fListHist->Add(fHistPVxAnalysis); | |
925 | } | |
926 | if(! fHistPVyAnalysis) { | |
927 | fHistPVyAnalysis = new TH1F("fHistPVyAnalysis", | |
928 | "PV y position;Nbr of Evts;y", | |
929 | 2000, -0.5, 0.5); | |
930 | fListHist->Add(fHistPVyAnalysis); | |
931 | } | |
932 | if(! fHistPVzAnalysis) { | |
933 | fHistPVzAnalysis = new TH1F("fHistPVzAnalysis", | |
934 | "PV z position;Nbr of Evts;z", | |
935 | 400, -20, 20); | |
936 | fListHist->Add(fHistPVzAnalysis); | |
937 | } | |
938 | ||
939 | //List of Histograms: Normal | |
940 | PostData(1, fListHist); | |
941 | ||
942 | //TTree Object: Saved to base directory. Should cache to disk while saving. | |
943 | //(Important to avoid excessive memory usage, particularly when merging) | |
944 | PostData(2, fTreeCascade); | |
945 | ||
946 | }// end UserCreateOutputObjects | |
947 | ||
948 | ||
949 | //________________________________________________________________________ | |
950 | void AliAnalysisTaskExtractPerformanceCascade::UserExec(Option_t *) | |
951 | { | |
952 | // Main loop | |
953 | // Called for each event | |
954 | ||
955 | AliESDEvent *lESDevent = 0x0; | |
956 | AliMCEvent *lMCevent = 0x0; | |
957 | AliStack *lMCstack = 0x0; | |
958 | ||
959 | Int_t lNumberOfV0s = -1; | |
960 | Double_t lTrkgPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
961 | Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
962 | Double_t lMagneticField = -10.; | |
963 | ||
964 | // Connect to the InputEvent | |
965 | // After these lines, we should have an ESD/AOD event + the number of V0s in it. | |
966 | ||
967 | // Appropriate for ESD analysis! | |
968 | ||
969 | lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() ); | |
970 | if (!lESDevent) { | |
971 | AliWarning("ERROR: lESDevent not available \n"); | |
972 | return; | |
973 | } | |
974 | ||
975 | /* --- Acquisition of exact event ID | |
976 | fTreeVariableRunNumber = lESDevent->GetRunNumber(); | |
977 | fTreeVariableEventNumber = | |
978 | ( ( ((ULong64_t)lESDevent->GetPeriodNumber() ) << 36 ) | | |
979 | ( ((ULong64_t)lESDevent->GetOrbitNumber () ) << 12 ) | | |
980 | ((ULong64_t)lESDevent->GetBunchCrossNumber() ) ); | |
981 | */ | |
982 | lMCevent = MCEvent(); | |
983 | if (!lMCevent) { | |
984 | Printf("ERROR: Could not retrieve MC event \n"); | |
985 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
986 | return; | |
987 | } | |
988 | ||
989 | lMCstack = lMCevent->Stack(); | |
990 | if (!lMCstack) { | |
991 | Printf("ERROR: Could not retrieve MC stack \n"); | |
992 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
993 | return; | |
994 | } | |
995 | TArrayF mcPrimaryVtx; | |
996 | AliGenEventHeader* mcHeader=lMCevent->GenEventHeader(); | |
997 | if(!mcHeader) return; | |
998 | mcHeader->PrimaryVertex(mcPrimaryVtx); | |
999 | ||
1000 | //------------------------------------------------ | |
1001 | // Multiplicity Information Acquistion | |
1002 | //------------------------------------------------ | |
1003 | ||
1004 | //REVISED multiplicity estimator after 'multiplicity day' (2011) | |
1005 | Int_t lMultiplicity = -100; | |
1006 | Int_t lMultiplicityV0A = -100; | |
1007 | Int_t lMultiplicityZNA = -100; | |
1008 | Int_t lMultiplicityTRK = -100; | |
1009 | Int_t lMultiplicitySPD = -100; | |
1010 | ||
1011 | //testing purposes | |
1012 | if(fkIsNuclear == kFALSE) lMultiplicity = fESDtrackCuts->GetReferenceMultiplicity(lESDevent, AliESDtrackCuts::kTrackletsITSTPC,0.5); | |
1013 | ||
1014 | //--------- GENERATED NUMBER OF CHARGED PARTICLES | |
1015 | // ---> Set Variables to Zero again | |
1016 | // ---> Variable Definition | |
1017 | ||
1018 | Long_t lNumberOfCharged = 0; | |
1019 | ||
1020 | //----- Loop on Stack ---------------------------------------------------------------- | |
1021 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < (lMCstack->GetNtrack()); iCurrentLabelStack++) | |
1022 | {// This is the begining of the loop on tracks | |
1023 | TParticle* particleOne = lMCstack->Particle(iCurrentLabelStack); | |
1024 | if(!particleOne) continue; | |
1025 | if(!particleOne->GetPDG()) continue; | |
1026 | Double_t lThisCharge = particleOne->GetPDG()->Charge()/3.; | |
1027 | if(TMath::Abs(lThisCharge)<0.001) continue; | |
1028 | if(! (lMCstack->IsPhysicalPrimary(iCurrentLabelStack)) ) continue; | |
1029 | ||
1030 | //Double_t gpt = particleOne -> Pt(); | |
1031 | Double_t geta = particleOne -> Eta(); | |
1032 | ||
1033 | if( TMath::Abs(geta) < 0.5) lNumberOfCharged++; | |
1034 | }//End of loop on tracks | |
1035 | //----- End Loop on Stack ------------------------------------------------------------ | |
1036 | ||
1037 | ||
1038 | //---> If this is a nuclear collision, then go nuclear on "multiplicity" variable... | |
1039 | //---> Warning: Experimental | |
1040 | if(fkIsNuclear == kTRUE){ | |
1041 | AliCentrality* centrality; | |
1042 | centrality = lESDevent->GetCentrality(); | |
1043 | lMultiplicity = ( ( Int_t ) ( centrality->GetCentralityPercentile( fCentralityEstimator.Data() ) ) ); | |
1044 | lMultiplicityV0A = ( ( Int_t ) ( centrality->GetCentralityPercentile( "V0A" ) ) ); | |
1045 | lMultiplicityZNA = ( ( Int_t ) ( centrality->GetCentralityPercentile( "ZNA" ) ) ); | |
1046 | lMultiplicityTRK = ( ( Int_t ) ( centrality->GetCentralityPercentile( "TRK" ) ) ); | |
1047 | lMultiplicitySPD = ( ( Int_t ) ( centrality->GetCentralityPercentile( "CL1" ) ) ); | |
1048 | if (centrality->GetQuality()>1) { | |
1049 | PostData(1, fListHist); | |
1050 | PostData(2, fTreeCascade); | |
1051 | return; | |
1052 | } | |
1053 | } | |
1054 | ||
1055 | //Set variable for filling tree afterwards! | |
1056 | //---> pp case......: GetReferenceMultiplicity | |
1057 | //---> Pb-Pb case...: Centrality by V0M | |
1058 | ||
1059 | fTreeCascVarMultiplicity = lMultiplicity; | |
1060 | fTreeCascVarMultiplicityMC = lNumberOfCharged; | |
1061 | fTreeCascVarMultiplicityV0A = lMultiplicityV0A; | |
1062 | fTreeCascVarMultiplicityZNA = lMultiplicityZNA; | |
1063 | fTreeCascVarMultiplicityTRK = lMultiplicityTRK; | |
1064 | fTreeCascVarMultiplicitySPD = lMultiplicitySPD; | |
1065 | ||
1066 | fHistV0MultiplicityBeforeTrigSel->Fill ( lESDevent->GetNumberOfV0s() ); | |
1067 | fHistMultiplicityBeforeTrigSel->Fill ( lMultiplicity ); | |
1068 | fHistMultiplicityV0ABeforeTrigSel->Fill ( lMultiplicityV0A ); | |
1069 | fHistMultiplicityZNABeforeTrigSel->Fill ( lMultiplicityZNA ); | |
1070 | fHistMultiplicityTRKBeforeTrigSel->Fill ( lMultiplicityTRK ); | |
1071 | fHistMultiplicitySPDBeforeTrigSel->Fill ( lMultiplicitySPD ); | |
1072 | ||
1073 | //------------------------------------------------ | |
1074 | // MC Information Acquistion | |
1075 | //------------------------------------------------ | |
1076 | ||
1077 | Int_t iNumberOfPrimaries = -1; | |
1078 | iNumberOfPrimaries = lMCstack->GetNprimary(); | |
1079 | if(iNumberOfPrimaries < 1) return; | |
1080 | ||
1081 | //------------------------------------------------ | |
1082 | // Variable Definition | |
1083 | //------------------------------------------------ | |
1084 | ||
1085 | Int_t lNbMCPrimary = 0; | |
1086 | ||
1087 | Double_t lPtCurrentPart = 0; | |
1088 | ||
1089 | //Int_t lComeFromSigma = 0; | |
1090 | ||
1091 | // current mc particle 's mother | |
1092 | //Int_t iCurrentMother = 0; | |
1093 | lNbMCPrimary = lMCstack->GetNprimary(); | |
1094 | ||
1095 | //------------------------------------------------ | |
1096 | // Pre-Physics Selection | |
1097 | //------------------------------------------------ | |
1098 | ||
1099 | //----- Loop on primary Xi, Omega -------------------------------------------------------------- | |
1100 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) | |
1101 | {// This is the begining of the loop on primaries | |
1102 | ||
1103 | TParticle* lCurrentParticlePrimary = 0x0; | |
1104 | lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); | |
1105 | if(!lCurrentParticlePrimary){ | |
1106 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
1107 | continue; | |
1108 | } | |
1109 | if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) { | |
1110 | Double_t lRapXiMCPrimary = -100; | |
1111 | if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) { | |
1112 | if ( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) !=0 ){ | |
1113 | lRapXiMCPrimary = 0.5*TMath::Log( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) ); | |
1114 | } | |
1115 | } | |
1116 | ||
1117 | //================================================================================= | |
1118 | // Xi Histograms | |
1119 | if( lCurrentParticlePrimary->GetPdgCode() == 3312 ){ | |
1120 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1121 | f3dHistGenPtVsYVsMultXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1122 | f3dHistGenPtVsYCMSVsMultXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1123 | //MultMC | |
1124 | f3dHistGenPtVsYVsMultMCXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1125 | f3dHistGenPtVsYCMSVsMultMCXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1126 | } | |
1127 | if( lCurrentParticlePrimary->GetPdgCode() == -3312 ){ | |
1128 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1129 | f3dHistGenPtVsYVsMultXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1130 | f3dHistGenPtVsYCMSVsMultXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1131 | //MultMC | |
1132 | f3dHistGenPtVsYVsMultMCXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1133 | f3dHistGenPtVsYCMSVsMultMCXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1134 | } | |
1135 | // Omega Histograms | |
1136 | if( lCurrentParticlePrimary->GetPdgCode() == 3334 ){ | |
1137 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1138 | f3dHistGenPtVsYVsMultOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1139 | f3dHistGenPtVsYCMSVsMultOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1140 | //MultMC | |
1141 | f3dHistGenPtVsYVsMultMCOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1142 | f3dHistGenPtVsYCMSVsMultMCOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1143 | } | |
1144 | if( lCurrentParticlePrimary->GetPdgCode() == -3334 ){ | |
1145 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1146 | f3dHistGenPtVsYVsMultOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1147 | f3dHistGenPtVsYCMSVsMultOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1148 | //MultMC | |
1149 | f3dHistGenPtVsYVsMultMCOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1150 | f3dHistGenPtVsYCMSVsMultMCOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1151 | } | |
1152 | } | |
1153 | } | |
1154 | //----- End Loop on primary Xi, Omega ---------------------------------------------------------- | |
1155 | ||
1156 | // ---> Set Variables to Zero again | |
1157 | // ---> Variable Definition | |
1158 | ||
1159 | lPtCurrentPart = 0; | |
1160 | ||
1161 | //------------------------------------------------ | |
1162 | // Physics Selection | |
1163 | //------------------------------------------------ | |
1164 | ||
1165 | UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
1166 | Bool_t isSelected = 0; | |
1167 | isSelected = (maskIsSelected & AliVEvent::kMB) == AliVEvent::kMB; | |
1168 | ||
1169 | //pA triggering: CINT7 | |
1170 | if( fkSwitchINT7 ) isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7; | |
1171 | ||
1172 | //Standard Min-Bias Selection | |
1173 | if ( ! isSelected ) { | |
1174 | PostData(1, fListHist); | |
1175 | PostData(2, fTreeCascade); | |
1176 | return; | |
1177 | } | |
1178 | ||
1179 | //------------------------------------------------ | |
1180 | // Rerun cascade vertexer! | |
1181 | //------------------------------------------------ | |
1182 | /* | |
1183 | lESDevent->ResetCascades(); | |
1184 | lESDevent->ResetV0s(); | |
1185 | ||
1186 | AliV0vertexer lV0vtxer; | |
1187 | AliCascadeVertexer lCascVtxer; | |
1188 | ||
1189 | lV0vtxer.SetDefaultCuts(fV0Sels); | |
1190 | lCascVtxer.SetDefaultCuts(fCascSels); | |
1191 | ||
1192 | lV0vtxer.Tracks2V0vertices(lESDevent); | |
1193 | lCascVtxer.V0sTracks2CascadeVertices(lESDevent); | |
1194 | */ | |
1195 | //------------------------------------------------ | |
1196 | // After Trigger Selection | |
1197 | //------------------------------------------------ | |
1198 | ||
1199 | lNumberOfV0s = lESDevent->GetNumberOfV0s(); | |
1200 | ||
1201 | //Set variable for filling tree afterwards! | |
1202 | fHistV0MultiplicityForTrigEvt->Fill(lNumberOfV0s); | |
1203 | fHistMultiplicityForTrigEvt->Fill ( lMultiplicity ); | |
1204 | fHistMultiplicityV0AForTrigEvt ->Fill( lMultiplicityV0A ); | |
1205 | fHistMultiplicityZNAForTrigEvt ->Fill( lMultiplicityZNA ); | |
1206 | fHistMultiplicityTRKForTrigEvt ->Fill( lMultiplicityTRK ); | |
1207 | fHistMultiplicitySPDForTrigEvt ->Fill( lMultiplicitySPD ); | |
1208 | ||
1209 | //------------------------------------------------ | |
1210 | // Getting: Primary Vertex + MagField Info | |
1211 | //------------------------------------------------ | |
1212 | ||
1213 | const AliESDVertex *lPrimaryTrackingESDVtx = lESDevent->GetPrimaryVertexTracks(); | |
1214 | // get the vtx stored in ESD found with tracks | |
1215 | lPrimaryTrackingESDVtx->GetXYZ( lTrkgPrimaryVtxPos ); | |
1216 | ||
1217 | const AliESDVertex *lPrimaryBestESDVtx = lESDevent->GetPrimaryVertex(); | |
1218 | // get the best primary vertex available for the event | |
1219 | // As done in AliCascadeVertexer, we keep the one which is the best one available. | |
1220 | // between : Tracking vertex > SPD vertex > TPC vertex > default SPD vertex | |
1221 | // This one will be used for next calculations (DCA essentially) | |
1222 | lPrimaryBestESDVtx->GetXYZ( lBestPrimaryVtxPos ); | |
1223 | ||
1224 | Double_t lPrimaryVtxPosition[3]; | |
1225 | const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex(); | |
1226 | lPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
1227 | lPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
1228 | lPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
1229 | fHistPVx->Fill( lPrimaryVtxPosition[0] ); | |
1230 | fHistPVy->Fill( lPrimaryVtxPosition[1] ); | |
1231 | fHistPVz->Fill( lPrimaryVtxPosition[2] ); | |
1232 | ||
1233 | //------------------------------------------------ | |
1234 | // Primary Vertex Z position: SKIP | |
1235 | //------------------------------------------------ | |
1236 | ||
1237 | if(TMath::Abs(lBestPrimaryVtxPos[2]) > 10.0 && fkpAVertexSelection==kFALSE) { | |
1238 | AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !"); | |
1239 | PostData(1, fListHist); | |
1240 | PostData(2, fTreeCascade); | |
1241 | return; | |
1242 | } | |
1243 | if(fkpAVertexSelection==kTRUE && fUtils->IsFirstEventInChunk(lESDevent)) { | |
1244 | AliWarning("Pb / | This is the first event in the chunk!"); | |
1245 | PostData(1, fListHist); | |
1246 | PostData(2, fTreeCascade); | |
1247 | return; | |
1248 | } | |
1249 | if(fkpAVertexSelection==kTRUE && !fUtils->IsVertexSelected2013pA(lESDevent)) { | |
1250 | AliWarning("Pb / | Vertex not selected by 2013 pA criteria!"); | |
1251 | PostData(1, fListHist); | |
1252 | PostData(2, fTreeCascade); | |
1253 | return; | |
1254 | } | |
1255 | ||
1256 | lMagneticField = lESDevent->GetMagneticField( ); | |
1257 | fHistV0MultiplicityForSelEvt ->Fill( lNumberOfV0s ); | |
1258 | fHistMultiplicity->Fill(lMultiplicity); | |
1259 | fHistMultiplicityV0A->Fill(lMultiplicityV0A); | |
1260 | fHistMultiplicityZNA->Fill(lMultiplicityZNA); | |
1261 | fHistMultiplicityTRK->Fill(lMultiplicityTRK); | |
1262 | fHistMultiplicitySPD->Fill(lMultiplicitySPD); | |
1263 | ||
1264 | //------------------------------------------------ | |
1265 | // SKIP: Events with well-established PVtx | |
1266 | //------------------------------------------------ | |
1267 | ||
1268 | const AliESDVertex *lPrimaryTrackingESDVtxCheck = lESDevent->GetPrimaryVertexTracks(); | |
1269 | const AliESDVertex *lPrimarySPDVtx = lESDevent->GetPrimaryVertexSPD(); | |
1270 | if (!lPrimarySPDVtx->GetStatus() && !lPrimaryTrackingESDVtxCheck->GetStatus() && fkpAVertexSelection==kFALSE ){ | |
1271 | AliWarning("Pb / No SPD prim. vertex nor prim. Tracking vertex ... return !"); | |
1272 | PostData(1, fListHist); | |
1273 | PostData(2, fTreeCascade); | |
1274 | return; | |
1275 | } | |
1276 | fHistV0MultiplicityForSelEvtNoTPCOnly ->Fill( lNumberOfV0s ); | |
1277 | fHistMultiplicityNoTPCOnly->Fill(lMultiplicity); | |
1278 | fHistMultiplicityV0ANoTPCOnly->Fill(lMultiplicityV0A); | |
1279 | fHistMultiplicityZNANoTPCOnly->Fill(lMultiplicityZNA); | |
1280 | fHistMultiplicityTRKNoTPCOnly->Fill(lMultiplicityTRK); | |
1281 | fHistMultiplicitySPDNoTPCOnly->Fill(lMultiplicitySPD); | |
1282 | ||
1283 | //------------------------------------------------ | |
1284 | // Pileup Rejection Studies | |
1285 | //------------------------------------------------ | |
1286 | ||
1287 | // FIXME : quality selection regarding pile-up rejection | |
1288 | if(lESDevent->IsPileupFromSPD() && !fkIsNuclear ){// minContributors=3, minZdist=0.8, nSigmaZdist=3., nSigmaDiamXY=2., nSigmaDiamZ=5. -> see http://alisoft.cern.ch/viewvc/trunk/STEER/AliESDEvent.h?root=AliRoot&r1=41914&r2=42199&pathrev=42199 | |
1289 | AliWarning("Pb / This is tagged as Pileup from SPD... return !"); | |
1290 | PostData(1, fListHist); | |
1291 | PostData(2, fTreeCascade); | |
1292 | return; | |
1293 | } | |
1294 | fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup ->Fill( lNumberOfV0s ); | |
1295 | fHistMultiplicityNoTPCOnlyNoPileup->Fill(lMultiplicity); | |
1296 | fHistMultiplicityV0ANoTPCOnlyNoPileup->Fill(lMultiplicityV0A); | |
1297 | fHistMultiplicityZNANoTPCOnlyNoPileup->Fill(lMultiplicityZNA); | |
1298 | fHistMultiplicityTRKNoTPCOnlyNoPileup->Fill(lMultiplicityTRK); | |
1299 | fHistMultiplicitySPDNoTPCOnlyNoPileup->Fill(lMultiplicitySPD); | |
1300 | ||
1301 | //Do control histograms without the IsFromVertexerZ events, but consider them in analysis... | |
1302 | if( ! (lESDevent->GetPrimaryVertex()->IsFromVertexerZ() ) ){ | |
1303 | fHistPVxAnalysis->Fill( lPrimaryVtxPosition[0] ); | |
1304 | fHistPVyAnalysis->Fill( lPrimaryVtxPosition[1] ); | |
1305 | fHistPVzAnalysis->Fill( lPrimaryVtxPosition[2] ); | |
1306 | } | |
1307 | ||
1308 | //------------------------------------------------ | |
1309 | // stack loop starts here | |
1310 | //------------------------------------------------ | |
1311 | ||
1312 | //----- Loop on primary Xi, Omega -------------------------------------------------------------- | |
1313 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) | |
1314 | {// This is the begining of the loop on primaries | |
1315 | ||
1316 | TParticle* lCurrentParticlePrimary = 0x0; | |
1317 | lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); | |
1318 | if(!lCurrentParticlePrimary){ | |
1319 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
1320 | continue; | |
1321 | } | |
1322 | if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) { | |
1323 | Double_t lRapXiMCPrimary = -100; | |
1324 | if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) { | |
1325 | if ( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) !=0 ){ | |
1326 | lRapXiMCPrimary = 0.5*TMath::Log( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) ); | |
1327 | } | |
1328 | } | |
1329 | ||
1330 | //================================================================================= | |
1331 | // Xi Histograms | |
1332 | if( lCurrentParticlePrimary->GetPdgCode() == 3312 ){ | |
1333 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1334 | f3dHistGenSelectedPtVsYVsMultXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1335 | f3dHistGenSelectedPtVsYCMSVsMultXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1336 | //MultMC | |
1337 | f3dHistGenSelectedPtVsYVsMultMCXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1338 | f3dHistGenSelectedPtVsYCMSVsMultMCXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1339 | } | |
1340 | if( lCurrentParticlePrimary->GetPdgCode() == -3312 ){ | |
1341 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1342 | f3dHistGenSelectedPtVsYVsMultXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1343 | f3dHistGenSelectedPtVsYCMSVsMultXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1344 | //MultMC | |
1345 | f3dHistGenSelectedPtVsYVsMultMCXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1346 | f3dHistGenSelectedPtVsYCMSVsMultMCXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1347 | } | |
1348 | // Omega Histograms | |
1349 | if( lCurrentParticlePrimary->GetPdgCode() == 3334 ){ | |
1350 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1351 | f3dHistGenSelectedPtVsYVsMultOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1352 | f3dHistGenSelectedPtVsYCMSVsMultOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1353 | //MultMC | |
1354 | f3dHistGenSelectedPtVsYVsMultMCOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1355 | f3dHistGenSelectedPtVsYCMSVsMultMCOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1356 | } | |
1357 | if( lCurrentParticlePrimary->GetPdgCode() == -3334 ){ | |
1358 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1359 | f3dHistGenSelectedPtVsYVsMultOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
1360 | f3dHistGenSelectedPtVsYCMSVsMultOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicity); | |
1361 | //MultMC | |
1362 | f3dHistGenSelectedPtVsYVsMultMCOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lNumberOfCharged); | |
1363 | f3dHistGenSelectedPtVsYCMSVsMultMCOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lNumberOfCharged); | |
1364 | } | |
1365 | } | |
1366 | } | |
1367 | //----- End Loop on primary Xi, Omega ---------------------------------------------------------- | |
1368 | ||
1369 | //------------------------------------------------ | |
1370 | // MAIN CASCADE LOOP STARTS HERE | |
1371 | //------------------------------------------------ | |
1372 | // Code Credit: Antonin Maire (thanks^100) | |
1373 | // ---> This is an adaptation | |
1374 | ||
1375 | Long_t ncascades = 0; | |
1376 | ncascades = lESDevent->GetNumberOfCascades(); | |
1377 | ||
1378 | ||
1379 | for (Int_t iXi = 0; iXi < ncascades; iXi++){ | |
1380 | //------------------------------------------------ | |
1381 | // Initializations | |
1382 | //------------------------------------------------ | |
1383 | //Double_t lTrkgPrimaryVtxRadius3D = -500.0; | |
1384 | //Double_t lBestPrimaryVtxRadius3D = -500.0; | |
1385 | ||
1386 | // - 1st part of initialisation : variables needed to store AliESDCascade data members | |
1387 | Double_t lEffMassXi = 0. ; | |
1388 | //Double_t lChi2Xi = -1. ; | |
1389 | Double_t lDcaXiDaughters = -1. ; | |
1390 | Double_t lXiCosineOfPointingAngle = -1. ; | |
1391 | Double_t lPosXi[3] = { -1000.0, -1000.0, -1000.0 }; | |
1392 | Double_t lXiRadius = -1000. ; | |
1393 | ||
1394 | // - 2nd part of initialisation : Nbr of clusters within TPC for the 3 daughter cascade tracks | |
1395 | Int_t lPosTPCClusters = -1; // For ESD only ...//FIXME : wait for availability in AOD | |
1396 | Int_t lNegTPCClusters = -1; // For ESD only ... | |
1397 | Int_t lBachTPCClusters = -1; // For ESD only ... | |
1398 | ||
1399 | // - 3rd part of initialisation : about V0 part in cascades | |
1400 | Double_t lInvMassLambdaAsCascDghter = 0.; | |
1401 | //Double_t lV0Chi2Xi = -1. ; | |
1402 | Double_t lDcaV0DaughtersXi = -1.; | |
1403 | ||
1404 | Double_t lDcaBachToPrimVertexXi = -1., lDcaV0ToPrimVertexXi = -1.; | |
1405 | Double_t lDcaPosToPrimVertexXi = -1.; | |
1406 | Double_t lDcaNegToPrimVertexXi = -1.; | |
1407 | Double_t lV0CosineOfPointingAngleXi = -1. ; | |
1408 | Double_t lPosV0Xi[3] = { -1000. , -1000., -1000. }; // Position of VO coming from cascade | |
1409 | Double_t lV0RadiusXi = -1000.0; | |
1410 | Double_t lV0quality = 0.; | |
1411 | ||
1412 | // - 4th part of initialisation : Effective masses | |
1413 | Double_t lInvMassXiMinus = 0.; | |
1414 | Double_t lInvMassXiPlus = 0.; | |
1415 | Double_t lInvMassOmegaMinus = 0.; | |
1416 | Double_t lInvMassOmegaPlus = 0.; | |
1417 | ||
1418 | // - 6th part of initialisation : extra info for QA | |
1419 | Double_t lXiMomX = 0. , lXiMomY = 0., lXiMomZ = 0.; | |
1420 | Double_t lXiTransvMom = 0. ; | |
1421 | Double_t lXiTransvMomMC= 0. ; | |
1422 | Double_t lXiTotMom = 0. ; | |
1423 | ||
1424 | Double_t lBachMomX = 0., lBachMomY = 0., lBachMomZ = 0.; | |
1425 | //Double_t lBachTransvMom = 0.; | |
1426 | //Double_t lBachTotMom = 0.; | |
1427 | ||
1428 | fTreeCascVarNegNSigmaPion = -100; | |
1429 | fTreeCascVarNegNSigmaProton = -100; | |
1430 | fTreeCascVarPosNSigmaPion = -100; | |
1431 | fTreeCascVarPosNSigmaProton = -100; | |
1432 | fTreeCascVarBachNSigmaPion = -100; | |
1433 | fTreeCascVarBachNSigmaKaon = -100; | |
1434 | ||
1435 | Short_t lChargeXi = -2; | |
1436 | //Double_t lV0toXiCosineOfPointingAngle = 0. ; | |
1437 | ||
1438 | Double_t lRapXi = -20.0, lRapOmega = -20.0, lRapMC = -20.0; // lEta = -20.0, lTheta = 360., lPhi = 720. ; | |
1439 | //Double_t lAlphaXi = -200., lPtArmXi = -200.0; | |
1440 | ||
1441 | // ------------------------------------- | |
1442 | // II.ESD - Calculation Part dedicated to Xi vertices (ESD) | |
1443 | ||
1444 | AliESDcascade *xi = lESDevent->GetCascade(iXi); | |
1445 | if (!xi) continue; | |
1446 | ||
1447 | ||
1448 | // - II.Step 1 : around primary vertex | |
1449 | //------------- | |
1450 | //lTrkgPrimaryVtxRadius3D = TMath::Sqrt( lTrkgPrimaryVtxPos[0] * lTrkgPrimaryVtxPos[0] + | |
1451 | // lTrkgPrimaryVtxPos[1] * lTrkgPrimaryVtxPos[1] + | |
1452 | // lTrkgPrimaryVtxPos[2] * lTrkgPrimaryVtxPos[2] ); | |
1453 | ||
1454 | //lBestPrimaryVtxRadius3D = TMath::Sqrt( lBestPrimaryVtxPos[0] * lBestPrimaryVtxPos[0] + | |
1455 | // lBestPrimaryVtxPos[1] * lBestPrimaryVtxPos[1] + | |
1456 | // lBestPrimaryVtxPos[2] * lBestPrimaryVtxPos[2] ); | |
1457 | ||
1458 | // - II.Step 2 : Assigning the necessary variables for specific AliESDcascade data members (ESD) | |
1459 | //------------- | |
1460 | lV0quality = 0.; | |
1461 | xi->ChangeMassHypothesis(lV0quality , 3312); // default working hypothesis : cascade = Xi- decay | |
1462 | ||
1463 | lEffMassXi = xi->GetEffMassXi(); | |
1464 | //lChi2Xi = xi->GetChi2Xi(); | |
1465 | lDcaXiDaughters = xi->GetDcaXiDaughters(); | |
1466 | lXiCosineOfPointingAngle = xi->GetCascadeCosineOfPointingAngle( lBestPrimaryVtxPos[0], | |
1467 | lBestPrimaryVtxPos[1], | |
1468 | lBestPrimaryVtxPos[2] ); | |
1469 | // Take care : the best available vertex should be used (like in AliCascadeVertexer) | |
1470 | ||
1471 | xi->GetXYZcascade( lPosXi[0], lPosXi[1], lPosXi[2] ); | |
1472 | lXiRadius = TMath::Sqrt( lPosXi[0]*lPosXi[0] + lPosXi[1]*lPosXi[1] ); | |
1473 | ||
1474 | // - II.Step 3 : around the tracks : Bach + V0 (ESD) | |
1475 | // ~ Necessary variables for ESDcascade data members coming from the ESDv0 part (inheritance) | |
1476 | //------------- | |
1477 | ||
1478 | UInt_t lIdxPosXi = (UInt_t) TMath::Abs( xi->GetPindex() ); | |
1479 | UInt_t lIdxNegXi = (UInt_t) TMath::Abs( xi->GetNindex() ); | |
1480 | UInt_t lBachIdx = (UInt_t) TMath::Abs( xi->GetBindex() ); | |
1481 | // Care track label can be negative in MC production (linked with the track quality) | |
1482 | // However = normally, not the case for track index ... | |
1483 | ||
1484 | // FIXME : rejection of a double use of a daughter track (nothing but just a crosscheck of what is done in the cascade vertexer) | |
1485 | if(lBachIdx == lIdxNegXi) { | |
1486 | AliWarning("Pb / Idx(Bach. track) = Idx(Neg. track) ... continue!"); continue; | |
1487 | } | |
1488 | if(lBachIdx == lIdxPosXi) { | |
1489 | AliWarning("Pb / Idx(Bach. track) = Idx(Pos. track) ... continue!"); continue; | |
1490 | } | |
1491 | ||
1492 | AliESDtrack *pTrackXi = lESDevent->GetTrack( lIdxPosXi ); | |
1493 | AliESDtrack *nTrackXi = lESDevent->GetTrack( lIdxNegXi ); | |
1494 | AliESDtrack *bachTrackXi = lESDevent->GetTrack( lBachIdx ); | |
1495 | ||
1496 | if (!pTrackXi || !nTrackXi || !bachTrackXi ) { | |
1497 | AliWarning("ERROR: Could not retrieve one of the 3 ESD daughter tracks of the cascade ..."); | |
1498 | continue; | |
1499 | } | |
1500 | ||
1501 | fTreeCascVarPosEta = pTrackXi->Eta(); | |
1502 | fTreeCascVarNegEta = nTrackXi->Eta(); | |
1503 | fTreeCascVarBachEta = bachTrackXi->Eta(); | |
1504 | ||
1505 | //------------------------------------------------ | |
1506 | // TPC dEdx information | |
1507 | //------------------------------------------------ | |
1508 | fTreeCascVarNegNSigmaPion = fPIDResponse->NumberOfSigmasTPC( nTrackXi, AliPID::kPion ); | |
1509 | fTreeCascVarNegNSigmaProton = fPIDResponse->NumberOfSigmasTPC( nTrackXi, AliPID::kProton ); | |
1510 | fTreeCascVarPosNSigmaPion = fPIDResponse->NumberOfSigmasTPC( pTrackXi, AliPID::kPion ); | |
1511 | fTreeCascVarPosNSigmaProton = fPIDResponse->NumberOfSigmasTPC( pTrackXi, AliPID::kProton ); | |
1512 | fTreeCascVarBachNSigmaPion = fPIDResponse->NumberOfSigmasTPC( bachTrackXi, AliPID::kPion ); | |
1513 | fTreeCascVarBachNSigmaKaon = fPIDResponse->NumberOfSigmasTPC( bachTrackXi, AliPID::kKaon ); | |
1514 | ||
1515 | //------------------------------------------------ | |
1516 | // TPC Number of clusters info | |
1517 | // --- modified to save the smallest number | |
1518 | // --- of TPC clusters for the 3 tracks | |
1519 | //------------------------------------------------ | |
1520 | ||
1521 | lPosTPCClusters = pTrackXi->GetTPCNcls(); | |
1522 | lNegTPCClusters = nTrackXi->GetTPCNcls(); | |
1523 | lBachTPCClusters = bachTrackXi->GetTPCNcls(); | |
1524 | ||
1525 | // 1 - Poor quality related to TPCrefit | |
1526 | ULong_t pStatus = pTrackXi->GetStatus(); | |
1527 | ULong_t nStatus = nTrackXi->GetStatus(); | |
1528 | ULong_t bachStatus = bachTrackXi->GetStatus(); | |
1529 | if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; } | |
1530 | if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; } | |
1531 | if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; } | |
1532 | // 2 - Poor quality related to TPC clusters: lowest cut of 70 clusters | |
1533 | if(lPosTPCClusters < 70) { AliWarning("Pb / V0 Pos. track has less than 70 TPC clusters ... continue!"); continue; } | |
1534 | if(lNegTPCClusters < 70) { AliWarning("Pb / V0 Neg. track has less than 70 TPC clusters ... continue!"); continue; } | |
1535 | if(lBachTPCClusters < 70) { AliWarning("Pb / Bach. track has less than 70 TPC clusters ... continue!"); continue; } | |
1536 | Int_t leastnumberofclusters = 1000; | |
1537 | if( lPosTPCClusters < leastnumberofclusters ) leastnumberofclusters = lPosTPCClusters; | |
1538 | if( lNegTPCClusters < leastnumberofclusters ) leastnumberofclusters = lNegTPCClusters; | |
1539 | if( lBachTPCClusters < leastnumberofclusters ) leastnumberofclusters = lBachTPCClusters; | |
1540 | ||
1541 | lInvMassLambdaAsCascDghter = xi->GetEffMass(); | |
1542 | // This value shouldn't change, whatever the working hyp. is : Xi-, Xi+, Omega-, Omega+ | |
1543 | lDcaV0DaughtersXi = xi->GetDcaV0Daughters(); | |
1544 | //lV0Chi2Xi = xi->GetChi2V0(); | |
1545 | ||
1546 | lV0CosineOfPointingAngleXi = xi->GetV0CosineOfPointingAngle( lBestPrimaryVtxPos[0], | |
1547 | lBestPrimaryVtxPos[1], | |
1548 | lBestPrimaryVtxPos[2] ); | |
1549 | ||
1550 | lDcaV0ToPrimVertexXi = xi->GetD( lBestPrimaryVtxPos[0], | |
1551 | lBestPrimaryVtxPos[1], | |
1552 | lBestPrimaryVtxPos[2] ); | |
1553 | ||
1554 | lDcaBachToPrimVertexXi = TMath::Abs( bachTrackXi->GetD( lBestPrimaryVtxPos[0], | |
1555 | lBestPrimaryVtxPos[1], | |
1556 | lMagneticField ) ); | |
1557 | // Note : AliExternalTrackParam::GetD returns an algebraic value ... | |
1558 | ||
1559 | xi->GetXYZ( lPosV0Xi[0], lPosV0Xi[1], lPosV0Xi[2] ); | |
1560 | lV0RadiusXi = TMath::Sqrt( lPosV0Xi[0]*lPosV0Xi[0] + lPosV0Xi[1]*lPosV0Xi[1] ); | |
1561 | ||
1562 | lDcaPosToPrimVertexXi = TMath::Abs( pTrackXi ->GetD( lBestPrimaryVtxPos[0], | |
1563 | lBestPrimaryVtxPos[1], | |
1564 | lMagneticField ) ); | |
1565 | ||
1566 | lDcaNegToPrimVertexXi = TMath::Abs( nTrackXi ->GetD( lBestPrimaryVtxPos[0], | |
1567 | lBestPrimaryVtxPos[1], | |
1568 | lMagneticField ) ); | |
1569 | ||
1570 | // - II.Step 4 : around effective masses (ESD) | |
1571 | // ~ change mass hypotheses to cover all the possibilities : Xi-/+, Omega -/+ | |
1572 | ||
1573 | if( bachTrackXi->Charge() < 0 ) { | |
1574 | lV0quality = 0.; | |
1575 | xi->ChangeMassHypothesis(lV0quality , 3312); | |
1576 | // Calculate the effective mass of the Xi- candidate. | |
1577 | // pdg code 3312 = Xi- | |
1578 | lInvMassXiMinus = xi->GetEffMassXi(); | |
1579 | ||
1580 | lV0quality = 0.; | |
1581 | xi->ChangeMassHypothesis(lV0quality , 3334); | |
1582 | // Calculate the effective mass of the Xi- candidate. | |
1583 | // pdg code 3334 = Omega- | |
1584 | lInvMassOmegaMinus = xi->GetEffMassXi(); | |
1585 | ||
1586 | lV0quality = 0.; | |
1587 | xi->ChangeMassHypothesis(lV0quality , 3312); // Back to default hyp. | |
1588 | }// end if negative bachelor | |
1589 | ||
1590 | ||
1591 | if( bachTrackXi->Charge() > 0 ){ | |
1592 | lV0quality = 0.; | |
1593 | xi->ChangeMassHypothesis(lV0quality , -3312); | |
1594 | // Calculate the effective mass of the Xi+ candidate. | |
1595 | // pdg code -3312 = Xi+ | |
1596 | lInvMassXiPlus = xi->GetEffMassXi(); | |
1597 | ||
1598 | lV0quality = 0.; | |
1599 | xi->ChangeMassHypothesis(lV0quality , -3334); | |
1600 | // Calculate the effective mass of the Xi+ candidate. | |
1601 | // pdg code -3334 = Omega+ | |
1602 | lInvMassOmegaPlus = xi->GetEffMassXi(); | |
1603 | ||
1604 | lV0quality = 0.; | |
1605 | xi->ChangeMassHypothesis(lV0quality , -3312); // Back to "default" hyp. | |
1606 | }// end if positive bachelor | |
1607 | // - II.Step 6 : extra info for QA (ESD) | |
1608 | // miscellaneous pieces of info that may help regarding data quality assessment. | |
1609 | //------------- | |
1610 | ||
1611 | xi->GetPxPyPz( lXiMomX, lXiMomY, lXiMomZ ); | |
1612 | lXiTransvMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY ); | |
1613 | lXiTotMom = TMath::Sqrt( lXiMomX*lXiMomX + lXiMomY*lXiMomY + lXiMomZ*lXiMomZ ); | |
1614 | ||
1615 | xi->GetBPxPyPz( lBachMomX, lBachMomY, lBachMomZ ); | |
1616 | //lBachTransvMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY ); | |
1617 | //lBachTotMom = TMath::Sqrt( lBachMomX*lBachMomX + lBachMomY*lBachMomY + lBachMomZ*lBachMomZ ); | |
1618 | ||
1619 | lChargeXi = xi->Charge(); | |
1620 | ||
1621 | //lV0toXiCosineOfPointingAngle = xi->GetV0CosineOfPointingAngle( lPosXi[0], lPosXi[1], lPosXi[2] ); | |
1622 | ||
1623 | lRapXi = xi->RapXi(); | |
1624 | lRapOmega = xi->RapOmega(); | |
1625 | //lEta = xi->Eta(); | |
1626 | //lTheta = xi->Theta() *180.0/TMath::Pi(); | |
1627 | //lPhi = xi->Phi() *180.0/TMath::Pi(); | |
1628 | //lAlphaXi = xi->AlphaXi(); | |
1629 | //lPtArmXi = xi->PtArmXi(); | |
1630 | ||
1631 | //------------------------------------------------ | |
1632 | // Associate Cascade Candidates to Monte Carlo! | |
1633 | //------------------------------------------------ | |
1634 | ||
1635 | //Warning: Not using Continues... Need to fill tree later! | |
1636 | ||
1637 | Int_t lPDGCodeCascade = 0; | |
1638 | ||
1639 | Int_t lPID_BachMother = 0; | |
1640 | Int_t lPID_NegMother = 0; | |
1641 | Int_t lPID_PosMother = 0; | |
1642 | ||
1643 | ||
1644 | fTreeCascVarPIDPositive = 0; | |
1645 | fTreeCascVarPIDNegative = 0; | |
1646 | fTreeCascVarPIDBachelor = 0; | |
1647 | ||
1648 | ||
1649 | if(fDebug > 5) | |
1650 | cout << "MC EventNumber : " << lMCevent->Header()->GetEvent() | |
1651 | << " / MC event Number in Run : " << lMCevent->Header()->GetEventNrInRun() << endl; | |
1652 | ||
1653 | // - Step 4.1 : level of the V0 daughters | |
1654 | ||
1655 | //---------------------------------------- | |
1656 | // Regular MC ASSOCIATION STARTS HERE | |
1657 | //---------------------------------------- | |
1658 | ||
1659 | Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrackXi->GetLabel() ); | |
1660 | // Abs value = needed ! question of quality track association ... | |
1661 | Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrackXi->GetLabel() ); | |
1662 | Int_t lblBach = (Int_t) TMath::Abs( bachTrackXi->GetLabel() ); | |
1663 | ||
1664 | TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter ); | |
1665 | TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter ); | |
1666 | TParticle* mcBach = lMCstack->Particle( lblBach ); | |
1667 | ||
1668 | fTreeCascVarPosTransMomMC = mcPosV0Dghter->Pt(); | |
1669 | fTreeCascVarNegTransMomMC = mcNegV0Dghter->Pt(); | |
1670 | ||
1671 | fTreeCascVarPIDPositive = mcPosV0Dghter -> GetPdgCode(); | |
1672 | fTreeCascVarPIDNegative = mcNegV0Dghter -> GetPdgCode(); | |
1673 | fTreeCascVarPIDBachelor = mcBach->GetPdgCode(); | |
1674 | ||
1675 | // - Step 4.2 : level of the Xi daughters | |
1676 | ||
1677 | Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ; | |
1678 | Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother(); | |
1679 | ||
1680 | //Rather uncivilized: Open brackets for each 'continue' | |
1681 | if(! (lblMotherPosV0Dghter != lblMotherNegV0Dghter) ) { // same mother | |
1682 | if(! (lblMotherPosV0Dghter < 0) ) { // mother != primary (!= -1) | |
1683 | if(! (lblMotherNegV0Dghter < 0) ) { | |
1684 | ||
1685 | // mothers = Lambda candidate ... a priori | |
1686 | ||
1687 | TParticle* mcMotherPosV0Dghter = lMCstack->Particle( lblMotherPosV0Dghter ); | |
1688 | TParticle* mcMotherNegV0Dghter = lMCstack->Particle( lblMotherNegV0Dghter ); | |
1689 | ||
1690 | // - Step 4.3 : level of Xi candidate | |
1691 | ||
1692 | Int_t lblGdMotherPosV0Dghter = mcMotherPosV0Dghter->GetFirstMother() ; | |
1693 | Int_t lblGdMotherNegV0Dghter = mcMotherNegV0Dghter->GetFirstMother() ; | |
1694 | ||
1695 | if(! (lblGdMotherPosV0Dghter != lblGdMotherNegV0Dghter) ) { | |
1696 | if(! (lblGdMotherPosV0Dghter < 0) ) { // primary lambda ... | |
1697 | if(! (lblGdMotherNegV0Dghter < 0) ) { // primary lambda ... | |
1698 | ||
1699 | // Gd mothers = Xi candidate ... a priori | |
1700 | ||
1701 | TParticle* mcGdMotherPosV0Dghter = lMCstack->Particle( lblGdMotherPosV0Dghter ); | |
1702 | TParticle* mcGdMotherNegV0Dghter = lMCstack->Particle( lblGdMotherNegV0Dghter ); | |
1703 | ||
1704 | Int_t lblMotherBach = (Int_t) TMath::Abs( mcBach->GetFirstMother() ); | |
1705 | ||
1706 | // if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters | |
1707 | if(!(lblMotherBach != lblGdMotherPosV0Dghter)) { //same mother for bach and V0 daughters | |
1708 | ||
1709 | TParticle* mcMotherBach = lMCstack->Particle( lblMotherBach ); | |
1710 | ||
1711 | lPID_BachMother = mcMotherBach->GetPdgCode(); | |
1712 | lPID_NegMother = mcGdMotherPosV0Dghter->GetPdgCode(); | |
1713 | lPID_PosMother = mcGdMotherNegV0Dghter->GetPdgCode(); | |
1714 | ||
1715 | if(lPID_BachMother==lPID_NegMother && lPID_BachMother==lPID_PosMother){ | |
1716 | lPDGCodeCascade = lPID_BachMother; | |
1717 | lXiTransvMomMC = mcMotherBach->Pt(); | |
1718 | if ( (mcMotherBach->Energy() + mcMotherBach->Pz()) / (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) !=0 ){ | |
1719 | lRapMC = 0.5*TMath::Log( (mcMotherBach->Energy() + mcMotherBach->Pz()) / (mcMotherBach->Energy() - mcMotherBach->Pz() +1.e-13) ); | |
1720 | } | |
1721 | } | |
1722 | ||
1723 | }}}}}}} //Ends all conditionals above... | |
1724 | ||
1725 | //---------------------------------------- | |
1726 | // Regular MC ASSOCIATION ENDS HERE | |
1727 | //---------------------------------------- | |
1728 | ||
1729 | //------------------------------------------------ | |
1730 | // Set Variables for adding to tree | |
1731 | //------------------------------------------------ | |
1732 | ||
1733 | /* 1*/ fTreeCascVarCharge = lChargeXi; | |
1734 | /* 2*/ if(lInvMassXiMinus!=0) fTreeCascVarMassAsXi = lInvMassXiMinus; | |
1735 | /* 2*/ if(lInvMassXiPlus!=0) fTreeCascVarMassAsXi = lInvMassXiPlus; | |
1736 | /* 3*/ if(lInvMassOmegaMinus!=0) fTreeCascVarMassAsOmega = lInvMassOmegaMinus; | |
1737 | /* 3*/ if(lInvMassOmegaPlus!=0) fTreeCascVarMassAsOmega = lInvMassOmegaPlus; | |
1738 | /* 4*/ fTreeCascVarPt = lXiTransvMom; | |
1739 | /* 4*/ fTreeCascVarPtMC = lXiTransvMomMC; | |
1740 | /* 5*/ fTreeCascVarRapXi = lRapXi ; | |
1741 | /* 5*/ fTreeCascVarRapMC = lRapMC ; | |
1742 | /* 6*/ fTreeCascVarRapOmega = lRapOmega ; | |
1743 | /* 7*/ fTreeCascVarDCACascDaughters = lDcaXiDaughters; | |
1744 | /* 8*/ fTreeCascVarDCABachToPrimVtx = lDcaBachToPrimVertexXi; | |
1745 | /* 9*/ fTreeCascVarDCAV0Daughters = lDcaV0DaughtersXi; | |
1746 | /*10*/ fTreeCascVarDCAV0ToPrimVtx = lDcaV0ToPrimVertexXi; | |
1747 | /*11*/ fTreeCascVarDCAPosToPrimVtx = lDcaPosToPrimVertexXi; | |
1748 | /*12*/ fTreeCascVarDCANegToPrimVtx = lDcaNegToPrimVertexXi; | |
1749 | /*13*/ fTreeCascVarCascCosPointingAngle = lXiCosineOfPointingAngle; | |
1750 | /*14*/ fTreeCascVarCascRadius = lXiRadius; | |
1751 | /*15*/ fTreeCascVarV0Mass = lInvMassLambdaAsCascDghter; | |
1752 | /*16*/ fTreeCascVarV0CosPointingAngle = lV0CosineOfPointingAngleXi; | |
1753 | /*17*/ fTreeCascVarV0Radius = lV0RadiusXi; | |
1754 | /*20*/ fTreeCascVarLeastNbrClusters = leastnumberofclusters; | |
1755 | /*21*/ fTreeCascVarMultiplicity = lMultiplicity; //multiplicity, whatever that may be | |
1756 | ||
1757 | /*23*/ fTreeCascVarDistOverTotMom = TMath::Sqrt( | |
1758 | TMath::Power( lPosXi[0] - lBestPrimaryVtxPos[0] , 2) + | |
1759 | TMath::Power( lPosXi[1] - lBestPrimaryVtxPos[1] , 2) + | |
1760 | TMath::Power( lPosXi[2] - lBestPrimaryVtxPos[2] , 2) | |
1761 | ); | |
1762 | /*23*/ fTreeCascVarDistOverTotMom /= (lXiTotMom+1e-13); | |
1763 | /*24*/ //Not specified here, it has been set already (TRunNumber) | |
1764 | /*25*/ fTreeCascVarPID = lPDGCodeCascade; | |
1765 | ||
1766 | //------------------------------------------------ | |
1767 | // Fill Tree! | |
1768 | //------------------------------------------------ | |
1769 | ||
1770 | // The conditional is meant to decrease excessive | |
1771 | // memory usage! Be careful when loosening the | |
1772 | // cut! | |
1773 | ||
1774 | //Xi Mass window: 150MeV wide | |
1775 | //Omega mass window: 150MeV wide | |
1776 | ||
1777 | if( (fTreeCascVarMassAsXi<1.32+0.075&&fTreeCascVarMassAsXi>1.32-0.075) || | |
1778 | (fTreeCascVarMassAsOmega<1.68+0.075&&fTreeCascVarMassAsOmega>1.68-0.075) ){ | |
1779 | fTreeCascade->Fill(); | |
1780 | } | |
1781 | ||
1782 | //------------------------------------------------ | |
1783 | // Fill tree over. | |
1784 | //------------------------------------------------ | |
1785 | ||
1786 | }// end of the Cascade loop (ESD or AOD) | |
1787 | ||
1788 | // Post output data. | |
1789 | PostData(1, fListHist); | |
1790 | PostData(2, fTreeCascade); | |
1791 | } | |
1792 | ||
1793 | //________________________________________________________________________ | |
1794 | void AliAnalysisTaskExtractPerformanceCascade::Terminate(Option_t *) | |
1795 | { | |
1796 | // Draw result to the screen | |
1797 | // Called once at the end of the query | |
1798 | ||
1799 | TList *cRetrievedList = 0x0; | |
1800 | cRetrievedList = (TList*)GetOutputData(1); | |
1801 | if(!cRetrievedList){ | |
1802 | Printf("ERROR - AliAnalysisTaskExtractCascade : ouput data container list not available\n"); | |
1803 | return; | |
1804 | } | |
1805 | ||
1806 | fHistV0MultiplicityForTrigEvt = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistV0MultiplicityForTrigEvt") ); | |
1807 | if (!fHistV0MultiplicityForTrigEvt) { | |
1808 | Printf("ERROR - AliAnalysisTaskExtractCascade : fHistV0MultiplicityForTrigEvt not available"); | |
1809 | return; | |
1810 | } | |
1811 | ||
1812 | TCanvas *canCheck = new TCanvas("AliAnalysisTaskExtractCascade","V0 Multiplicity",10,10,510,510); | |
1813 | canCheck->cd(1)->SetLogy(); | |
1814 | ||
1815 | fHistV0MultiplicityForTrigEvt->SetMarkerStyle(22); | |
1816 | fHistV0MultiplicityForTrigEvt->DrawCopy("E"); | |
1817 | } | |
1818 | ||
1819 | //---------------------------------------------------------------------------- | |
1820 | ||
1821 | Double_t AliAnalysisTaskExtractPerformanceCascade::MyRapidity(Double_t rE, Double_t rPz) const | |
1822 | { | |
1823 | // Local calculation for rapidity | |
1824 | Double_t ReturnValue = -100; | |
1825 | if( (rE-rPz+1.e-13) != 0 && (rE+rPz) != 0 ){ | |
1826 | ReturnValue = 0.5*TMath::Log((rE+rPz)/(rE-rPz+1.e-13)); | |
1827 | } | |
1828 | return ReturnValue; | |
1829 | } |