]>
Commit | Line | Data |
---|---|---|
b2e7de7f | 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 V0s, 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 | // 7b. Fill TTree object with V0 information, candidates | |
36 | // | |
37 | // Please Report Any Bugs! | |
38 | // | |
39 | // --- David Dobrigkeit Chinellato | |
40 | // (david.chinellato@gmail.com) | |
41 | // | |
42 | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
43 | ||
44 | class TTree; | |
45 | class TParticle; | |
46 | class TVector3; | |
47 | ||
48 | //class AliMCEventHandler; | |
49 | //class AliMCEvent; | |
50 | //class AliStack; | |
51 | ||
52 | class AliESDVertex; | |
53 | class AliAODVertex; | |
54 | class AliESDv0; | |
55 | class AliAODv0; | |
56 | ||
57 | #include <Riostream.h> | |
58 | #include "TList.h" | |
59 | #include "TH1.h" | |
60 | #include "TH2.h" | |
61 | #include "TH3.h" | |
62 | #include "TFile.h" | |
63 | #include "THnSparse.h" | |
64 | #include "TVector3.h" | |
65 | #include "TCanvas.h" | |
66 | #include "TMath.h" | |
67 | #include "TLegend.h" | |
68 | #include "AliLog.h" | |
69 | ||
70 | #include "AliESDEvent.h" | |
71 | #include "AliAODEvent.h" | |
72 | #include "AliV0vertexer.h" | |
73 | #include "AliCascadeVertexer.h" | |
74 | #include "AliESDpid.h" | |
75 | #include "AliESDtrack.h" | |
76 | #include "AliESDtrackCuts.h" | |
77 | #include "AliInputEventHandler.h" | |
78 | #include "AliAnalysisManager.h" | |
79 | #include "AliMCEventHandler.h" | |
80 | #include "AliMCEvent.h" | |
81 | #include "AliStack.h" | |
82 | ||
83 | #include "AliCFContainer.h" | |
84 | #include "AliMultiplicity.h" | |
85 | #include "AliAODMCParticle.h" | |
86 | #include "AliESDcascade.h" | |
87 | #include "AliAODcascade.h" | |
88 | #include "AliESDUtils.h" | |
89 | #include "AliGenEventHeader.h" | |
90 | #include "AliAnalysisTaskSE.h" | |
91 | #include "AliAnalysisUtils.h" | |
92 | #include "AliAnalysisTaskExtractPerformanceV0pPb.h" | |
4a20b95e | 93 | #include "AliHeader.h" |
94 | #include "AliGenDPMjetEventHeader.h" | |
b2e7de7f | 95 | |
96 | using std::cout; | |
97 | using std::endl; | |
98 | ||
99 | ClassImp(AliAnalysisTaskExtractPerformanceV0pPb) | |
100 | ||
101 | AliAnalysisTaskExtractPerformanceV0pPb::AliAnalysisTaskExtractPerformanceV0pPb() | |
102 | : AliAnalysisTaskSE(), fListHistV0(0), fTree(0), fTreeEvents(0), fPIDResponse(0), | |
4a20b95e | 103 | fDiffractiveOnly(kFALSE), |
b2e7de7f | 104 | |
105 | //------------------------------------------------ | |
106 | // Tree Variables | |
107 | ||
108 | fTreeVariablePrimaryStatus(0), | |
109 | fTreeVariablePrimaryStatusMother(0), | |
110 | fTreeVariableChi2V0(0), | |
111 | fTreeVariableDcaV0Daughters(0), | |
112 | fTreeVariableDcaV0ToPrimVertex(0), | |
113 | fTreeVariableDcaPosToPrimVertex(0), | |
114 | fTreeVariableDcaNegToPrimVertex(0), | |
115 | fTreeVariableV0CosineOfPointingAngle(0), | |
116 | fTreeVariableV0Radius(0), | |
117 | fTreeVariablePt(0), | |
118 | fTreeVariablePtMC(0), | |
119 | fTreeVariableRapK0Short(0), | |
120 | fTreeVariableRapLambda(0), | |
121 | fTreeVariableRapMC(0), | |
122 | fTreeVariableInvMassK0s(0), | |
123 | fTreeVariableInvMassLambda(0), | |
124 | fTreeVariableInvMassAntiLambda(0), | |
125 | fTreeVariableAlphaV0(0), | |
126 | fTreeVariablePtArmV0(0), | |
127 | fTreeVariableNegTotMomentum(0), | |
128 | fTreeVariablePosTotMomentum(0), | |
129 | fTreeVariableNegTransvMomentum(0), | |
130 | fTreeVariablePosTransvMomentum(0), | |
131 | fTreeVariableNegTransvMomentumMC(0), | |
132 | fTreeVariablePosTransvMomentumMC(0), | |
133 | fTreeVariableNSigmasPosProton(0), | |
134 | fTreeVariableNSigmasPosPion(0), | |
135 | fTreeVariableNSigmasNegProton(0), | |
136 | fTreeVariableNSigmasNegPion(0), | |
137 | fTreeVariablePtMother(0), | |
138 | fTreeVariableV0CreationRadius(0), | |
139 | fTreeVariablePID(0), | |
140 | fTreeVariablePIDPositive(0), | |
141 | fTreeVariablePIDNegative(0), | |
142 | fTreeVariablePIDMother(0), | |
143 | fTreeVariableDistOverTotMom(0), | |
144 | fTreeVariablePosEta(0), | |
145 | fTreeVariableNegEta(0), | |
146 | fTreeVariableVertexZ(0), | |
147 | fTreeVariableLeastNbrCrossedRows(0), | |
148 | fTreeVariableLeastRatioCrossedRowsOverFindable(0), | |
149 | fTreeVariableCentrality(0), | |
150 | fTreeEventsCentrality(0), | |
151 | ||
152 | //------------------------------------------------ | |
153 | // HISTOGRAMS | |
154 | // --- Filled on an Event-by-event basis | |
155 | //------------------------------------------------ | |
156 | //V0A Centrality | |
157 | fHistCentralityProcessed(0), | |
158 | fHistCentralityTrigEvt(0), | |
159 | fHistCentralityHasVtx(0), | |
160 | fHistCentralityVtxZ(0), | |
161 | ||
162 | //------------------------------------------------ | |
163 | // PARTICLE HISTOGRAMS | |
164 | // --- Filled on a Particle-by-Particle basis | |
165 | //------------------------------------------------ | |
166 | ||
167 | //Standard V0M / multiplicity | |
168 | f3dHist_Analysis_PtVsYVsV0A_Lambda(0), | |
169 | f3dHist_Analysis_PtVsYVsV0A_AntiLambda(0), | |
170 | f3dHist_Analysis_PtVsYVsV0A_K0Short(0), | |
171 | f3dHist_Generated_PtVsYVsV0A_Lambda(0), | |
172 | f3dHist_Generated_PtVsYVsV0A_AntiLambda(0), | |
173 | f3dHist_Generated_PtVsYVsV0A_K0Short(0), | |
174 | f3dHist_Analysis_PtVsYVsV0A_KPlus(0), | |
175 | f3dHist_Analysis_PtVsYVsV0A_KMinus(0), | |
176 | f3dHist_Generated_PtVsYVsV0A_KPlus(0), | |
177 | f3dHist_Generated_PtVsYVsV0A_KMinus(0), | |
178 | f3dHist_Analysis_PtVsYVsV0A_XiMinus(0), | |
179 | f3dHist_Analysis_PtVsYVsV0A_XiPlus(0), | |
180 | f3dHist_Generated_PtVsYVsV0A_XiMinus(0), | |
89b8cfdf | 181 | f3dHist_Generated_PtVsYVsV0A_XiPlus(0), |
182 | f3dHist_Analysis_PtVsYCMSVsV0A_Lambda(0), | |
183 | f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda(0), | |
184 | f3dHist_Analysis_PtVsYCMSVsV0A_K0Short(0), | |
185 | f3dHist_Generated_PtVsYCMSVsV0A_Lambda(0), | |
186 | f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda(0), | |
187 | f3dHist_Generated_PtVsYCMSVsV0A_K0Short(0), | |
188 | f3dHist_Analysis_PtVsYCMSVsV0A_KPlus(0), | |
189 | f3dHist_Analysis_PtVsYCMSVsV0A_KMinus(0), | |
190 | f3dHist_Generated_PtVsYCMSVsV0A_KPlus(0), | |
191 | f3dHist_Generated_PtVsYCMSVsV0A_KMinus(0), | |
192 | f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus(0), | |
193 | f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus(0), | |
194 | f3dHist_Generated_PtVsYCMSVsV0A_XiMinus(0), | |
195 | f3dHist_Generated_PtVsYCMSVsV0A_XiPlus(0) | |
b2e7de7f | 196 | { |
197 | // Dummy Constructor | |
198 | ||
199 | } | |
200 | ||
201 | AliAnalysisTaskExtractPerformanceV0pPb::AliAnalysisTaskExtractPerformanceV0pPb(const char *name) | |
202 | : AliAnalysisTaskSE(name), fListHistV0(0), fTree(0), fTreeEvents(0), fPIDResponse(0), | |
4a20b95e | 203 | fDiffractiveOnly(kFALSE), |
204 | ||
b2e7de7f | 205 | //------------------------------------------------ |
206 | // Tree Variables | |
207 | ||
208 | fTreeVariablePrimaryStatus(0), | |
209 | fTreeVariablePrimaryStatusMother(0), | |
210 | fTreeVariableChi2V0(0), | |
211 | fTreeVariableDcaV0Daughters(0), | |
212 | fTreeVariableDcaV0ToPrimVertex(0), | |
213 | fTreeVariableDcaPosToPrimVertex(0), | |
214 | fTreeVariableDcaNegToPrimVertex(0), | |
215 | fTreeVariableV0CosineOfPointingAngle(0), | |
216 | fTreeVariableV0Radius(0), | |
217 | fTreeVariablePt(0), | |
218 | fTreeVariablePtMC(0), | |
219 | fTreeVariableRapK0Short(0), | |
220 | fTreeVariableRapLambda(0), | |
221 | fTreeVariableRapMC(0), | |
222 | fTreeVariableInvMassK0s(0), | |
223 | fTreeVariableInvMassLambda(0), | |
224 | fTreeVariableInvMassAntiLambda(0), | |
225 | fTreeVariableAlphaV0(0), | |
226 | fTreeVariablePtArmV0(0), | |
227 | fTreeVariableNegTotMomentum(0), | |
228 | fTreeVariablePosTotMomentum(0), | |
229 | fTreeVariableNegTransvMomentum(0), | |
230 | fTreeVariablePosTransvMomentum(0), | |
231 | fTreeVariableNegTransvMomentumMC(0), | |
232 | fTreeVariablePosTransvMomentumMC(0), | |
233 | fTreeVariableNSigmasPosProton(0), | |
234 | fTreeVariableNSigmasPosPion(0), | |
235 | fTreeVariableNSigmasNegProton(0), | |
236 | fTreeVariableNSigmasNegPion(0), | |
237 | fTreeVariablePtMother(0), | |
238 | fTreeVariableV0CreationRadius(0), | |
239 | fTreeVariablePID(0), | |
240 | fTreeVariablePIDPositive(0), | |
241 | fTreeVariablePIDNegative(0), | |
242 | fTreeVariablePIDMother(0), | |
243 | fTreeVariableDistOverTotMom(0), | |
244 | fTreeVariablePosEta(0), | |
245 | fTreeVariableNegEta(0), | |
246 | fTreeVariableVertexZ(0), | |
247 | fTreeVariableLeastNbrCrossedRows(0), | |
248 | fTreeVariableLeastRatioCrossedRowsOverFindable(0), | |
249 | fTreeVariableCentrality(0), | |
250 | fTreeEventsCentrality(0), | |
251 | ||
252 | //------------------------------------------------ | |
253 | // HISTOGRAMS | |
254 | // --- Filled on an Event-by-event basis | |
255 | //------------------------------------------------ | |
256 | //V0A Centrality | |
257 | fHistCentralityProcessed(0), | |
258 | fHistCentralityTrigEvt(0), | |
259 | fHistCentralityHasVtx(0), | |
260 | fHistCentralityVtxZ(0), | |
261 | ||
262 | //------------------------------------------------ | |
263 | // PARTICLE HISTOGRAMS | |
264 | // --- Filled on a Particle-by-Particle basis | |
265 | //------------------------------------------------ | |
266 | ||
267 | //Standard V0M / multiplicity | |
268 | f3dHist_Analysis_PtVsYVsV0A_Lambda(0), | |
269 | f3dHist_Analysis_PtVsYVsV0A_AntiLambda(0), | |
270 | f3dHist_Analysis_PtVsYVsV0A_K0Short(0), | |
271 | f3dHist_Generated_PtVsYVsV0A_Lambda(0), | |
272 | f3dHist_Generated_PtVsYVsV0A_AntiLambda(0), | |
273 | f3dHist_Generated_PtVsYVsV0A_K0Short(0), | |
274 | f3dHist_Analysis_PtVsYVsV0A_KPlus(0), | |
275 | f3dHist_Analysis_PtVsYVsV0A_KMinus(0), | |
276 | f3dHist_Generated_PtVsYVsV0A_KPlus(0), | |
277 | f3dHist_Generated_PtVsYVsV0A_KMinus(0), | |
278 | f3dHist_Analysis_PtVsYVsV0A_XiMinus(0), | |
279 | f3dHist_Analysis_PtVsYVsV0A_XiPlus(0), | |
280 | f3dHist_Generated_PtVsYVsV0A_XiMinus(0), | |
89b8cfdf | 281 | f3dHist_Generated_PtVsYVsV0A_XiPlus(0), |
282 | f3dHist_Analysis_PtVsYCMSVsV0A_Lambda(0), | |
283 | f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda(0), | |
284 | f3dHist_Analysis_PtVsYCMSVsV0A_K0Short(0), | |
285 | f3dHist_Generated_PtVsYCMSVsV0A_Lambda(0), | |
286 | f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda(0), | |
287 | f3dHist_Generated_PtVsYCMSVsV0A_K0Short(0), | |
288 | f3dHist_Analysis_PtVsYCMSVsV0A_KPlus(0), | |
289 | f3dHist_Analysis_PtVsYCMSVsV0A_KMinus(0), | |
290 | f3dHist_Generated_PtVsYCMSVsV0A_KPlus(0), | |
291 | f3dHist_Generated_PtVsYCMSVsV0A_KMinus(0), | |
292 | f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus(0), | |
293 | f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus(0), | |
294 | f3dHist_Generated_PtVsYCMSVsV0A_XiMinus(0), | |
295 | f3dHist_Generated_PtVsYCMSVsV0A_XiPlus(0) | |
b2e7de7f | 296 | { |
297 | // Constructor | |
298 | // Set Loose cuts or not here... | |
299 | DefineOutput(1, TList::Class()); | |
300 | DefineOutput(2, TTree::Class()); | |
301 | DefineOutput(3, TTree::Class()); | |
302 | } | |
303 | ||
304 | ||
305 | AliAnalysisTaskExtractPerformanceV0pPb::~AliAnalysisTaskExtractPerformanceV0pPb() | |
306 | { | |
307 | //------------------------------------------------ | |
308 | // DESTRUCTOR | |
309 | //------------------------------------------------ | |
310 | ||
311 | if (fListHistV0){ | |
312 | delete fListHistV0; | |
313 | fListHistV0 = 0x0; | |
314 | } | |
315 | if (fTree){ | |
316 | delete fTree; | |
317 | fTree = 0x0; | |
318 | } | |
319 | if (fTreeEvents){ | |
320 | delete fTreeEvents; | |
321 | fTreeEvents = 0x0; | |
322 | } | |
323 | ||
324 | } | |
325 | ||
326 | //________________________________________________________________________ | |
327 | void AliAnalysisTaskExtractPerformanceV0pPb::UserCreateOutputObjects() | |
328 | { | |
329 | ||
330 | OpenFile(2); | |
331 | // Called once | |
332 | ||
333 | //------------------------------------------------ | |
334 | ||
335 | fTree = new TTree("fTree","V0Candidates"); | |
336 | ||
337 | //------------------------------------------------ | |
338 | // fTree Branch definitions - V0 Tree | |
339 | //------------------------------------------------ | |
340 | ||
341 | //-----------BASIC-INFO--------------------------- | |
342 | /* 1*/ fTree->Branch("fTreeVariablePrimaryStatus",&fTreeVariablePrimaryStatus,"fTreeVariablePrimaryStatus/I"); | |
343 | /* 2*/ fTree->Branch("fTreeVariablePrimaryStatusMother",&fTreeVariablePrimaryStatusMother,"fTreeVariablePrimaryStatusMother/I"); | |
344 | /* 2*/ fTree->Branch("fTreeVariableChi2V0",&fTreeVariableChi2V0,"Chi2V0/F"); | |
345 | /* 3*/ fTree->Branch("fTreeVariableDcaV0Daughters",&fTreeVariableDcaV0Daughters,"fTreeVariableDcaV0Daughters/F"); | |
346 | /* 4*/ fTree->Branch("fTreeVariableDcaPosToPrimVertex",&fTreeVariableDcaPosToPrimVertex,"fTreeVariableDcaPosToPrimVertex/F"); | |
347 | /* 5*/ fTree->Branch("fTreeVariableDcaNegToPrimVertex",&fTreeVariableDcaNegToPrimVertex,"fTreeVariableDcaNegToPrimVertex/F"); | |
348 | /* 6*/ fTree->Branch("fTreeVariableV0Radius",&fTreeVariableV0Radius,"fTreeVariableV0Radius/F"); | |
349 | /* 7*/ fTree->Branch("fTreeVariablePt",&fTreeVariablePt,"fTreeVariablePt/F"); | |
350 | /* 7*/ fTree->Branch("fTreeVariablePtMC",&fTreeVariablePtMC,"fTreeVariablePtMC/F"); | |
351 | /* 8*/ fTree->Branch("fTreeVariableRapK0Short",&fTreeVariableRapK0Short,"fTreeVariableRapK0Short/F"); | |
352 | /* 9*/ fTree->Branch("fTreeVariableRapLambda",&fTreeVariableRapLambda,"fTreeVariableRapLambda/F"); | |
353 | /*10*/ fTree->Branch("fTreeVariableRapMC",&fTreeVariableRapMC,"fTreeVariableRapMC/F"); | |
354 | /*11*/ fTree->Branch("fTreeVariableInvMassK0s",&fTreeVariableInvMassK0s,"fTreeVariableInvMassK0s/F"); | |
355 | /*12*/ fTree->Branch("fTreeVariableInvMassLambda",&fTreeVariableInvMassLambda,"fTreeVariableInvMassLambda/F"); | |
356 | /*13*/ fTree->Branch("fTreeVariableInvMassAntiLambda",&fTreeVariableInvMassAntiLambda,"fTreeVariableInvMassAntiLambda/F"); | |
357 | /*14*/ fTree->Branch("fTreeVariableAlphaV0",&fTreeVariableAlphaV0,"fTreeVariableAlphaV0/F"); | |
358 | /*15*/ fTree->Branch("fTreeVariablePtArmV0",&fTreeVariablePtArmV0,"fTreeVariablePtArmV0/F"); | |
359 | /*16*/ fTree->Branch("fTreeVariableNegTransvMomentum",&fTreeVariableNegTransvMomentum,"fTreeVariableNegTransvMomentum/F"); | |
360 | /*17*/ fTree->Branch("fTreeVariablePosTransvMomentum",&fTreeVariablePosTransvMomentum,"fTreeVariablePosTransvMomentum/F"); | |
361 | /*18*/ fTree->Branch("fTreeVariableNegTransvMomentumMC",&fTreeVariableNegTransvMomentumMC,"fTreeVariableNegTransvMomentumMC/F"); | |
362 | /*19*/ fTree->Branch("fTreeVariablePosTransvMomentumMC",&fTreeVariablePosTransvMomentumMC,"fTreeVariablePosTransvMomentumMC/F"); | |
363 | /*20*/ fTree->Branch("fTreeVariableLeastNbrCrossedRows",&fTreeVariableLeastNbrCrossedRows,"fTreeVariableLeastNbrCrossedRows/I"); | |
364 | /*21*/ fTree->Branch("fTreeVariableLeastRatioCrossedRowsOverFindable",&fTreeVariableLeastRatioCrossedRowsOverFindable,"fTreeVariableLeastRatioCrossedRowsOverFindable/F"); | |
365 | /*22*/ fTree->Branch("fTreeVariablePID",&fTreeVariablePID,"fTreeVariablePID/I"); | |
366 | /*23*/ fTree->Branch("fTreeVariablePIDPositive",&fTreeVariablePIDPositive,"fTreeVariablePIDPositive/I"); | |
367 | /*24*/ fTree->Branch("fTreeVariablePIDNegative",&fTreeVariablePIDNegative,"fTreeVariablePIDNegative/I"); | |
368 | /*25*/ fTree->Branch("fTreeVariablePIDMother",&fTreeVariablePIDMother,"fTreeVariablePIDMother/I"); | |
369 | /*26*/ fTree->Branch("fTreeVariablePtXiMother",&fTreeVariablePtMother,"fTreeVariablePtMother/F"); | |
370 | /*27*/ fTree->Branch("fTreeVariableV0CosineOfPointingAngle",&fTreeVariableV0CosineOfPointingAngle,"fTreeVariableV0CosineOfPointingAngle/F"); | |
371 | //-----------MULTIPLICITY-INFO-------------------- | |
372 | /*28*/ fTree->Branch("fTreeVariableCentrality",&fTreeVariableCentrality,"fTreeVariableCentrality/F"); | |
373 | //------------------------------------------------ | |
374 | /*29*/ fTree->Branch("fTreeVariableDistOverTotMom",&fTreeVariableDistOverTotMom,"fTreeVariableDistOverTotMom/F"); | |
375 | /*30*/ fTree->Branch("fTreeVariableNSigmasPosProton",&fTreeVariableNSigmasPosProton,"fTreeVariableNSigmasPosProton/F"); | |
376 | /*31*/ fTree->Branch("fTreeVariableNSigmasPosPion",&fTreeVariableNSigmasPosPion,"fTreeVariableNSigmasPosPion/F"); | |
377 | /*32*/ fTree->Branch("fTreeVariableNSigmasNegProton",&fTreeVariableNSigmasNegProton,"fTreeVariableNSigmasNegProton/F"); | |
378 | /*33*/ fTree->Branch("fTreeVariableNSigmasNegPion",&fTreeVariableNSigmasNegPion,"fTreeVariableNSigmasNegPion/F"); | |
379 | //------------------------------------------------ | |
380 | /*34*/ fTree->Branch("fTreeVariableNegEta",&fTreeVariableNegEta,"fTreeVariableNegEta/F"); | |
381 | /*35*/ fTree->Branch("fTreeVariablePosEta",&fTreeVariablePosEta,"fTreeVariablePosEta/F"); | |
382 | /*36*/ fTree->Branch("fTreeVariableV0CreationRadius",&fTreeVariableV0CreationRadius,"fTreeVariableV0CreationRadius/F"); | |
383 | ||
384 | //------------------------------------------------ | |
385 | // fTreeEvents Branch definitions | |
386 | //------------------------------------------------ | |
387 | ||
388 | fTreeEvents = new TTree("fTreeEvents","Events"); | |
389 | /*01*/ fTreeEvents->Branch("fTreeEventsCentrality",&fTreeEventsCentrality,"fTreeEventsCentrality/F"); | |
390 | ||
391 | ||
392 | //------------------------------------------------ | |
393 | // Particle Identification Setup | |
394 | //------------------------------------------------ | |
395 | ||
396 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
397 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
398 | fPIDResponse = inputHandler->GetPIDResponse(); | |
399 | ||
400 | //------------------------------------------------ | |
401 | // V0A Centrality Histograms | |
402 | //------------------------------------------------ | |
403 | ||
404 | // Create histograms | |
405 | OpenFile(1); | |
406 | fListHistV0 = new TList(); | |
407 | fListHistV0->SetOwner(); // See http://root.cern.ch/root/html/TCollection.html#TCollection:SetOwner | |
408 | ||
409 | //Default V0A Centrality (if PbPb) | |
410 | if(! fHistCentralityProcessed) { | |
411 | fHistCentralityProcessed = new TH1F("fHistCentralityProcessed", | |
412 | "All processed Events;V0A Centrality;Events", | |
413 | 200, 0, 100); | |
414 | fListHistV0->Add(fHistCentralityProcessed); | |
415 | } | |
416 | if(! fHistCentralityTrigEvt) { | |
417 | fHistCentralityTrigEvt = new TH1F("fHistCentralityTrigEvt", | |
418 | "PS selected Events;V0A Centrality;Events", | |
419 | 200, 0, 100); | |
420 | fListHistV0->Add(fHistCentralityTrigEvt); | |
421 | } | |
422 | if(! fHistCentralityHasVtx) { | |
423 | fHistCentralityHasVtx = new TH1F("fHistCentralityHasVtx", | |
424 | "Events having Vertex;V0A Centrality;Events", | |
425 | 200, 0, 100); | |
426 | fListHistV0->Add(fHistCentralityHasVtx); | |
427 | } | |
428 | if(! fHistCentralityVtxZ) { | |
429 | fHistCentralityVtxZ = new TH1F("fHistCentralityVtxZ", | |
430 | "Vertex |z|<10cm;V0A Centrality;Events", | |
431 | 200, 0, 100); | |
432 | fListHistV0->Add(fHistCentralityVtxZ); | |
433 | } | |
434 | ||
435 | //------------------------------------------------ | |
436 | // Track Multiplicity Histograms | |
437 | //------------------------------------------------ | |
438 | ||
439 | //------------------------------------------------ | |
440 | // Generated Particle Histograms | |
441 | //------------------------------------------------ | |
442 | ||
443 | Int_t lCustomNBins = 200; | |
444 | Double_t lCustomPtUpperLimit = 20; | |
445 | Int_t lCustomNBinsMultiplicity = 100; | |
446 | ||
89b8cfdf | 447 | Int_t lCustomYNBins = 48; |
448 | Double_t lCustomMinY = -1.2; | |
449 | Double_t lCustomMaxY = +1.2; | |
450 | ||
451 | //---------------------------------- | |
452 | // Y in the lab | |
453 | //---------------------------------- | |
b2e7de7f | 454 | |
455 | //---------------------------------- | |
456 | // Generated Particle Histos | |
457 | //---------------------------------- | |
458 | ||
459 | //--- 3D Histo (Pt, Y, Centrality), analysis level | |
460 | ||
461 | if(! f3dHist_Analysis_PtVsYVsV0A_Lambda) { | |
462 | f3dHist_Analysis_PtVsYVsV0A_Lambda = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_Lambda", "Pt_{lambda} Vs Y_{#Lambda} Vs V0A Centrality; Pt_{lambda} (GeV/c); Y_{#Lambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
463 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_Lambda); | |
464 | } | |
465 | if(! f3dHist_Analysis_PtVsYVsV0A_AntiLambda) { | |
466 | f3dHist_Analysis_PtVsYVsV0A_AntiLambda = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_AntiLambda", "Pt_{AntiLambda} Vs Y_{AntiLambda} Vs V0A Centrality; Pt_{AntiLambda} (GeV/c); Y_{AntiLambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
467 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_AntiLambda); | |
468 | } | |
469 | if(! f3dHist_Analysis_PtVsYVsV0A_K0Short) { | |
470 | f3dHist_Analysis_PtVsYVsV0A_K0Short = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_K0Short", "Pt_{K0s} Vs Y_{K0s} Vs V0A Centrality; Pt_{K0s} (GeV/c); Y_{K0s} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
471 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_K0Short); | |
472 | } | |
473 | ||
474 | //--- 3D Histo (Pt, Y, Centrality), generator level | |
475 | ||
476 | if(! f3dHist_Generated_PtVsYVsV0A_Lambda) { | |
477 | f3dHist_Generated_PtVsYVsV0A_Lambda = new TH3F( "f3dHist_Generated_PtVsYVsV0A_Lambda", "Pt_{lambda} Vs Y_{#Lambda} Vs V0A Centrality; Pt_{lambda} (GeV/c); Y_{#Lambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
478 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_Lambda); | |
479 | } | |
480 | if(! f3dHist_Generated_PtVsYVsV0A_AntiLambda) { | |
481 | f3dHist_Generated_PtVsYVsV0A_AntiLambda = new TH3F( "f3dHist_Generated_PtVsYVsV0A_AntiLambda", "Pt_{AntiLambda} Vs Y_{AntiLambda} Vs V0A Centrality; Pt_{AntiLambda} (GeV/c); Y_{AntiLambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
482 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_AntiLambda); | |
483 | } | |
484 | if(! f3dHist_Generated_PtVsYVsV0A_K0Short) { | |
485 | f3dHist_Generated_PtVsYVsV0A_K0Short = new TH3F( "f3dHist_Generated_PtVsYVsV0A_K0Short", "Pt_{K0s} Vs Y_{K0s} Vs V0A Centrality; Pt_{K0s} (GeV/c); Y_{K0s} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
486 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_K0Short); | |
487 | } | |
488 | ||
489 | //-------------------------------------------------------------------------------------- | |
490 | // MC Histos for charged Kaons (cross-checking purposes) | |
491 | //-------------------------------------------------------------------------------------- | |
492 | //--- 3D Histo (Pt, Y, V0A Cent) for charged Kaons | |
493 | ||
494 | if(! f3dHist_Analysis_PtVsYVsV0A_KPlus) { | |
495 | f3dHist_Analysis_PtVsYVsV0A_KPlus = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_KPlus", "Pt_{K+} Vs Y_{K+} Vs Multiplicity; Pt_{K+} (GeV/c); Y_{K+} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
496 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_KPlus); | |
497 | } | |
498 | if(! f3dHist_Analysis_PtVsYVsV0A_KMinus) { | |
499 | f3dHist_Analysis_PtVsYVsV0A_KMinus = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_KMinus", "Pt_{K-} Vs Y_{K-} Vs Multiplicity; Pt_{K-} (GeV/c); Y_{K-} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
500 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_KMinus); | |
501 | } | |
502 | if(! f3dHist_Generated_PtVsYVsV0A_KPlus) { | |
503 | f3dHist_Generated_PtVsYVsV0A_KPlus = new TH3F( "f3dHist_Generated_PtVsYVsV0A_KPlus", "Pt_{K+} Vs Y_{K+} Vs Multiplicity; Pt_{K+} (GeV/c); Y_{K+} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
504 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_KPlus); | |
505 | } | |
506 | if(! f3dHist_Generated_PtVsYVsV0A_KMinus) { | |
507 | f3dHist_Generated_PtVsYVsV0A_KMinus = new TH3F( "f3dHist_Generated_PtVsYVsV0A_KMinus", "Pt_{K-} Vs Y_{K-} Vs Multiplicity; Pt_{K-} (GeV/c); Y_{K-} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
508 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_KMinus); | |
509 | } | |
510 | ||
511 | //-------------------------------------------------------------------------------------- | |
512 | // MC Histos for cascades (feeddown) | |
513 | //-------------------------------------------------------------------------------------- | |
514 | //--- 3D Histo (Pt, Y, V0A Cent) | |
515 | ||
516 | if(! f3dHist_Analysis_PtVsYVsV0A_XiMinus) { | |
517 | f3dHist_Analysis_PtVsYVsV0A_XiMinus = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_XiMinus", "Pt_{XiMinus} Vs Y_{XiMinus} Vs Multiplicity; Pt_{XiMinus} (GeV/c); Y_{XiMinus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
518 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_XiMinus); | |
519 | } | |
520 | if(! f3dHist_Analysis_PtVsYVsV0A_XiPlus) { | |
521 | f3dHist_Analysis_PtVsYVsV0A_XiPlus = new TH3F( "f3dHist_Analysis_PtVsYVsV0A_XiPlus", "Pt_{XiPlus} Vs Y_{XiPlus} Vs Multiplicity; Pt_{XiPlus} (GeV/c); Y_{XiPlus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
522 | fListHistV0->Add(f3dHist_Analysis_PtVsYVsV0A_XiPlus); | |
523 | } | |
524 | if(! f3dHist_Generated_PtVsYVsV0A_XiMinus) { | |
525 | f3dHist_Generated_PtVsYVsV0A_XiMinus = new TH3F( "f3dHist_Generated_PtVsYVsV0A_XiMinus", "Pt_{XiMinus} Vs Y_{XiMinus} Vs Multiplicity; Pt_{XiMinus} (GeV/c); Y_{XiMinus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
526 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_XiMinus); | |
527 | } | |
528 | if(! f3dHist_Generated_PtVsYVsV0A_XiPlus) { | |
529 | f3dHist_Generated_PtVsYVsV0A_XiPlus = new TH3F( "f3dHist_Generated_PtVsYVsV0A_XiPlus", "Pt_{XiPlus} Vs Y_{XiPlus} Vs Multiplicity; Pt_{XiPlus} (GeV/c); Y_{XiPlus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
530 | fListHistV0->Add(f3dHist_Generated_PtVsYVsV0A_XiPlus); | |
531 | } | |
532 | ||
89b8cfdf | 533 | |
534 | //---------------------------------- | |
535 | // Y in the CMS | |
536 | //---------------------------------- | |
537 | ||
538 | //---------------------------------- | |
539 | // Generated Particle Histos | |
540 | //---------------------------------- | |
541 | ||
542 | //--- 3D Histo (Pt, Y, Centrality), analysis level | |
543 | ||
544 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_Lambda) { | |
545 | f3dHist_Analysis_PtVsYCMSVsV0A_Lambda = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_Lambda", "Pt_{lambda} Vs Y_{#Lambda} Vs V0A Centrality; Pt_{lambda} (GeV/c); Y_{#Lambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
546 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_Lambda); | |
547 | } | |
548 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda) { | |
549 | f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda", "Pt_{AntiLambda} Vs Y_{AntiLambda} Vs V0A Centrality; Pt_{AntiLambda} (GeV/c); Y_{AntiLambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
550 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda); | |
551 | } | |
552 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_K0Short) { | |
553 | f3dHist_Analysis_PtVsYCMSVsV0A_K0Short = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_K0Short", "Pt_{K0s} Vs Y_{K0s} Vs V0A Centrality; Pt_{K0s} (GeV/c); Y_{K0s} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
554 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_K0Short); | |
555 | } | |
556 | ||
557 | //--- 3D Histo (Pt, Y, Centrality), generator level | |
558 | ||
559 | if(! f3dHist_Generated_PtVsYCMSVsV0A_Lambda) { | |
560 | f3dHist_Generated_PtVsYCMSVsV0A_Lambda = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_Lambda", "Pt_{lambda} Vs Y_{#Lambda} Vs V0A Centrality; Pt_{lambda} (GeV/c); Y_{#Lambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
561 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_Lambda); | |
562 | } | |
563 | if(! f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda) { | |
564 | f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda", "Pt_{AntiLambda} Vs Y_{AntiLambda} Vs V0A Centrality; Pt_{AntiLambda} (GeV/c); Y_{AntiLambda} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
565 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda); | |
566 | } | |
567 | if(! f3dHist_Generated_PtVsYCMSVsV0A_K0Short) { | |
568 | f3dHist_Generated_PtVsYCMSVsV0A_K0Short = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_K0Short", "Pt_{K0s} Vs Y_{K0s} Vs V0A Centrality; Pt_{K0s} (GeV/c); Y_{K0s} ; Cent", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
569 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_K0Short); | |
570 | } | |
571 | ||
572 | //-------------------------------------------------------------------------------------- | |
573 | // MC Histos for charged Kaons (cross-checking purposes) | |
574 | //-------------------------------------------------------------------------------------- | |
575 | //--- 3D Histo (Pt, Y, V0A Cent) for charged Kaons | |
576 | ||
577 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_KPlus) { | |
578 | f3dHist_Analysis_PtVsYCMSVsV0A_KPlus = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_KPlus", "Pt_{K+} Vs Y_{K+} Vs Multiplicity; Pt_{K+} (GeV/c); Y_{K+} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
579 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_KPlus); | |
580 | } | |
581 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_KMinus) { | |
582 | f3dHist_Analysis_PtVsYCMSVsV0A_KMinus = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_KMinus", "Pt_{K-} Vs Y_{K-} Vs Multiplicity; Pt_{K-} (GeV/c); Y_{K-} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
583 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_KMinus); | |
584 | } | |
585 | if(! f3dHist_Generated_PtVsYCMSVsV0A_KPlus) { | |
586 | f3dHist_Generated_PtVsYCMSVsV0A_KPlus = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_KPlus", "Pt_{K+} Vs Y_{K+} Vs Multiplicity; Pt_{K+} (GeV/c); Y_{K+} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
587 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_KPlus); | |
588 | } | |
589 | if(! f3dHist_Generated_PtVsYCMSVsV0A_KMinus) { | |
590 | f3dHist_Generated_PtVsYCMSVsV0A_KMinus = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_KMinus", "Pt_{K-} Vs Y_{K-} Vs Multiplicity; Pt_{K-} (GeV/c); Y_{K-} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
591 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_KMinus); | |
592 | } | |
593 | ||
594 | //-------------------------------------------------------------------------------------- | |
595 | // MC Histos for cascades (feeddown) | |
596 | //-------------------------------------------------------------------------------------- | |
597 | //--- 3D Histo (Pt, Y, V0A Cent) | |
598 | ||
599 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus) { | |
600 | f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus", "Pt_{XiMinus} Vs Y_{XiMinus} Vs Multiplicity; Pt_{XiMinus} (GeV/c); Y_{XiMinus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
601 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus); | |
602 | } | |
603 | if(! f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus) { | |
604 | f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus = new TH3F( "f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus", "Pt_{XiPlus} Vs Y_{XiPlus} Vs Multiplicity; Pt_{XiPlus} (GeV/c); Y_{XiPlus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
605 | fListHistV0->Add(f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus); | |
606 | } | |
607 | if(! f3dHist_Generated_PtVsYCMSVsV0A_XiMinus) { | |
608 | f3dHist_Generated_PtVsYCMSVsV0A_XiMinus = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_XiMinus", "Pt_{XiMinus} Vs Y_{XiMinus} Vs Multiplicity; Pt_{XiMinus} (GeV/c); Y_{XiMinus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
609 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_XiMinus); | |
610 | } | |
611 | if(! f3dHist_Generated_PtVsYCMSVsV0A_XiPlus) { | |
612 | f3dHist_Generated_PtVsYCMSVsV0A_XiPlus = new TH3F( "f3dHist_Generated_PtVsYCMSVsV0A_XiPlus", "Pt_{XiPlus} Vs Y_{XiPlus} Vs Multiplicity; Pt_{XiPlus} (GeV/c); Y_{XiPlus} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, lCustomYNBins, lCustomMinY,lCustomMaxY,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity); | |
613 | fListHistV0->Add(f3dHist_Generated_PtVsYCMSVsV0A_XiPlus); | |
614 | } | |
615 | ||
616 | ||
b2e7de7f | 617 | //List of Histograms: Normal |
618 | PostData(1, fListHistV0); | |
619 | ||
620 | //TTree Object: Saved to base directory. Should cache to disk while saving. | |
621 | //(Important to avoid excessive memory usage, particularly when merging) | |
622 | PostData(2, fTree); | |
623 | PostData(3, fTreeEvents); | |
624 | ||
625 | }// end UserCreateOutputObjects | |
626 | ||
627 | ||
628 | //________________________________________________________________________ | |
629 | void AliAnalysisTaskExtractPerformanceV0pPb::UserExec(Option_t *) | |
630 | { | |
631 | // Main loop | |
632 | // Called for each event | |
633 | ||
634 | AliESDEvent *lESDevent = 0x0; | |
635 | AliMCEvent *lMCevent = 0x0; | |
636 | AliStack *lMCstack = 0x0; | |
637 | ||
638 | //Int_t lNumberOfV0s = -1; | |
639 | Double_t lTrkgPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
640 | Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0}; | |
641 | Double_t lMagneticField = -10.; | |
89b8cfdf | 642 | Double_t lpARapidityShift = 0.465; |
b2e7de7f | 643 | |
644 | // Connect to the InputEvent | |
645 | // After these lines, we should have an ESD/AOD event + the number of V0s in it. | |
646 | ||
647 | // Appropriate for ESD analysis! | |
648 | ||
649 | lESDevent = dynamic_cast<AliESDEvent*>( InputEvent() ); | |
650 | if (!lESDevent) { | |
651 | AliWarning("ERROR: lESDevent not available \n"); | |
652 | return; | |
653 | } | |
654 | ||
655 | lMCevent = MCEvent(); | |
656 | if (!lMCevent) { | |
657 | Printf("ERROR: Could not retrieve MC event \n"); | |
658 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
659 | return; | |
660 | } | |
661 | ||
662 | lMCstack = lMCevent->Stack(); | |
663 | if (!lMCstack) { | |
664 | Printf("ERROR: Could not retrieve MC stack \n"); | |
665 | cout << "Name of the file with pb :" << fInputHandler->GetTree()->GetCurrentFile()->GetName() << endl; | |
666 | return; | |
667 | } | |
668 | ||
669 | TArrayF mcPrimaryVtx; | |
670 | AliGenEventHeader* mcHeader=lMCevent->GenEventHeader(); | |
671 | if(!mcHeader) return; | |
672 | mcHeader->PrimaryVertex(mcPrimaryVtx); | |
673 | ||
4a20b95e | 674 | Int_t nPart = 0; |
675 | ||
676 | //Code Snippet from Alexander for looking at diffractive Events from DPMJet | |
677 | if(fDiffractiveOnly){ | |
678 | AliHeader * header = lMCevent->Header(); | |
679 | AliGenDPMjetEventHeader* dpmHeader = dynamic_cast<AliGenDPMjetEventHeader*>(header->GenEventHeader()); | |
680 | if (dpmHeader) nPart = dpmHeader->ProjectileParticipants() + dpmHeader->TargetParticipants(); | |
681 | // | |
682 | Int_t nsdiffrac1 = 0; | |
683 | Int_t nsdiffrac2 = 0; | |
684 | Int_t nddiffrac = 0; | |
685 | if (dpmHeader) dpmHeader->GetNDiffractive(nsdiffrac1, nsdiffrac2, nddiffrac); | |
d8a0be37 | 686 | if (nsdiffrac1 + nsdiffrac2 != nPart) return; |
4a20b95e | 687 | } |
688 | ||
b2e7de7f | 689 | //------------------------------------------------ |
690 | // Multiplicity Information Acquistion | |
691 | //------------------------------------------------ | |
692 | ||
693 | //REVISED multiplicity estimator after 'multiplicity day' (2011) | |
694 | Float_t lMultiplicity = -100; | |
695 | fTreeVariableCentrality = -100; | |
696 | ||
697 | //---> If this is a nuclear collision, then go nuclear on "multiplicity" variable... | |
698 | //---> Warning: Experimental | |
699 | AliCentrality* centrality; | |
700 | centrality = lESDevent->GetCentrality(); | |
701 | if (centrality->GetQuality()>1) { | |
702 | PostData(1, fListHistV0); | |
703 | PostData(2, fTree); | |
704 | PostData(3, fTreeEvents); | |
705 | return; | |
706 | } | |
707 | lMultiplicity = centrality->GetCentralityPercentile( "V0A" ); | |
708 | ||
709 | //Set variable for filling tree afterwards! | |
710 | //---> Always V0A | |
711 | fTreeVariableCentrality = lMultiplicity; | |
712 | fTreeEventsCentrality = lMultiplicity; | |
713 | ||
714 | fHistCentralityProcessed->Fill ( fTreeVariableCentrality ); | |
715 | ||
716 | //------------------------------------------------ | |
717 | // MC Information Acquistion | |
718 | //------------------------------------------------ | |
719 | ||
720 | Int_t iNumberOfPrimaries = -1; | |
721 | iNumberOfPrimaries = lMCstack->GetNprimary(); | |
722 | if(iNumberOfPrimaries < 1) return; | |
723 | ||
724 | //------------------------------------------------ | |
725 | // Variable Definition | |
726 | //------------------------------------------------ | |
727 | ||
728 | Int_t lNbMCPrimary = 0; | |
729 | ||
730 | Int_t lPdgcodeCurrentPart = 0; | |
731 | Double_t lRapCurrentPart = 0; | |
732 | Double_t lPtCurrentPart = 0; | |
733 | ||
734 | //Int_t lComeFromSigma = 0; | |
735 | ||
736 | // current mc particle 's mother | |
737 | //Int_t iCurrentMother = 0; | |
738 | lNbMCPrimary = lMCstack->GetNprimary(); | |
739 | ||
740 | //------------------------------------------------ | |
741 | // Pre-Physics Selection | |
742 | //------------------------------------------------ | |
743 | ||
744 | //----- Loop on primary Xi, Omega -------------------------------------------------------------- | |
745 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) | |
746 | {// This is the begining of the loop on primaries | |
747 | ||
748 | TParticle* lCurrentParticlePrimary = 0x0; | |
749 | lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); | |
750 | if(!lCurrentParticlePrimary){ | |
751 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
752 | continue; | |
753 | } | |
754 | if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) { | |
755 | Double_t lRapXiMCPrimary = -100; | |
756 | if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) { | |
757 | if ( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) !=0 ){ | |
758 | lRapXiMCPrimary = 0.5*TMath::Log( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) ); | |
759 | } | |
760 | } | |
761 | ||
762 | //================================================================================= | |
763 | // Xi Histograms | |
764 | if( lCurrentParticlePrimary->GetPdgCode() == 3312 ){ | |
765 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
766 | f3dHist_Generated_PtVsYVsV0A_XiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
89b8cfdf | 767 | f3dHist_Generated_PtVsYCMSVsV0A_XiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+lpARapidityShift, lMultiplicity); |
b2e7de7f | 768 | } |
769 | if( lCurrentParticlePrimary->GetPdgCode() == -3312 ){ | |
770 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
771 | f3dHist_Generated_PtVsYVsV0A_XiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
89b8cfdf | 772 | f3dHist_Generated_PtVsYCMSVsV0A_XiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+lpARapidityShift, lMultiplicity); |
b2e7de7f | 773 | } |
774 | } | |
775 | } | |
776 | //----- End Loop on primary Xi, Omega ---------------------------------------------------------- | |
777 | ||
778 | //----- Loop on Lambda, K0Short ---------------------------------------------------------------- | |
779 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < (lMCstack->GetNtrack()); iCurrentLabelStack++) | |
780 | {// This is the begining of the loop on tracks | |
781 | ||
782 | TParticle* lCurrentParticleForLambdaCheck = 0x0; | |
783 | lCurrentParticleForLambdaCheck = lMCstack->Particle( iCurrentLabelStack ); | |
784 | if(!lCurrentParticleForLambdaCheck){ | |
785 | Printf("V0s loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
786 | continue; | |
787 | } | |
788 | ||
789 | //================================================================================= | |
790 | //Single-Strange checks | |
791 | // Keep only K0s, Lambda and AntiLambda: | |
792 | lPdgcodeCurrentPart = lCurrentParticleForLambdaCheck->GetPdgCode(); | |
793 | ||
794 | if ( (lCurrentParticleForLambdaCheck->GetPdgCode() == 310 ) || | |
795 | (lCurrentParticleForLambdaCheck->GetPdgCode() == 3122 ) || | |
796 | (lCurrentParticleForLambdaCheck->GetPdgCode() == -3122 ) || | |
797 | (lCurrentParticleForLambdaCheck->GetPdgCode() == 321 ) || | |
798 | (lCurrentParticleForLambdaCheck->GetPdgCode() == -321 ) ) | |
799 | { | |
800 | lRapCurrentPart = MyRapidity(lCurrentParticleForLambdaCheck->Energy(),lCurrentParticleForLambdaCheck->Pz()); | |
801 | lPtCurrentPart = lCurrentParticleForLambdaCheck->Pt(); | |
802 | ||
803 | //Use Physical Primaries only for filling PrimRaw Histograms! | |
804 | if ( lMCstack->IsPhysicalPrimary(iCurrentLabelStack)!=kTRUE ) continue; | |
805 | ||
806 | if( lPdgcodeCurrentPart == 3122 ){ | |
807 | f3dHist_Generated_PtVsYVsV0A_Lambda->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); | |
89b8cfdf | 808 | f3dHist_Generated_PtVsYCMSVsV0A_Lambda->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); |
b2e7de7f | 809 | } |
810 | if( lPdgcodeCurrentPart == -3122 ){ | |
811 | f3dHist_Generated_PtVsYVsV0A_AntiLambda->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); | |
89b8cfdf | 812 | f3dHist_Generated_PtVsYCMSVsV0A_AntiLambda->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); |
b2e7de7f | 813 | } |
814 | if( lPdgcodeCurrentPart == 310 ){ | |
815 | f3dHist_Generated_PtVsYVsV0A_K0Short->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); | |
89b8cfdf | 816 | f3dHist_Generated_PtVsYCMSVsV0A_K0Short->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); |
b2e7de7f | 817 | } |
818 | if( lPdgcodeCurrentPart == 321 ){ | |
819 | f3dHist_Generated_PtVsYVsV0A_KPlus->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); | |
89b8cfdf | 820 | f3dHist_Generated_PtVsYCMSVsV0A_KPlus->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); |
b2e7de7f | 821 | } |
822 | if( lPdgcodeCurrentPart == -321 ){ | |
823 | f3dHist_Generated_PtVsYVsV0A_KMinus->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); | |
89b8cfdf | 824 | f3dHist_Generated_PtVsYCMSVsV0A_KMinus->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); |
b2e7de7f | 825 | } |
826 | } | |
827 | }//End of loop on tracks | |
828 | //----- End Loop on Lambda, K0Short ------------------------------------------------------------ | |
829 | ||
830 | lPdgcodeCurrentPart = 0; | |
831 | lRapCurrentPart = 0; | |
832 | lPtCurrentPart = 0; | |
833 | ||
834 | //------------------------------------------------ | |
835 | // Physics Selection | |
836 | //------------------------------------------------ | |
837 | ||
838 | // new method | |
839 | UInt_t maskIsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected(); | |
840 | Bool_t isSelected = 0; | |
841 | isSelected = (maskIsSelected & AliVEvent::kINT7) == AliVEvent::kINT7; | |
842 | ||
843 | //Trigger Selection for kINT7 | |
844 | if ( !isSelected ) { | |
845 | PostData(1, fListHistV0); | |
846 | PostData(2, fTree); | |
847 | PostData(3, fTreeEvents); | |
848 | return; | |
849 | } | |
850 | ||
851 | //------------------------------------------------ | |
852 | // After Trigger Selection | |
853 | //------------------------------------------------ | |
854 | ||
855 | fHistCentralityTrigEvt -> Fill( fTreeVariableCentrality ); | |
856 | ||
857 | //------------------------------------------------ | |
858 | // Getting: Primary Vertex + MagField Info | |
859 | //------------------------------------------------ | |
860 | ||
861 | const AliESDVertex *lPrimaryTrackingESDVtx = lESDevent->GetPrimaryVertexTracks(); | |
862 | // get the vtx stored in ESD found with tracks | |
863 | lPrimaryTrackingESDVtx->GetXYZ( lTrkgPrimaryVtxPos ); | |
864 | ||
865 | const AliESDVertex *lPrimaryBestESDVtx = lESDevent->GetPrimaryVertex(); | |
866 | // get the best primary vertex available for the event | |
867 | // As done in AliCascadeVertexer, we keep the one which is the best one available. | |
868 | // between : Tracking vertex > SPD vertex > TPC vertex > default SPD vertex | |
869 | // This one will be used for next calculations (DCA essentially) | |
870 | lPrimaryBestESDVtx->GetXYZ( lBestPrimaryVtxPos ); | |
871 | ||
872 | Double_t lPrimaryVtxPosition[3]; | |
873 | const AliVVertex *primaryVtx = lESDevent->GetPrimaryVertex(); | |
874 | lPrimaryVtxPosition[0] = primaryVtx->GetX(); | |
875 | lPrimaryVtxPosition[1] = primaryVtx->GetY(); | |
876 | lPrimaryVtxPosition[2] = primaryVtx->GetZ(); | |
877 | ||
878 | //------------------------------------------------ | |
879 | // Primary Vertex Requirements Section: | |
880 | // ---> pp and PbPb: Only requires |z|<10cm | |
881 | // ---> pPb: all requirements checked at this stage | |
882 | //------------------------------------------------ | |
883 | ||
884 | //Roberto's PV selection criteria, implemented 17th April 2013 | |
885 | ||
886 | /* vertex selection */ | |
887 | Bool_t fHasVertex = kFALSE; | |
888 | ||
889 | const AliESDVertex *vertex = lESDevent->GetPrimaryVertexTracks(); | |
890 | if (vertex->GetNContributors() < 1) { | |
891 | vertex = lESDevent->GetPrimaryVertexSPD(); | |
892 | if (vertex->GetNContributors() < 1) fHasVertex = kFALSE; | |
893 | else fHasVertex = kTRUE; | |
894 | TString vtxTyp = vertex->GetTitle(); | |
895 | Double_t cov[6]={0}; | |
896 | vertex->GetCovarianceMatrix(cov); | |
897 | Double_t zRes = TMath::Sqrt(cov[5]); | |
898 | if (vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) fHasVertex = kFALSE; | |
899 | } | |
900 | else fHasVertex = kTRUE; | |
901 | ||
902 | //Is First event in chunk rejection: Still present! | |
903 | if(fHasVertex == kFALSE) { | |
904 | AliWarning("Pb / | PV does not satisfy selection criteria!"); | |
905 | PostData(1, fListHistV0); | |
906 | PostData(2, fTree); | |
907 | PostData(3, fTreeEvents); | |
908 | return; | |
909 | } | |
910 | ||
911 | fHistCentralityHasVtx -> Fill ( fTreeVariableCentrality ); | |
912 | //17 April Fix: Always do primary vertex Z selection, after pA vertex selection from Roberto | |
913 | if(TMath::Abs(lBestPrimaryVtxPos[2]) > 10.0) { | |
914 | AliWarning("Pb / | pPb case | Z position of Best Prim Vtx | > 10.0 cm ... return !"); | |
915 | PostData(1, fListHistV0); | |
916 | PostData(2, fTree); | |
917 | PostData(3, fTreeEvents); | |
918 | return; | |
919 | } | |
920 | ||
921 | fHistCentralityVtxZ -> Fill ( fTreeVariableCentrality ); | |
922 | lMagneticField = lESDevent->GetMagneticField( ); | |
923 | ||
924 | //Fill Event Tree: Analysis Selection Level | |
925 | fTreeEvents->Fill(); | |
926 | ||
927 | ||
928 | //------------------------------------------------ | |
929 | // stack loop starts here | |
930 | //------------------------------------------------ | |
931 | ||
932 | //---> Loop over ALL PARTICLES | |
933 | ||
934 | for (Int_t iMc = 0; iMc < (lMCstack->GetNtrack()); iMc++) { | |
935 | TParticle *p0 = lMCstack->Particle(iMc); | |
936 | if (!p0) { | |
937 | //Printf("ERROR: particle with label %d not found in lMCstack (mc loop)", iMc); | |
938 | continue; | |
939 | } | |
940 | lPdgcodeCurrentPart = p0->GetPdgCode(); | |
941 | ||
942 | // Keep only K0s, Lambda and AntiLambda: | |
943 | if ( (lPdgcodeCurrentPart != 310 ) && (lPdgcodeCurrentPart != 3122 ) && (lPdgcodeCurrentPart != -3122 ) && (TMath::Abs(lPdgcodeCurrentPart) != 321 ) ) continue; | |
944 | ||
945 | lRapCurrentPart = MyRapidity(p0->Energy(),p0->Pz()); | |
946 | lPtCurrentPart = p0->Pt(); | |
947 | ||
948 | //Use Physical Primaries only for filling PrimRaw Histograms! | |
949 | if ( lMCstack->IsPhysicalPrimary(iMc)!=kTRUE ) continue; | |
950 | ||
951 | if( lPdgcodeCurrentPart == 3122 ){ | |
61d295ec | 952 | f3dHist_Analysis_PtVsYVsV0A_Lambda->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); |
953 | f3dHist_Analysis_PtVsYCMSVsV0A_Lambda->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); | |
b2e7de7f | 954 | } |
955 | if( lPdgcodeCurrentPart == -3122 ){ | |
61d295ec | 956 | f3dHist_Analysis_PtVsYVsV0A_AntiLambda->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); |
957 | f3dHist_Analysis_PtVsYCMSVsV0A_AntiLambda->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); | |
b2e7de7f | 958 | } |
959 | if( lPdgcodeCurrentPart == 310 ){ | |
61d295ec | 960 | f3dHist_Analysis_PtVsYVsV0A_K0Short->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); |
961 | f3dHist_Analysis_PtVsYCMSVsV0A_K0Short->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); | |
b2e7de7f | 962 | } |
963 | if( lPdgcodeCurrentPart == 321 ){ | |
61d295ec | 964 | f3dHist_Analysis_PtVsYVsV0A_KPlus->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); |
965 | f3dHist_Analysis_PtVsYCMSVsV0A_KPlus->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); | |
b2e7de7f | 966 | } |
967 | if( lPdgcodeCurrentPart == -321 ){ | |
61d295ec | 968 | f3dHist_Analysis_PtVsYVsV0A_KMinus->Fill(lPtCurrentPart, lRapCurrentPart, lMultiplicity); |
969 | f3dHist_Analysis_PtVsYCMSVsV0A_KMinus->Fill(lPtCurrentPart, lRapCurrentPart+lpARapidityShift, lMultiplicity); | |
b2e7de7f | 970 | } |
971 | } | |
972 | ||
973 | //----- Loop on primary Xi, Omega -------------------------------------------------------------- | |
974 | for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++) | |
975 | {// This is the begining of the loop on primaries | |
976 | ||
977 | TParticle* lCurrentParticlePrimary = 0x0; | |
978 | lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack ); | |
979 | if(!lCurrentParticlePrimary){ | |
980 | Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack ); | |
981 | continue; | |
982 | } | |
983 | if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) { | |
984 | Double_t lRapXiMCPrimary = -100; | |
985 | if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) { | |
986 | if ( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) !=0 ){ | |
987 | lRapXiMCPrimary = 0.5*TMath::Log( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) ); | |
988 | } | |
989 | } | |
990 | ||
991 | //================================================================================= | |
992 | // Xi Histograms | |
993 | if( lCurrentParticlePrimary->GetPdgCode() == 3312 ){ | |
994 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
995 | f3dHist_Analysis_PtVsYVsV0A_XiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
89b8cfdf | 996 | f3dHist_Analysis_PtVsYCMSVsV0A_XiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+lpARapidityShift, lMultiplicity); |
b2e7de7f | 997 | } |
998 | if( lCurrentParticlePrimary->GetPdgCode() == -3312 ){ | |
999 | lPtCurrentPart = lCurrentParticlePrimary->Pt(); | |
1000 | f3dHist_Analysis_PtVsYVsV0A_XiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary, lMultiplicity); | |
89b8cfdf | 1001 | f3dHist_Analysis_PtVsYCMSVsV0A_XiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+lpARapidityShift, lMultiplicity); |
b2e7de7f | 1002 | } |
1003 | } | |
1004 | } | |
1005 | //----- End Loop on primary Xi, Omega ---------------------------------------------------------- | |
1006 | ||
1007 | //------------------------------------------------ | |
1008 | // MAIN LAMBDA LOOP STARTS HERE | |
1009 | //------------------------------------------------ | |
1010 | ||
1011 | //Variable definition | |
1012 | Int_t lOnFlyStatus = 0; | |
1013 | Double_t lChi2V0 = 0; | |
1014 | Double_t lDcaV0Daughters = 0, lDcaV0ToPrimVertex = 0; | |
1015 | Double_t lDcaPosToPrimVertex = 0, lDcaNegToPrimVertex = 0; | |
1016 | Double_t lV0CosineOfPointingAngle = 0; | |
1017 | Double_t lV0Radius = 0, lPt = 0; | |
1018 | Double_t lRapK0Short = 0, lRapLambda = 0; | |
1019 | Double_t lInvMassK0s = 0, lInvMassLambda = 0, lInvMassAntiLambda = 0; | |
1020 | Double_t lAlphaV0 = 0, lPtArmV0 = 0; | |
1021 | Double_t fMinV0Pt = 0; | |
1022 | Double_t fMaxV0Pt = 100; | |
1023 | ||
1024 | Int_t nv0s = 0; | |
1025 | nv0s = lESDevent->GetNumberOfV0s(); | |
1026 | ||
1027 | for (Int_t iV0 = 0; iV0 < nv0s; iV0++) | |
1028 | {// This is the begining of the V0 loop | |
1029 | AliESDv0 *v0 = ((AliESDEvent*)lESDevent)->GetV0(iV0); | |
1030 | if (!v0) continue; | |
1031 | ||
1032 | Double_t tV0mom[3]; | |
1033 | v0->GetPxPyPz( tV0mom[0],tV0mom[1],tV0mom[2] ); | |
1034 | Double_t lV0TotalMomentum = TMath::Sqrt( | |
1035 | tV0mom[0]*tV0mom[0]+tV0mom[1]*tV0mom[1]+tV0mom[2]*tV0mom[2] ); | |
1036 | ||
1037 | Double_t tDecayVertexV0[3]; v0->GetXYZ(tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2]); | |
1038 | lV0Radius = TMath::Sqrt(tDecayVertexV0[0]*tDecayVertexV0[0]+tDecayVertexV0[1]*tDecayVertexV0[1]); | |
1039 | lPt = v0->Pt(); | |
1040 | lRapK0Short = v0->RapK0Short(); | |
1041 | lRapLambda = v0->RapLambda(); | |
1042 | ||
1043 | if ((lPt<fMinV0Pt)||(fMaxV0Pt<lPt)) continue; | |
1044 | ||
1045 | UInt_t lKeyPos = (UInt_t)TMath::Abs(v0->GetPindex()); | |
1046 | UInt_t lKeyNeg = (UInt_t)TMath::Abs(v0->GetNindex()); | |
1047 | ||
1048 | Double_t lMomPos[3]; v0->GetPPxPyPz(lMomPos[0],lMomPos[1],lMomPos[2]); | |
1049 | Double_t lMomNeg[3]; v0->GetNPxPyPz(lMomNeg[0],lMomNeg[1],lMomNeg[2]); | |
1050 | ||
1051 | AliESDtrack *pTrack=((AliESDEvent*)lESDevent)->GetTrack(lKeyPos); | |
1052 | AliESDtrack *nTrack=((AliESDEvent*)lESDevent)->GetTrack(lKeyNeg); | |
1053 | if (!pTrack || !nTrack) { | |
1054 | Printf("ERROR: Could not retreive one of the daughter track"); | |
1055 | continue; | |
1056 | } | |
1057 | ||
1058 | fTreeVariableNegEta = nTrack->Eta(); | |
1059 | fTreeVariablePosEta = pTrack->Eta(); | |
1060 | ||
1061 | // Filter like-sign V0 (next: add counter and distribution) | |
1062 | if ( pTrack->GetSign() == nTrack->GetSign()){ | |
1063 | continue; | |
1064 | } | |
1065 | ||
1066 | //________________________________________________________________________ | |
1067 | // Track quality cuts | |
1068 | Float_t lPosTrackCrossedRows = pTrack->GetTPCClusterInfo(2,1); | |
1069 | Float_t lNegTrackCrossedRows = nTrack->GetTPCClusterInfo(2,1); | |
1070 | fTreeVariableLeastNbrCrossedRows = (Int_t) lPosTrackCrossedRows; | |
1071 | if( lNegTrackCrossedRows < fTreeVariableLeastNbrCrossedRows ) | |
1072 | fTreeVariableLeastNbrCrossedRows = (Int_t) lNegTrackCrossedRows; | |
1073 | ||
1074 | // TPC refit condition (done during reconstruction for Offline but not for On-the-fly) | |
1075 | if( !(pTrack->GetStatus() & AliESDtrack::kTPCrefit)) continue; | |
1076 | if( !(nTrack->GetStatus() & AliESDtrack::kTPCrefit)) continue; | |
1077 | ||
1078 | //Get status flags | |
1079 | //fTreeVariablePosTrackStatus = pTrack->GetStatus(); | |
1080 | //fTreeVariableNegTrackStatus = nTrack->GetStatus(); | |
1081 | ||
1082 | if ( ( ( pTrack->GetTPCClusterInfo(2,1) ) < 70 ) || ( ( nTrack->GetTPCClusterInfo(2,1) ) < 70 ) ) continue; | |
1083 | ||
1084 | //GetKinkIndex condition | |
1085 | if( pTrack->GetKinkIndex(0)>0 || nTrack->GetKinkIndex(0)>0 ) continue; | |
1086 | ||
1087 | //Findable clusters > 0 condition | |
1088 | if( pTrack->GetTPCNclsF()<=0 || nTrack->GetTPCNclsF()<=0 ) continue; | |
1089 | ||
1090 | //Compute ratio Crossed Rows / Findable clusters | |
1091 | //Note: above test avoids division by zero! | |
1092 | Float_t lPosTrackCrossedRowsOverFindable = -1; | |
1093 | Float_t lNegTrackCrossedRowsOverFindable = -1; | |
1094 | if ( ((double)(pTrack->GetTPCNclsF()) ) != 0 ) lPosTrackCrossedRowsOverFindable = lPosTrackCrossedRows / ((double)(pTrack->GetTPCNclsF())); | |
1095 | if ( ((double)(nTrack->GetTPCNclsF()) ) != 0 ) lNegTrackCrossedRowsOverFindable = lNegTrackCrossedRows / ((double)(nTrack->GetTPCNclsF())); | |
1096 | ||
1097 | fTreeVariableLeastRatioCrossedRowsOverFindable = lPosTrackCrossedRowsOverFindable; | |
1098 | if( lNegTrackCrossedRowsOverFindable < fTreeVariableLeastRatioCrossedRowsOverFindable ) | |
1099 | fTreeVariableLeastRatioCrossedRowsOverFindable = lNegTrackCrossedRowsOverFindable; | |
1100 | ||
1101 | //Lowest Cut Level for Ratio Crossed Rows / Findable = 0.8, set here | |
1102 | //if ( (fTreeVariableLeastRatioCrossedRowsOverFindable < 0.8)&&(fkTakeAllTracks==kFALSE) ) continue; | |
1103 | ||
1104 | //End track Quality Cuts | |
1105 | //________________________________________________________________________ | |
1106 | ||
1107 | lDcaPosToPrimVertex = TMath::Abs(pTrack->GetD(lPrimaryVtxPosition[0], | |
1108 | lPrimaryVtxPosition[1], | |
1109 | lMagneticField) ); | |
1110 | ||
1111 | lDcaNegToPrimVertex = TMath::Abs(nTrack->GetD(lPrimaryVtxPosition[0], | |
1112 | lPrimaryVtxPosition[1], | |
1113 | lMagneticField) ); | |
1114 | ||
1115 | lOnFlyStatus = v0->GetOnFlyStatus(); | |
1116 | lChi2V0 = v0->GetChi2V0(); | |
1117 | lDcaV0Daughters = v0->GetDcaV0Daughters(); | |
1118 | lDcaV0ToPrimVertex = v0->GetD(lPrimaryVtxPosition[0],lPrimaryVtxPosition[1],lPrimaryVtxPosition[2]); | |
1119 | lV0CosineOfPointingAngle = v0->GetV0CosineOfPointingAngle(lPrimaryVtxPosition[0],lPrimaryVtxPosition[1],lPrimaryVtxPosition[2]); | |
1120 | fTreeVariableV0CosineOfPointingAngle=lV0CosineOfPointingAngle; | |
1121 | ||
1122 | // Getting invariant mass infos directly from ESD | |
1123 | v0->ChangeMassHypothesis(310); | |
1124 | lInvMassK0s = v0->GetEffMass(); | |
1125 | v0->ChangeMassHypothesis(3122); | |
1126 | lInvMassLambda = v0->GetEffMass(); | |
1127 | v0->ChangeMassHypothesis(-3122); | |
1128 | lInvMassAntiLambda = v0->GetEffMass(); | |
1129 | lAlphaV0 = v0->AlphaV0(); | |
1130 | lPtArmV0 = v0->PtArmV0(); | |
1131 | ||
1132 | //fTreeVariableOnFlyStatus = lOnFlyStatus; | |
1133 | //fHistV0OnFlyStatus->Fill(lOnFlyStatus); | |
1134 | ||
1135 | //=============================================== | |
1136 | // Monte Carlo Association starts here | |
1137 | //=============================================== | |
1138 | ||
1139 | //---> Set Everything to "I don't know" before starting | |
1140 | ||
1141 | fTreeVariablePIDPositive = 0; | |
1142 | fTreeVariablePIDNegative = 0; | |
1143 | ||
1144 | //fTreeVariableIndexStatus = 0; | |
1145 | //fTreeVariableIndexStatusMother = 0; | |
1146 | ||
1147 | fTreeVariablePtMother = -1; | |
1148 | fTreeVariablePtMC = -1; | |
1149 | fTreeVariableRapMC = -100; | |
1150 | ||
1151 | fTreeVariablePID = -1; | |
1152 | fTreeVariablePIDMother = -1; | |
1153 | ||
1154 | fTreeVariablePrimaryStatus = 0; | |
1155 | fTreeVariablePrimaryStatusMother = 0; | |
1156 | fTreeVariableV0CreationRadius = -1; | |
1157 | ||
1158 | //fTreeVariableNegPhysicalStatus = 0; | |
1159 | //fTreeVariablePosPhysicalStatus = 0; | |
1160 | ||
1161 | Int_t lblPosV0Dghter = (Int_t) TMath::Abs( pTrack->GetLabel() ); | |
1162 | Int_t lblNegV0Dghter = (Int_t) TMath::Abs( nTrack->GetLabel() ); | |
1163 | ||
1164 | TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter ); | |
1165 | TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter ); | |
1166 | ||
1167 | fTreeVariablePosTransvMomentumMC = mcPosV0Dghter->Pt(); | |
1168 | fTreeVariableNegTransvMomentumMC = mcNegV0Dghter->Pt(); | |
1169 | ||
1170 | Int_t lPIDPositive = mcPosV0Dghter -> GetPdgCode(); | |
1171 | Int_t lPIDNegative = mcNegV0Dghter -> GetPdgCode(); | |
1172 | ||
1173 | fTreeVariablePIDPositive = lPIDPositive; | |
1174 | fTreeVariablePIDNegative = lPIDNegative; | |
1175 | ||
1176 | Int_t lblMotherPosV0Dghter = mcPosV0Dghter->GetFirstMother() ; | |
1177 | Int_t lblMotherNegV0Dghter = mcNegV0Dghter->GetFirstMother(); | |
1178 | ||
1179 | //if( lMCstack->IsPhysicalPrimary (lblNegV0Dghter) ) fTreeVariableNegPhysicalStatus = 1; //Is Primary! | |
1180 | //if( lMCstack->IsSecondaryFromWeakDecay(lblNegV0Dghter) ) fTreeVariableNegPhysicalStatus = 2; //Weak Decay! | |
1181 | //if( lMCstack->IsSecondaryFromMaterial (lblNegV0Dghter) ) fTreeVariableNegPhysicalStatus = 3; //Material Int! | |
1182 | ||
1183 | //if( lMCstack->IsPhysicalPrimary (lblPosV0Dghter) ) fTreeVariablePosPhysicalStatus = 1; //Is Primary! | |
1184 | //if( lMCstack->IsSecondaryFromWeakDecay(lblPosV0Dghter) ) fTreeVariablePosPhysicalStatus = 2; //Weak Decay! | |
1185 | //if( lMCstack->IsSecondaryFromMaterial (lblPosV0Dghter) ) fTreeVariablePosPhysicalStatus = 3; //Material Int! | |
1186 | ||
1187 | if( lblMotherPosV0Dghter == lblMotherNegV0Dghter && lblMotherPosV0Dghter > -1 ){ | |
1188 | //either label is fine, they're equal at this stage | |
1189 | TParticle* pThisV0 = lMCstack->Particle( lblMotherPosV0Dghter ); | |
1190 | //Set tree variables | |
1191 | fTreeVariablePID = pThisV0->GetPdgCode(); //PDG Code | |
1192 | fTreeVariablePtMC = pThisV0->Pt(); //Perfect Pt | |
1193 | ||
1194 | //Only Interested if it's a Lambda, AntiLambda or K0s | |
1195 | //Avoid the Junction Bug! PYTHIA has particles with Px=Py=Pz=E=0 occasionally, | |
1196 | //having particle code 88 (unrecognized by PDG), for documentation purposes. | |
1197 | //Even ROOT's TParticle::Y() is not prepared to deal with that exception! | |
1198 | //Note that TParticle::Pt() is immune (that would just return 0)... | |
1199 | //Though granted that that should be extremely rare in this precise condition... | |
1200 | if( TMath::Abs(fTreeVariablePID) == 3122 || fTreeVariablePID==310 ){ | |
1201 | fTreeVariableRapMC = pThisV0->Y(); //Perfect Y | |
1202 | } | |
1203 | fTreeVariableV0CreationRadius = TMath::Sqrt( | |
1204 | TMath::Power( ( (mcPrimaryVtx.At(0)) - (pThisV0->Vx()) ) , 2) + | |
1205 | TMath::Power( ( (mcPrimaryVtx.At(1)) - (pThisV0->Vy()) ) , 2) + | |
1206 | TMath::Power( ( (mcPrimaryVtx.At(2)) - (pThisV0->Vz()) ) , 2) | |
1207 | ); | |
1208 | //if( lblMotherPosV0Dghter < lNbMCPrimary ) fTreeVariableIndexStatus = 1; //looks primary | |
1209 | //if( lblMotherPosV0Dghter >= lNbMCPrimary ) fTreeVariableIndexStatus = 2; //looks secondary | |
1210 | if( lMCstack->IsPhysicalPrimary (lblMotherPosV0Dghter) ) fTreeVariablePrimaryStatus = 1; //Is Primary! | |
1211 | if( lMCstack->IsSecondaryFromWeakDecay(lblMotherPosV0Dghter) ) fTreeVariablePrimaryStatus = 2; //Weak Decay! | |
1212 | if( lMCstack->IsSecondaryFromMaterial (lblMotherPosV0Dghter) ) fTreeVariablePrimaryStatus = 3; //Material Int! | |
1213 | ||
1214 | //Now we try to acquire the V0 parent particle, if possible | |
1215 | Int_t lblThisV0Parent = pThisV0->GetFirstMother(); | |
1216 | if ( lblThisV0Parent > -1 ){ //if it has a parent, get it and store specs | |
1217 | TParticle* pThisV0Parent = lMCstack->Particle( lblThisV0Parent ); | |
1218 | fTreeVariablePIDMother = pThisV0Parent->GetPdgCode(); //V0 Mother PDG | |
1219 | fTreeVariablePtMother = pThisV0Parent->Pt(); //V0 Mother Pt | |
1220 | //Primary Status for the V0 Mother particle | |
1221 | //if( lblThisV0Parent < lNbMCPrimary ) fTreeVariableIndexStatusMother = 1; //looks primary | |
1222 | //if( lblThisV0Parent >= lNbMCPrimary ) fTreeVariableIndexStatusMother = 2; //looks secondary | |
1223 | if( lMCstack->IsPhysicalPrimary (lblThisV0Parent) ) fTreeVariablePrimaryStatusMother = 1; //Is Primary! | |
1224 | if( lMCstack->IsSecondaryFromWeakDecay(lblThisV0Parent) ) fTreeVariablePrimaryStatusMother = 2; //Weak Decay! | |
1225 | if( lMCstack->IsSecondaryFromMaterial (lblThisV0Parent) ) fTreeVariablePrimaryStatusMother = 3; //Material Int! | |
1226 | } | |
1227 | } | |
1228 | ||
1229 | fTreeVariablePt = v0->Pt(); | |
1230 | fTreeVariableChi2V0 = lChi2V0; | |
1231 | fTreeVariableDcaV0ToPrimVertex = lDcaV0ToPrimVertex; | |
1232 | fTreeVariableDcaV0Daughters = lDcaV0Daughters; | |
1233 | fTreeVariableV0CosineOfPointingAngle = lV0CosineOfPointingAngle; | |
1234 | fTreeVariableV0Radius = lV0Radius; | |
1235 | fTreeVariableDcaPosToPrimVertex = lDcaPosToPrimVertex; | |
1236 | fTreeVariableDcaNegToPrimVertex = lDcaNegToPrimVertex; | |
1237 | fTreeVariableInvMassK0s = lInvMassK0s; | |
1238 | fTreeVariableInvMassLambda = lInvMassLambda; | |
1239 | fTreeVariableInvMassAntiLambda = lInvMassAntiLambda; | |
1240 | fTreeVariableRapK0Short = lRapK0Short; | |
1241 | ||
1242 | fTreeVariableRapLambda = lRapLambda; | |
1243 | fTreeVariableAlphaV0 = lAlphaV0; | |
1244 | fTreeVariablePtArmV0 = lPtArmV0; | |
1245 | ||
1246 | //Official means of acquiring N-sigmas | |
1247 | fTreeVariableNSigmasPosProton = fPIDResponse->NumberOfSigmasTPC( pTrack, AliPID::kProton ); | |
1248 | fTreeVariableNSigmasPosPion = fPIDResponse->NumberOfSigmasTPC( pTrack, AliPID::kPion ); | |
1249 | fTreeVariableNSigmasNegProton = fPIDResponse->NumberOfSigmasTPC( nTrack, AliPID::kProton ); | |
1250 | fTreeVariableNSigmasNegPion = fPIDResponse->NumberOfSigmasTPC( nTrack, AliPID::kPion ); | |
1251 | ||
1252 | //tDecayVertexV0[0],tDecayVertexV0[1],tDecayVertexV0[2] | |
1253 | Double_t lDistanceTravelled = TMath::Sqrt( | |
1254 | TMath::Power( tDecayVertexV0[0] - lBestPrimaryVtxPos[0] , 2) + | |
1255 | TMath::Power( tDecayVertexV0[1] - lBestPrimaryVtxPos[1] , 2) + | |
1256 | TMath::Power( tDecayVertexV0[2] - lBestPrimaryVtxPos[2] , 2) | |
1257 | ); | |
1258 | fTreeVariableDistOverTotMom = 1e+5; | |
1259 | if( lV0TotalMomentum + 1e-10 != 0 ) fTreeVariableDistOverTotMom = lDistanceTravelled / (lV0TotalMomentum + 1e-10); //avoid division by zero, to be sure | |
1260 | ||
1261 | Double_t lMomentumPosTemp[3]; | |
1262 | pTrack->GetPxPyPz(lMomentumPosTemp); | |
1263 | Double_t lPtPosTemporary = sqrt(pow(lMomentumPosTemp[0],2) + pow(lMomentumPosTemp[1],2)); | |
1264 | ||
1265 | Double_t lMomentumNegTemp[3]; | |
1266 | nTrack->GetPxPyPz(lMomentumNegTemp); | |
1267 | Double_t lPtNegTemporary = sqrt(pow(lMomentumNegTemp[0],2) + pow(lMomentumNegTemp[1],2)); | |
1268 | ||
1269 | fTreeVariablePosTransvMomentum = lPtPosTemporary; | |
1270 | fTreeVariableNegTransvMomentum = lPtNegTemporary; | |
1271 | ||
1272 | ||
1273 | //------------------------------------------------ | |
1274 | // Fill Tree! | |
1275 | //------------------------------------------------ | |
1276 | ||
1277 | // The conditionals are meant to decrease excessive | |
1278 | // memory usage! | |
1279 | ||
1280 | //Modified version: Keep only OnFlyStatus == 0 | |
1281 | //Keep only if included in a parametric InvMass Region 20 sigmas away from peak | |
1282 | ||
1283 | //First Selection: Reject OnFly | |
1284 | if(lOnFlyStatus == 0){ | |
1285 | //Second Selection: rough 20-sigma band, parametric. | |
1286 | //K0Short: Enough to parametrize peak broadening with linear function. | |
1287 | Double_t lUpperLimitK0Short = (5.63707e-01) + (1.14979e-02)*fTreeVariablePt; | |
1288 | Double_t lLowerLimitK0Short = (4.30006e-01) - (1.10029e-02)*fTreeVariablePt; | |
1289 | //Lambda: Linear (for higher pt) plus exponential (for low-pt broadening) | |
1290 | //[0]+[1]*x+[2]*TMath::Exp(-[3]*x) | |
1291 | Double_t lUpperLimitLambda = (1.13688e+00) + (5.27838e-03)*fTreeVariablePt + (8.42220e-02)*TMath::Exp(-(3.80595e+00)*fTreeVariablePt); | |
1292 | Double_t lLowerLimitLambda = (1.09501e+00) - (5.23272e-03)*fTreeVariablePt - (7.52690e-02)*TMath::Exp(-(3.46339e+00)*fTreeVariablePt); | |
1293 | //Do Selection | |
1294 | if( (fTreeVariableInvMassLambda < lUpperLimitLambda && fTreeVariableInvMassLambda > lLowerLimitLambda ) || | |
1295 | (fTreeVariableInvMassAntiLambda < lUpperLimitLambda && fTreeVariableInvMassAntiLambda > lLowerLimitLambda ) || | |
1296 | (fTreeVariableInvMassK0s < lUpperLimitK0Short && fTreeVariableInvMassK0s > lLowerLimitK0Short ) ){ | |
1297 | //Pre-selection in case this is AA... | |
1298 | // ... pre-filter with daughter eta selection only (not TPC) | |
1299 | if ( TMath::Abs(fTreeVariableNegEta)<0.8 && TMath::Abs(fTreeVariablePosEta)<0.8 ){ | |
1300 | fTree->Fill(); | |
1301 | } | |
1302 | } | |
1303 | } | |
1304 | ||
1305 | //------------------------------------------------ | |
1306 | // Fill tree over. | |
1307 | //------------------------------------------------ | |
1308 | ||
1309 | ||
1310 | }// This is the end of the V0 loop | |
1311 | ||
1312 | //------------------------------------------------ | |
1313 | ||
1314 | // Post output data. | |
1315 | PostData(1, fListHistV0); | |
1316 | PostData(2, fTree); | |
1317 | PostData(3, fTreeEvents); | |
1318 | } | |
1319 | ||
1320 | //________________________________________________________________________ | |
1321 | void AliAnalysisTaskExtractPerformanceV0pPb::Terminate(Option_t *) | |
1322 | { | |
1323 | // Draw result to the screen | |
1324 | // Called once at the end of the query | |
1325 | ||
1326 | TList *cRetrievedList = 0x0; | |
1327 | cRetrievedList = (TList*)GetOutputData(1); | |
1328 | if(!cRetrievedList){ | |
1329 | Printf("ERROR - AliAnalysisTaskExtractV0 : ouput data container list not available\n"); | |
1330 | return; | |
1331 | } | |
1332 | ||
1333 | fHistCentralityProcessed = dynamic_cast<TH1F*> ( cRetrievedList->FindObject("fHistCentralityProcessed") ); | |
1334 | if (!fHistCentralityProcessed) { | |
1335 | Printf("ERROR - AliAnalysisTaskExtractV0 : fHistCentralityProcessed not available"); | |
1336 | return; | |
1337 | } | |
1338 | ||
1339 | TCanvas *canCheck = new TCanvas("AliAnalysisTaskExtractV0","V0 Multiplicity",10,10,510,510); | |
1340 | canCheck->cd(1)->SetLogy(); | |
1341 | ||
1342 | fHistCentralityProcessed->SetMarkerStyle(22); | |
1343 | fHistCentralityProcessed->DrawCopy("E"); | |
1344 | } | |
1345 | ||
1346 | //---------------------------------------------------------------------------- | |
1347 | ||
1348 | Double_t AliAnalysisTaskExtractPerformanceV0pPb::MyRapidity(Double_t rE, Double_t rPz) const | |
1349 | { | |
1350 | // Local calculation for rapidity | |
1351 | Double_t ReturnValue = -100; | |
1352 | if( (rE-rPz+1.e-13) != 0 && (rE+rPz) != 0 ){ | |
1353 | ReturnValue = 0.5*TMath::Log((rE+rPz)/(rE-rPz+1.e-13)); | |
1354 | } | |
1355 | return ReturnValue; | |
1356 | } |