]>
Commit | Line | Data |
---|---|---|
2bb2434e | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4803eb1f | 4 | * Author: Pedro Gonz??lez, Pedro Ladr??n de Guevara, Ernesto L??pez Torres, * |
0f8c33c1 | 5 | * Eulogio Serradilla, Ana Marin, Friederike Bock * |
6 | * Version 2 * | |
2bb2434e | 7 | * * |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | // Analysis task for pi0->e+e-gamma (Dalitz decay) | |
0f8c33c1 | 18 | // Analysis task for chic->JPsi+gamma |
2bb2434e | 19 | |
20 | #include <vector> | |
21 | ||
22 | #include "TParticle.h" | |
23 | #include "TPDGCode.h" | |
24 | #include "TMCProcess.h" | |
25 | #include "TDatabasePDG.h" | |
26 | #include "TList.h" | |
27 | #include "TChain.h" | |
28 | #include "TDirectory.h" | |
0a2b2b4b | 29 | #include "TTree.h" |
30 | #include "TH1.h" | |
31 | #include "TH1F.h" | |
32 | #include "THnSparse.h" | |
33 | #include "TH2F.h" | |
2bb2434e | 34 | #include "AliStack.h" |
35 | #include "AliAnalysisManager.h" | |
36 | #include "AliESDInputHandler.h" | |
37 | #include "AliESDtrack.h" | |
38 | #include "AliMCEvent.h" | |
39 | #include "AliStack.h" | |
40 | #include "AliMCEventHandler.h" | |
41 | #include "AliPID.h" | |
42 | #include "AliLog.h" | |
43 | #include "AliESDtrackCuts.h" | |
44 | #include "AliESDpidCuts.h" | |
45 | #include "AliMCEvent.h" | |
46 | #include "AliESDv0.h" | |
47 | #include "AliESDEvent.h" | |
48 | #include "AliESDpid.h" | |
49 | #include "AliKFParticle.h" | |
50 | #include "AliMCEventHandler.h" | |
51 | #include "AliKFVertex.h" | |
52 | #include "AliTriggerAnalysis.h" | |
53 | #include "AliCentrality.h" | |
54 | #include "AliMultiplicity.h" | |
55 | #include "AliAnalysisTaskGammaConvDalitzV1.h" | |
0a2b2b4b | 56 | |
2bb2434e | 57 | |
58 | ClassImp( AliAnalysisTaskGammaConvDalitzV1 ) | |
59 | ||
60 | //----------------------------------------------------------------------------------------------- | |
61 | AliAnalysisTaskGammaConvDalitzV1::AliAnalysisTaskGammaConvDalitzV1(): | |
344100c4 | 62 | fV0Reader(NULL), |
63 | fElecSelector(NULL), | |
64 | fBGHandler(NULL), | |
65 | fESDEvent(NULL), | |
66 | fMCEvent(NULL), | |
67 | fMCStack(NULL), | |
68 | fCutFolder(NULL), | |
69 | fESDList(NULL), | |
70 | fBackList(NULL), | |
71 | fMotherList(NULL), | |
72 | fTrueList(NULL), | |
73 | fMCList(NULL), | |
74 | fQAFolder(NULL), | |
75 | fOutputContainer(0), | |
76 | fReaderGammas(NULL), | |
77 | fSelectorElectronIndex(0), | |
78 | fSelectorPositronIndex(0), | |
79 | fGoodGammas(NULL), | |
80 | fGoodVirtualGammas(NULL), | |
81 | fGoodElectrons(NULL), | |
82 | fGoodPositrons(NULL), | |
83 | fCutEventArray(NULL), | |
84 | fCutGammaArray(NULL), | |
85 | fCutElectronArray(NULL), | |
86 | fCutMesonArray(NULL), | |
87 | fGammasPool(NULL), | |
88 | fEventCuts(NULL), | |
89 | fConversionCuts(NULL), | |
90 | hESDConvGammaPt(NULL), | |
91 | hESDConvGammaEta(NULL), | |
92 | hESDConvGammaZR(NULL), | |
93 | hESDDalitzElectronPt(NULL), | |
94 | hESDDalitzPositronPt(NULL), | |
95 | hESDDalitzElectronPhi(NULL), | |
96 | hESDDalitzPositronPhi(NULL), | |
97 | hESDDalitzElectronAfterPt(NULL), | |
98 | hESDDalitzPositronAfterPt(NULL), | |
99 | hESDDalitzElectronAfterEta(NULL), | |
100 | hESDDalitzElectronAfterEtaPCut(NULL), | |
101 | hESDDalitzPositronAfterEta(NULL), | |
102 | hESDDalitzPositronAfterEtaPCut(NULL), | |
103 | hESDDalitzElectronAfterPhi(NULL), | |
104 | hESDDalitzPositronAfterPhi(NULL), | |
105 | hESDDalitzElectronAfterNClsITS(NULL), | |
106 | hESDDalitzPositronAfterNClsITS(NULL), | |
107 | hESDDalitzElectronAfterNFindClsTPC(NULL), | |
108 | hESDDalitzPositronAfterNFindClsTPC(NULL), | |
109 | hESDDalitzElectronAfterNClsTPC(NULL), | |
110 | hESDDalitzPositronAfterNClsTPC(NULL), | |
111 | hESDDalitzElectronAfterNCrossedRowsTPC(NULL), | |
112 | hESDDalitzPositronAfterNCrossedRowsTPC(NULL), | |
113 | hESDDalitzPosEleAfterDCAxy(NULL), | |
114 | hESDDalitzPosEleAfterDCAz(NULL), | |
115 | hESDDalitzElectronAfterTPCdEdxVsP(NULL), | |
116 | hESDDalitzPositronAfterTPCdEdxVsP(NULL), | |
117 | hESDDalitzElectronAfterTPCdEdxSignalVsP(NULL), | |
118 | hESDDalitzPositronAfterTPCdEdxSignalVsP(NULL), | |
119 | hESDDalitzElectronAfterTPCdEdxVsEta(NULL), | |
120 | hESDDalitzPositronAfterTPCdEdxVsEta(NULL), | |
121 | hESDDalitzElectronAfterTPCdEdxVsPhi(NULL), | |
122 | hESDDalitzPositronAfterTPCdEdxVsPhi(NULL), | |
123 | hESDMotherPhi(NULL), | |
124 | hESDEposEnegPsiPairDPhi(NULL), | |
125 | hESDEposEnegInvMassPt(NULL), | |
126 | hESDEposEnegAfterMassCutInvMassPi0Pt(NULL), | |
127 | hESDEposEnegInvMassPi0Pt(NULL), | |
128 | hESDEposEnegLikeSignBackInvMassPt(NULL), | |
129 | hESDMotherInvMassPt(NULL), | |
130 | hESDPi0MotherInvMassPt(NULL), | |
131 | hESDPi0MotherDiffInvMassPt(NULL), | |
132 | hESDPi0MotherDiffLimInvMassPt(NULL), | |
133 | sESDMotherInvMassPtZM(NULL), | |
134 | hESDMotherBackInvMassPt(NULL), | |
135 | sESDMotherBackInvMassPtZM(NULL), | |
136 | hMCAllGammaPt(NULL), | |
137 | hMCConvGammaPt(NULL), | |
138 | hMCConvGammaRSPt(NULL), | |
139 | hMCAllPositronsPt(NULL), | |
140 | hMCAllElectronsPt(NULL), | |
141 | hMCConvGammaEta(NULL), | |
142 | hMCAllPositronsEta(NULL), | |
143 | hMCAllElectronsEta(NULL), | |
144 | hMCPi0DalitzGammaPt(NULL), | |
145 | hMCPi0DalitzElectronPt(NULL), | |
146 | hMCPi0DalitzPositronPt(NULL), | |
147 | hMCPi0Pt(NULL), | |
148 | hMCPi0GGPt(NULL), | |
149 | hMCEtaPt(NULL), | |
150 | hMCEtaGGPt(NULL), | |
151 | hMCPi0InAccPt(NULL), | |
152 | hMCEtaInAccPt(NULL), | |
153 | hMCChiCPt(NULL), | |
154 | hMCChiCInAccPt(NULL), | |
155 | hMCPi0EposEnegInvMassPt(NULL), | |
156 | hMCEtaEposEnegInvMassPt(NULL), | |
157 | hESDEposEnegTruePi0DalitzInvMassPt(NULL), | |
158 | hESDEposEnegTruePrimPi0DalitzInvMass(NULL), | |
159 | hESDEposEnegTruePi0DalitzPsiPairDPhi(NULL), | |
160 | hESDEposEnegTrueEtaDalitzInvMassPt(NULL), | |
161 | hESDEposEnegTruePrimEtaDalitzInvMass(NULL), | |
162 | hESDEposEnegTrueEtaDalitzPsiPairDPhi(NULL), | |
163 | hESDEposEnegTruePhotonInvMassPt(NULL), | |
164 | hESDEposEnegTrueInvMassPt(NULL), | |
165 | hESDEposEnegTruePhotonPsiPairDPhi(NULL), | |
166 | hESDEposEnegTruePhotonPsiPairDPhiPtCut(NULL), | |
167 | hESDEposEnegTrueJPsiInvMassPt(NULL), | |
168 | hESDTrueMotherChiCInvMassPt(NULL), | |
169 | hESDTrueMotherChiCDiffInvMassPt(NULL), | |
170 | hESDTrueMotherInvMassPt(NULL), | |
171 | hESDTrueMotherDalitzInvMassPt(NULL), | |
172 | hESDTrueMotherPi0GGInvMassPt(NULL), | |
173 | hESDTruePrimaryMotherPi0GGInvMassPt(NULL), | |
174 | hESDTrueSecondaryMotherPi0GGInvMassPt(NULL), | |
175 | hESDTruePrimaryMotherInvMassMCPt(NULL), | |
176 | hESDTruePrimaryMotherInvMassPt(NULL), | |
177 | hESDTruePrimaryMotherW0WeightingInvMassPt(NULL), | |
178 | hESDTruePrimaryPi0DalitzESDPtMCPt(NULL), | |
179 | hESDTrueSecondaryMotherInvMassPt(NULL), | |
180 | hESDTrueSecondaryMotherFromK0sInvMassPt(NULL), | |
181 | hESDTrueBckGGInvMassPt(NULL), | |
182 | hESDTrueBckContInvMassPt(NULL), | |
183 | hESDTrueMotherGGInvMassPt(NULL), | |
184 | hESDTrueConvGammaPt(NULL), | |
185 | hESDTruePositronPt(NULL), | |
186 | hESDTrueElectronPt(NULL), | |
187 | hESDTrueSecConvGammaPt(NULL), | |
188 | hESDTrueSecPositronPt(NULL), | |
189 | hESDTrueSecElectronPt(NULL), | |
190 | hESDTruePi0DalitzConvGammaPt(NULL), | |
191 | hESDTruePi0DalitzPositronPt(NULL), | |
192 | hESDTruePi0DalitzElectronPt(NULL), | |
193 | hESDTruePi0DalitzSecConvGammaPt(NULL), | |
194 | hESDTruePi0DalitzSecPositronPt(NULL), | |
195 | hESDTruePi0DalitzSecElectronPt(NULL), | |
196 | hNEvents(NULL), | |
197 | hNGoodESDTracks(NULL), | |
198 | hNGoodESDTracksVsNGoodGammas(NULL), | |
199 | hNGoodESDTracksVsNGoodVGammas(NULL), | |
200 | hNV0Tracks(NULL), | |
201 | hEtaShift(NULL), | |
202 | fRandom(0), | |
203 | fUnsmearedPx(NULL), | |
204 | fUnsmearedPy(NULL), | |
205 | fUnsmearedPz(NULL), | |
206 | fUnsmearedE(NULL), | |
207 | fUnsmearedVPx(NULL), | |
208 | fUnsmearedVPy(NULL), | |
209 | fUnsmearedVPz(NULL), | |
210 | fUnsmearedVE(NULL), | |
211 | fnCuts(0), | |
212 | fiCut(0), | |
213 | fNumberOfESDTracks(0), | |
214 | fNumberOfESDTrackskBoth(0), | |
215 | fNVirtualGammas(0), | |
216 | fMoveParticleAccordingToVertex(kFALSE), | |
217 | fIsHeavyIon(kFALSE), | |
218 | fDoMesonAnalysis(kTRUE), | |
219 | fDoChicAnalysis(kFALSE), | |
220 | fDoMesonQA(kFALSE), | |
221 | fSetProductionVertextoVGamma(kTRUE), | |
222 | fIsFromMBHeader(kTRUE), | |
223 | fIsMC(kFALSE) | |
2bb2434e | 224 | { |
a280ac15 | 225 | |
2bb2434e | 226 | } |
227 | ||
228 | //----------------------------------------------------------------------------------------------- | |
229 | AliAnalysisTaskGammaConvDalitzV1::AliAnalysisTaskGammaConvDalitzV1( const char* name ): | |
344100c4 | 230 | AliAnalysisTaskSE(name), |
231 | fV0Reader(NULL), | |
232 | fElecSelector(NULL), | |
233 | fBGHandler(NULL), | |
234 | fESDEvent(NULL), | |
235 | fMCEvent(NULL), | |
236 | fMCStack(NULL), | |
237 | fCutFolder(NULL), | |
238 | fESDList(NULL), | |
239 | fBackList(NULL), | |
240 | fMotherList(NULL), | |
241 | fTrueList(NULL), | |
242 | fMCList(NULL), | |
243 | fQAFolder(NULL), | |
244 | fOutputContainer(0), | |
245 | fReaderGammas(NULL), | |
246 | fSelectorElectronIndex(0), | |
247 | fSelectorPositronIndex(0), | |
248 | fGoodGammas(NULL), | |
249 | fGoodVirtualGammas(NULL), | |
250 | fGoodElectrons(NULL), | |
251 | fGoodPositrons(NULL), | |
252 | fCutEventArray(NULL), | |
253 | fCutGammaArray(NULL), | |
254 | fCutElectronArray(NULL), | |
255 | fCutMesonArray(NULL), | |
256 | fGammasPool(NULL), | |
257 | fEventCuts(NULL), | |
258 | fConversionCuts(NULL), | |
259 | hESDConvGammaPt(NULL), | |
260 | hESDConvGammaEta(NULL), | |
261 | hESDConvGammaZR(NULL), | |
262 | hESDDalitzElectronPt(NULL), | |
263 | hESDDalitzPositronPt(NULL), | |
264 | hESDDalitzElectronPhi(NULL), | |
265 | hESDDalitzPositronPhi(NULL), | |
266 | hESDDalitzElectronAfterPt(NULL), | |
267 | hESDDalitzPositronAfterPt(NULL), | |
268 | hESDDalitzElectronAfterEta(NULL), | |
269 | hESDDalitzElectronAfterEtaPCut(NULL), | |
270 | hESDDalitzPositronAfterEta(NULL), | |
271 | hESDDalitzPositronAfterEtaPCut(NULL), | |
272 | hESDDalitzElectronAfterPhi(NULL), | |
273 | hESDDalitzPositronAfterPhi(NULL), | |
274 | hESDDalitzElectronAfterNClsITS(NULL), | |
275 | hESDDalitzPositronAfterNClsITS(NULL), | |
276 | hESDDalitzElectronAfterNFindClsTPC(NULL), | |
277 | hESDDalitzPositronAfterNFindClsTPC(NULL), | |
278 | hESDDalitzElectronAfterNClsTPC(NULL), | |
279 | hESDDalitzPositronAfterNClsTPC(NULL), | |
280 | hESDDalitzElectronAfterNCrossedRowsTPC(NULL), | |
281 | hESDDalitzPositronAfterNCrossedRowsTPC(NULL), | |
282 | hESDDalitzPosEleAfterDCAxy(NULL), | |
283 | hESDDalitzPosEleAfterDCAz(NULL), | |
284 | hESDDalitzElectronAfterTPCdEdxVsP(NULL), | |
285 | hESDDalitzPositronAfterTPCdEdxVsP(NULL), | |
286 | hESDDalitzElectronAfterTPCdEdxSignalVsP(NULL), | |
287 | hESDDalitzPositronAfterTPCdEdxSignalVsP(NULL), | |
288 | hESDDalitzElectronAfterTPCdEdxVsEta(NULL), | |
289 | hESDDalitzPositronAfterTPCdEdxVsEta(NULL), | |
290 | hESDDalitzElectronAfterTPCdEdxVsPhi(NULL), | |
291 | hESDDalitzPositronAfterTPCdEdxVsPhi(NULL), | |
292 | hESDMotherPhi(NULL), | |
293 | hESDEposEnegPsiPairDPhi(NULL), | |
294 | hESDEposEnegInvMassPt(NULL), | |
295 | hESDEposEnegAfterMassCutInvMassPi0Pt(NULL), | |
296 | hESDEposEnegInvMassPi0Pt(NULL), | |
297 | hESDEposEnegLikeSignBackInvMassPt(NULL), | |
298 | hESDMotherInvMassPt(NULL), | |
299 | hESDPi0MotherInvMassPt(NULL), | |
300 | hESDPi0MotherDiffInvMassPt(NULL), | |
301 | hESDPi0MotherDiffLimInvMassPt(NULL), | |
302 | sESDMotherInvMassPtZM(NULL), | |
303 | hESDMotherBackInvMassPt(NULL), | |
304 | sESDMotherBackInvMassPtZM(NULL), | |
305 | hMCAllGammaPt(NULL), | |
306 | hMCConvGammaPt(NULL), | |
307 | hMCConvGammaRSPt(NULL), | |
308 | hMCAllPositronsPt(NULL), | |
309 | hMCAllElectronsPt(NULL), | |
310 | hMCConvGammaEta(NULL), | |
311 | hMCAllPositronsEta(NULL), | |
312 | hMCAllElectronsEta(NULL), | |
313 | hMCPi0DalitzGammaPt(NULL), | |
314 | hMCPi0DalitzElectronPt(NULL), | |
315 | hMCPi0DalitzPositronPt(NULL), | |
316 | hMCPi0Pt(NULL), | |
317 | hMCPi0GGPt(NULL), | |
318 | hMCEtaPt(NULL), | |
319 | hMCEtaGGPt(NULL), | |
320 | hMCPi0InAccPt(NULL), | |
321 | hMCEtaInAccPt(NULL), | |
322 | hMCChiCPt(NULL), | |
323 | hMCChiCInAccPt(NULL), | |
324 | hMCPi0EposEnegInvMassPt(NULL), | |
325 | hMCEtaEposEnegInvMassPt(NULL), | |
326 | hESDEposEnegTruePi0DalitzInvMassPt(NULL), | |
327 | hESDEposEnegTruePrimPi0DalitzInvMass(NULL), | |
328 | hESDEposEnegTruePi0DalitzPsiPairDPhi(NULL), | |
329 | hESDEposEnegTrueEtaDalitzInvMassPt(NULL), | |
330 | hESDEposEnegTruePrimEtaDalitzInvMass(NULL), | |
331 | hESDEposEnegTrueEtaDalitzPsiPairDPhi(NULL), | |
332 | hESDEposEnegTruePhotonInvMassPt(NULL), | |
333 | hESDEposEnegTrueInvMassPt(NULL), | |
334 | hESDEposEnegTruePhotonPsiPairDPhi(NULL), | |
335 | hESDEposEnegTruePhotonPsiPairDPhiPtCut(NULL), | |
336 | hESDEposEnegTrueJPsiInvMassPt(NULL), | |
337 | hESDTrueMotherChiCInvMassPt(NULL), | |
338 | hESDTrueMotherChiCDiffInvMassPt(NULL), | |
339 | hESDTrueMotherInvMassPt(NULL), | |
340 | hESDTrueMotherDalitzInvMassPt(NULL), | |
341 | hESDTrueMotherPi0GGInvMassPt(NULL), | |
342 | hESDTruePrimaryMotherPi0GGInvMassPt(NULL), | |
343 | hESDTrueSecondaryMotherPi0GGInvMassPt(NULL), | |
344 | hESDTruePrimaryMotherInvMassMCPt(NULL), | |
345 | hESDTruePrimaryMotherInvMassPt(NULL), | |
346 | hESDTruePrimaryMotherW0WeightingInvMassPt(NULL), | |
347 | hESDTruePrimaryPi0DalitzESDPtMCPt(NULL), | |
348 | hESDTrueSecondaryMotherInvMassPt(NULL), | |
349 | hESDTrueSecondaryMotherFromK0sInvMassPt(NULL), | |
350 | hESDTrueBckGGInvMassPt(NULL), | |
351 | hESDTrueBckContInvMassPt(NULL), | |
352 | hESDTrueMotherGGInvMassPt(NULL), | |
353 | hESDTrueConvGammaPt(NULL), | |
354 | hESDTruePositronPt(NULL), | |
355 | hESDTrueElectronPt(NULL), | |
356 | hESDTrueSecConvGammaPt(NULL), | |
357 | hESDTrueSecPositronPt(NULL), | |
358 | hESDTrueSecElectronPt(NULL), | |
359 | hESDTruePi0DalitzConvGammaPt(NULL), | |
360 | hESDTruePi0DalitzPositronPt(NULL), | |
361 | hESDTruePi0DalitzElectronPt(NULL), | |
362 | hESDTruePi0DalitzSecConvGammaPt(NULL), | |
363 | hESDTruePi0DalitzSecPositronPt(NULL), | |
364 | hESDTruePi0DalitzSecElectronPt(NULL), | |
365 | hNEvents(NULL), | |
366 | hNGoodESDTracks(NULL), | |
367 | hNGoodESDTracksVsNGoodGammas(NULL), | |
368 | hNGoodESDTracksVsNGoodVGammas(NULL), | |
369 | hNV0Tracks(NULL), | |
370 | hEtaShift(NULL), | |
371 | fRandom(0), | |
372 | fUnsmearedPx(NULL), | |
373 | fUnsmearedPy(NULL), | |
374 | fUnsmearedPz(NULL), | |
375 | fUnsmearedE(NULL), | |
376 | fUnsmearedVPx(NULL), | |
377 | fUnsmearedVPy(NULL), | |
378 | fUnsmearedVPz(NULL), | |
379 | fUnsmearedVE(NULL), | |
380 | fnCuts(0), | |
381 | fiCut(0), | |
382 | fNumberOfESDTracks(0), | |
383 | fNumberOfESDTrackskBoth(0), | |
384 | fNVirtualGammas(0), | |
385 | fMoveParticleAccordingToVertex(kFALSE), | |
386 | fIsHeavyIon(kFALSE), | |
387 | fDoMesonAnalysis(kTRUE), | |
388 | fDoChicAnalysis(kFALSE), | |
389 | fDoMesonQA(kFALSE), | |
390 | fSetProductionVertextoVGamma(kTRUE), | |
391 | fIsFromMBHeader(kTRUE), | |
392 | fIsMC(kFALSE) | |
2bb2434e | 393 | { |
344100c4 | 394 | DefineOutput(1, TList::Class()); |
2bb2434e | 395 | } |
396 | ||
397 | //----------------------------------------------------------------------------------------------- | |
398 | AliAnalysisTaskGammaConvDalitzV1::~AliAnalysisTaskGammaConvDalitzV1() | |
399 | { | |
344100c4 | 400 | // |
401 | // virtual destructor | |
402 | // | |
403 | ||
404 | cout<<"Destructor"<<endl; | |
405 | ||
406 | if(fGoodGammas){ | |
407 | delete fGoodGammas; | |
408 | fGoodGammas = 0x0; | |
409 | } | |
410 | if(fGoodVirtualGammas){ | |
411 | delete fGoodVirtualGammas; | |
412 | fGoodVirtualGammas = 0x0; | |
413 | } | |
414 | if(fGoodElectrons){ | |
415 | delete fGoodElectrons; | |
416 | fGoodElectrons = 0x0; | |
417 | } | |
418 | if(fGoodPositrons){ | |
419 | delete fGoodPositrons; | |
420 | fGoodPositrons = 0x0; | |
421 | } | |
422 | if(fBGHandler){ | |
423 | delete[] fBGHandler; | |
424 | fBGHandler = 0x0; | |
425 | } | |
426 | if( fGammasPool ){ | |
427 | delete[] fGammasPool; | |
428 | fGammasPool = 0x0; | |
429 | } | |
2bb2434e | 430 | } |
344100c4 | 431 | |
2bb2434e | 432 | //___________________________________________________________ |
433 | void AliAnalysisTaskGammaConvDalitzV1::InitBack(){ | |
434 | ||
344100c4 | 435 | const Int_t nDim = 4; |
436 | Int_t nBins[nDim] = {800,250,7,4}; | |
437 | Double_t xMin[nDim] = {0,0, 0,0}; | |
438 | Double_t xMax[nDim] = {0.8,25,7,4}; | |
439 | ||
440 | sESDMotherInvMassPtZM = new THnSparseF*[fnCuts]; | |
441 | sESDMotherBackInvMassPtZM = new THnSparseF*[fnCuts]; | |
2bb2434e | 442 | |
344100c4 | 443 | fBGHandler = new AliGammaConversionAODBGHandler*[fnCuts]; |
444 | ||
445 | for(Int_t iCut = 0; iCut<fnCuts;iCut++){ | |
446 | ||
447 | TString cutstringEvent = ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber(); | |
448 | TString cutstringElectron = ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetCutNumber(); | |
449 | TString cutstringMeson = ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->GetCutNumber(); | |
450 | TString cutstringGamma = ((AliConversionPhotonCuts*)fCutGammaArray->At(iCut))->GetCutNumber(); | |
451 | ||
452 | Int_t collisionSystem = atoi((TString)(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber())(0,1)); | |
453 | Int_t centMin = atoi((TString)(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber())(1,1)); | |
454 | Int_t centMax = atoi((TString)(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber())(2,1)); | |
455 | ||
456 | if(collisionSystem == 1 || collisionSystem == 2 || | |
457 | collisionSystem == 5 || collisionSystem == 8 || | |
458 | collisionSystem == 9){ | |
459 | centMin = centMin*10; | |
460 | centMax = centMax*10; | |
461 | } | |
462 | else if(collisionSystem == 3 || collisionSystem == 6){ | |
463 | centMin = centMin*5; | |
464 | centMax = centMax*5; | |
465 | } | |
466 | else if(collisionSystem == 4 || collisionSystem == 7){ | |
467 | centMin = ((centMin*5)+45); | |
468 | centMax = ((centMax*5)+45); | |
469 | } | |
470 | ||
471 | ||
472 | fBackList[iCut] = new TList(); | |
473 | fBackList[iCut]->SetName(Form("%s_%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
474 | fBackList[iCut]->SetOwner(kTRUE); | |
475 | fCutFolder[iCut]->Add(fBackList[iCut]); | |
476 | ||
477 | sESDMotherBackInvMassPtZM[iCut] = new THnSparseF("Back_Back_InvMass_Pt_z_m","Back_Back_InvMass_Pt_z_m",nDim,nBins,xMin,xMax); | |
478 | fBackList[iCut]->Add(sESDMotherBackInvMassPtZM[iCut]); | |
479 | ||
480 | fMotherList[iCut] = new TList(); | |
481 | fMotherList[iCut]->SetName(Form("%s_%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
482 | fMotherList[iCut]->SetOwner(kTRUE); | |
483 | fCutFolder[iCut]->Add(fMotherList[iCut]); | |
484 | ||
485 | sESDMotherInvMassPtZM[iCut] = new THnSparseF("Back_Mother_InvMass_Pt_z_m","Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax); | |
486 | fMotherList[iCut]->Add(sESDMotherInvMassPtZM[iCut]); | |
487 | ||
488 | ||
489 | fBGHandler[iCut] = new AliGammaConversionAODBGHandler( | |
490 | collisionSystem,centMin,centMax, | |
491 | ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->NumberOfRotationEvents(), | |
492 | ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->UseTrackMultiplicity()); | |
493 | ||
494 | if( ( (AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetBKGMethod() == 3 ){ | |
495 | fGammasPool[iCut] = new TList(); | |
496 | } | |
497 | ||
498 | } | |
2bb2434e | 499 | } |
500 | ||
501 | //______________________________________________________________________ | |
502 | void AliAnalysisTaskGammaConvDalitzV1::UserCreateOutputObjects() | |
503 | { | |
344100c4 | 504 | // |
505 | // Create ouput objects | |
506 | // | |
507 | ||
508 | // Create the output container | |
509 | if(fOutputContainer != NULL){ | |
510 | delete fOutputContainer; | |
511 | fOutputContainer = NULL; | |
512 | } | |
513 | if(fOutputContainer == NULL){ | |
514 | fOutputContainer = new TList(); | |
515 | fOutputContainer->SetOwner(kTRUE); | |
516 | } | |
517 | ||
518 | fGoodGammas = new TList(); | |
519 | //fGoodGammas->SetOwner(kTRUE); | |
520 | ||
521 | fGoodVirtualGammas = new TList(); | |
522 | fGoodVirtualGammas->SetOwner(kTRUE); | |
523 | ||
524 | fGammasPool = new TList*[fnCuts]; | |
525 | fCutFolder = new TList*[fnCuts]; | |
526 | fESDList = new TList*[fnCuts]; | |
527 | fBackList = new TList*[fnCuts]; | |
528 | fMotherList = new TList*[fnCuts]; | |
529 | hNEvents = new TH1I*[fnCuts]; | |
530 | hNGoodESDTracks = new TH1I*[fnCuts]; | |
531 | hNV0Tracks = new TH1I*[fnCuts]; | |
532 | hEtaShift = new TProfile*[fnCuts]; | |
533 | hESDConvGammaPt = new TH1F*[fnCuts]; | |
534 | hESDConvGammaEta = new TH1F*[fnCuts]; | |
fcc79cf5 | 535 | |
344100c4 | 536 | hESDDalitzElectronPt = new TH1F*[fnCuts]; |
537 | hESDDalitzPositronPt = new TH1F*[fnCuts]; | |
538 | hESDDalitzElectronPhi = new TH1F*[fnCuts]; | |
539 | hESDDalitzPositronPhi = new TH1F*[fnCuts]; | |
540 | ||
541 | if( fDoMesonQA ) { | |
542 | fQAFolder = new TList*[fnCuts]; | |
543 | hNGoodESDTracksVsNGoodGammas = new TH2F*[fnCuts]; | |
544 | hNGoodESDTracksVsNGoodVGammas = new TH2F*[fnCuts]; | |
545 | hESDDalitzElectronAfterPt = new TH1F*[fnCuts]; | |
546 | hESDDalitzPositronAfterPt = new TH1F*[fnCuts]; | |
547 | hESDDalitzElectronAfterEta = new TH1F*[fnCuts]; | |
548 | hESDDalitzElectronAfterEtaPCut = new TH1F*[fnCuts]; | |
549 | hESDDalitzPositronAfterEta = new TH1F*[fnCuts]; | |
550 | hESDDalitzPositronAfterEtaPCut = new TH1F*[fnCuts]; | |
551 | hESDDalitzElectronAfterPhi = new TH1F*[fnCuts]; | |
552 | hESDDalitzPositronAfterPhi = new TH1F*[fnCuts]; | |
553 | hESDDalitzElectronAfterNClsITS = new TH1F*[fnCuts]; | |
554 | hESDDalitzPositronAfterNClsITS = new TH1F*[fnCuts]; | |
555 | hESDDalitzElectronAfterNFindClsTPC = new TH2F*[fnCuts]; | |
556 | hESDDalitzPositronAfterNFindClsTPC = new TH2F*[fnCuts]; | |
557 | hESDDalitzElectronAfterNClsTPC = new TH2F*[fnCuts]; | |
558 | hESDDalitzPositronAfterNClsTPC = new TH2F*[fnCuts]; | |
559 | hESDDalitzElectronAfterNCrossedRowsTPC = new TH2F*[fnCuts]; | |
560 | hESDDalitzPositronAfterNCrossedRowsTPC = new TH2F*[fnCuts]; | |
561 | hESDDalitzPosEleAfterDCAxy = new TH2F*[fnCuts]; | |
562 | hESDDalitzPosEleAfterDCAz = new TH2F*[fnCuts]; | |
563 | hESDDalitzElectronAfterTPCdEdxVsP = new TH2F*[fnCuts]; | |
564 | hESDDalitzPositronAfterTPCdEdxVsP = new TH2F*[fnCuts]; | |
565 | hESDDalitzElectronAfterTPCdEdxSignalVsP = new TH2F*[fnCuts]; | |
566 | hESDDalitzPositronAfterTPCdEdxSignalVsP = new TH2F*[fnCuts]; | |
567 | hESDDalitzElectronAfterTPCdEdxVsEta = new TH2F*[fnCuts]; | |
568 | hESDDalitzPositronAfterTPCdEdxVsEta = new TH2F*[fnCuts]; | |
569 | hESDDalitzElectronAfterTPCdEdxVsPhi = new TH2F*[fnCuts]; | |
570 | hESDDalitzPositronAfterTPCdEdxVsPhi = new TH2F*[fnCuts]; | |
571 | hESDMotherPhi = new TH1F*[fnCuts]; | |
572 | hESDEposEnegPsiPairDPhi = new TH2F*[fnCuts]; | |
573 | hESDEposEnegInvMassPt = new TH2F*[fnCuts]; | |
574 | hESDEposEnegAfterMassCutInvMassPi0Pt = new TH2F*[fnCuts]; | |
575 | hESDEposEnegInvMassPi0Pt = new TH2F*[fnCuts]; | |
576 | hESDEposEnegLikeSignBackInvMassPt = new TH2F*[fnCuts]; | |
577 | hESDConvGammaZR = new TH2F*[fnCuts]; | |
578 | } | |
579 | ||
580 | ||
581 | ||
582 | hESDMotherInvMassPt = new TH2F*[fnCuts]; | |
583 | if(fDoChicAnalysis) { | |
584 | hESDPi0MotherInvMassPt = new TH2F*[fnCuts]; | |
585 | hESDPi0MotherDiffInvMassPt = new TH2F*[fnCuts]; | |
586 | hESDPi0MotherDiffLimInvMassPt = new TH2F*[fnCuts]; | |
587 | } | |
588 | hESDMotherBackInvMassPt = new TH2F*[fnCuts]; | |
589 | ||
590 | ||
591 | for(Int_t iCut = 0; iCut<fnCuts;iCut++){ | |
592 | ||
593 | TString cutstringEvent = ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber(); | |
594 | TString cutstringElectron = ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetCutNumber(); | |
595 | TString cutstringMeson = ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->GetCutNumber(); | |
596 | TString cutstringGamma = ((AliConversionPhotonCuts*)fCutGammaArray->At(iCut))->GetCutNumber(); | |
597 | ||
598 | fCutFolder[iCut] = new TList(); | |
599 | fCutFolder[iCut]->SetName(Form("Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
600 | fCutFolder[iCut]->SetOwner(kTRUE); | |
601 | fOutputContainer->Add(fCutFolder[iCut]); | |
602 | ||
603 | fESDList[iCut] = new TList(); | |
604 | fESDList[iCut]->SetName(Form("%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
605 | fESDList[iCut]->SetOwner(kTRUE); | |
606 | ||
607 | hNEvents[iCut] = new TH1I("NEvents","NEvents",9,-0.5,8.5); | |
608 | hNEvents[iCut]->GetXaxis()->SetBinLabel(1,"Accepted"); | |
609 | hNEvents[iCut]->GetXaxis()->SetBinLabel(2,"Centrality"); | |
610 | hNEvents[iCut]->GetXaxis()->SetBinLabel(3,"Missing MC"); | |
611 | hNEvents[iCut]->GetXaxis()->SetBinLabel(4,"Trigger"); | |
612 | hNEvents[iCut]->GetXaxis()->SetBinLabel(5,"Vertex Z"); | |
613 | hNEvents[iCut]->GetXaxis()->SetBinLabel(6,"Cont. Vertex"); | |
614 | hNEvents[iCut]->GetXaxis()->SetBinLabel(7,"Pile-Up"); | |
615 | hNEvents[iCut]->GetXaxis()->SetBinLabel(8,"no SDD"); | |
616 | hNEvents[iCut]->GetXaxis()->SetBinLabel(9,"no V0AND"); | |
617 | fESDList[iCut]->Add(hNEvents[iCut]); | |
618 | ||
619 | if(fIsHeavyIon) hNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",3000,0,3000); | |
620 | else hNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",200,0,200); | |
621 | fESDList[iCut]->Add(hNGoodESDTracks[iCut]); | |
622 | ||
623 | ||
624 | if(fIsHeavyIon == 1) hNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",30000,0,30000); | |
625 | else if(fIsHeavyIon == 2) hNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",2500,0,2500); | |
626 | else hNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",1500,0,1500); | |
627 | fESDList[iCut]->Add(hNV0Tracks[iCut]); | |
628 | ||
629 | hEtaShift[iCut] = new TProfile("Eta Shift","Eta Shift",1, -0.5,0.5); | |
630 | fESDList[iCut]->Add(hEtaShift[iCut]); | |
631 | ||
632 | hESDConvGammaPt[iCut] = new TH1F("ESD_ConvGamma_Pt","ESD_ConvGamma_Pt",250,0,25); | |
633 | fESDList[iCut]->Add(hESDConvGammaPt[iCut]); | |
634 | ||
635 | hESDConvGammaEta[iCut] = new TH1F("ESD_ConvGamma_Eta","ESD_ConvGamma_Eta",600,-1.5,1.5); | |
636 | fESDList[iCut]->Add(hESDConvGammaEta[iCut]); | |
637 | ||
638 | hESDDalitzElectronPt[iCut] = new TH1F("ESD_DalitzElectron_Pt","ESD_DalitzElectron_Pt",1000,0,25); | |
639 | fESDList[iCut]->Add(hESDDalitzElectronPt[iCut]); | |
640 | ||
641 | hESDDalitzPositronPt[iCut] = new TH1F("ESD_DalitzPositron_Pt","ESD_DalitzPositron_Pt",1000,0,25); | |
642 | fESDList[iCut]->Add(hESDDalitzPositronPt[iCut]); | |
d9d6352b | 643 | |
344100c4 | 644 | |
645 | hESDDalitzElectronPhi[iCut] = new TH1F("ESD_DalitzElectron_Phi","ESD_DalitzElectron_Phi",360,0,2*TMath::Pi()); | |
646 | fESDList[iCut]->Add(hESDDalitzElectronPhi[iCut]); | |
647 | ||
648 | hESDDalitzPositronPhi[iCut] = new TH1F("ESD_DalitzPositron_Phi","ESD_DalitzPositron_Phi",360,0,2*TMath::Pi()); | |
649 | fESDList[iCut]->Add(hESDDalitzPositronPhi[iCut]); | |
650 | ||
651 | ||
652 | ||
653 | if ( fDoMesonQA ) { | |
654 | ||
655 | fQAFolder[iCut] = new TList(); | |
656 | fQAFolder[iCut]->SetName(Form("%s_%s_%s_%s QA histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
657 | fQAFolder[iCut]->SetOwner(kTRUE); | |
658 | ||
659 | const Int_t kPtBins=110; | |
660 | Double_t binsPtDummy[kPtBins+1]; | |
661 | const Int_t kPBins = 109; | |
662 | Double_t binsPDummy[kPBins+1]; | |
663 | binsPtDummy[0]=0.0; | |
664 | binsPDummy[0]=0.05; | |
665 | ||
666 | for(Int_t i=1;i<kPtBins+1;i++){ | |
667 | if(binsPtDummy[i-1]+0.05<1.01) | |
668 | binsPtDummy[i]=binsPtDummy[i-1]+0.05; | |
669 | else | |
670 | binsPtDummy[i]=binsPtDummy[i-1]+0.1; | |
671 | } | |
672 | for(Int_t i=1; i<kPBins+1;i++){ | |
673 | if( binsPDummy[i-1]+0.05<1.01) | |
674 | binsPDummy[i] = binsPDummy[i-1]+0.05; | |
675 | else | |
676 | binsPDummy[i] = binsPDummy[i-1]+0.1; | |
677 | } | |
678 | ||
679 | hNGoodESDTracksVsNGoodGammas[iCut] = new TH2F("hNGoodESDTracksVsNGoodGammas","hNGoodESDTracksVsNGoodGammas",200,-0.5,199.5,100,-0.5,99.5); | |
680 | fQAFolder[iCut]->Add(hNGoodESDTracksVsNGoodGammas[iCut]); | |
681 | ||
682 | hNGoodESDTracksVsNGoodVGammas[iCut] = new TH2F("hNGoodESDTracksVsNVGoodVGammas","hNGoodESDTracksVsNGoodVGammas",200,-0.5,199.5,100,-0.5,99.5); | |
683 | fQAFolder[iCut]->Add(hNGoodESDTracksVsNGoodVGammas[iCut]); | |
684 | ||
685 | hESDConvGammaZR[iCut]= new TH2F("ESD_ConvGamma_ConversionPoint_ZR","ESD_ConvGamma_ConversionPoint_ZR",1200,-150,150,480,0,120); | |
686 | fQAFolder[iCut]->Add(hESDConvGammaZR[iCut]); | |
687 | ||
688 | hESDDalitzElectronAfterPt[iCut] = new TH1F("ESD_DalitzElectron_After_Pt","ESD_DalitzElectron_After_Pt",1000,0,25); | |
689 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterPt[iCut]); | |
690 | ||
691 | hESDDalitzPositronAfterPt[iCut] = new TH1F("ESD_DalitzPositron_After_Pt","ESD_DalitzPositron_After_Pt",1000,0,25); | |
692 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterPt[iCut]); | |
693 | ||
694 | hESDDalitzElectronAfterEta[iCut] = new TH1F("ESD_DalitzElectron_After_Eta","ESD_DalitzElectron_After_Eta",600,-1.5,1.5); | |
695 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterEta[iCut]); | |
696 | ||
697 | hESDDalitzElectronAfterEtaPCut[iCut] = new TH1F("ESD_DalitzElectron_After_Eta_PCut","ESD_DalitzElectron_After_Eta_PCut",600,-1.5,1.5); | |
698 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterEtaPCut[iCut]); | |
699 | ||
700 | hESDDalitzPositronAfterEta[iCut] = new TH1F("ESD_DalitzPositron_After_Eta","ESD_DalitzElectron_After_Eta",600,-1.5,1.5); | |
701 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterEta[iCut]); | |
702 | ||
703 | hESDDalitzPositronAfterEtaPCut[iCut] = new TH1F("ESD_DalitzPositron_After_Eta_PCut","ESD_DalitzElectron_After_Eta_PCut",600,-1.5,1.5); | |
704 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterEtaPCut[iCut]); | |
705 | ||
706 | hESDDalitzElectronAfterPhi[iCut] = new TH1F("ESD_DalitzElectron_After_Phi","ESD_DalitzElectron_After_Phi",360,0,2*TMath::Pi()); | |
707 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterPhi[iCut]); | |
708 | ||
709 | hESDDalitzPositronAfterPhi[iCut] = new TH1F("ESD_DalitzPositron_After_Phi","ESD_DalitzPositron_After_Phi",360,0,2*TMath::Pi()); | |
710 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterPhi[iCut]); | |
711 | ||
712 | hESDDalitzElectronAfterNClsITS[iCut] = new TH1F("ESD_DalitzElectron_After_NClsITS","ESD_DalitzElectron_After_NClsITS",7,0.,7.); | |
713 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterNClsITS[iCut]); | |
714 | ||
715 | hESDDalitzPositronAfterNClsITS[iCut] = new TH1F("ESD_DalitzPositron_After_NClsITS","ESD_DalitzPositron_After_NClsITS",7,0.,7.); | |
716 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterNClsITS[iCut]); | |
717 | ||
718 | hESDDalitzElectronAfterNFindClsTPC[iCut] = new TH2F("ESD_DalitzElectron_After_NFindClsTPC","ESD_DalitzElectron_After_NFindClsTPC",60,0,1.5,kPtBins,binsPtDummy); | |
719 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterNFindClsTPC[iCut]); | |
720 | ||
721 | hESDDalitzPositronAfterNFindClsTPC[iCut] = new TH2F("ESD_DalitzPositron_After_NFindClsTPC","ESD_DalitzPositron_After_NFindClsTPC",60,0,1.5,kPtBins,binsPtDummy); | |
722 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterNFindClsTPC[iCut]); | |
723 | ||
724 | hESDDalitzElectronAfterNClsTPC[iCut] = new TH2F("ESD_DalitzElectron_After_NClsTPC","ESD_DalitzElectron_After_NClsTPC",200,0,200,kPtBins,binsPtDummy); | |
725 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterNClsTPC[iCut]); | |
726 | ||
727 | hESDDalitzPositronAfterNClsTPC[iCut] = new TH2F("ESD_DalitzPositron_After_NClsTPC","ESD_DalitzPositron_After_NClsTPC",200,0,200,kPtBins,binsPtDummy); | |
728 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterNClsTPC[iCut]); | |
729 | ||
730 | hESDDalitzPositronAfterNCrossedRowsTPC[iCut] = new TH2F("ESD_DalitzPositron_After_NCrossedRowsTPC","ESD_DalitzPositron_After_NCrossedRowsTPC",165,-0.5,164.5,kPtBins,binsPtDummy); | |
731 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterNCrossedRowsTPC[iCut]); | |
732 | ||
733 | hESDDalitzElectronAfterNCrossedRowsTPC[iCut] = new TH2F("ESD_DalitzElectron_After_NCrossedRowsTPC","ESD_DalitzElectron_After_NCrossedRowsTPC",165,-0.5,164.5,kPtBins,binsPtDummy); | |
734 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterNCrossedRowsTPC[iCut]); | |
735 | ||
736 | hESDDalitzPosEleAfterDCAxy[iCut] = new TH2F("ESD_DalitzPosEle_After_DCAxy","ESD_DalitzPosEle_After_DCAxy",124,-0.62,0.62,kPtBins,binsPtDummy); | |
737 | fQAFolder[iCut]->Add(hESDDalitzPosEleAfterDCAxy[iCut]); | |
738 | ||
739 | hESDDalitzPosEleAfterDCAz[iCut] = new TH2F("ESD_DalitzPosEle_After_DCAz","ESD_DalitzPosEle_After_DCAz",200,-1.0,1.0,kPtBins,binsPtDummy); | |
740 | fQAFolder[iCut]->Add(hESDDalitzPosEleAfterDCAz[iCut]); | |
741 | ||
742 | hESDDalitzElectronAfterTPCdEdxVsP[iCut] = new TH2F("ESD_DalitzElectron_After_TPCdEdxVsP","ESD_DalitzElectron_After_TPCdEdxVsP_After_TPCdEdx",kPBins,binsPDummy,200,-10,10); | |
743 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterTPCdEdxVsP[iCut]); | |
744 | ||
745 | hESDDalitzPositronAfterTPCdEdxVsP[iCut] = new TH2F("ESD_DalitzPositron_After_TPCdEdxVsP","ESD_DalitzPositron_After_TPCdEdxVsP",kPBins,binsPDummy,200,-10,10); | |
746 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterTPCdEdxVsP[iCut]); | |
747 | ||
748 | hESDDalitzElectronAfterTPCdEdxSignalVsP[iCut] =new TH2F("ESD_DalitzElectron_After_TPCdEdxSignalVsP","ESD_DalitzElectron_After_TPCdEdxSignalVsP" ,kPBins,binsPDummy,200,0.0,200); | |
749 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterTPCdEdxSignalVsP[iCut]); | |
750 | ||
751 | hESDDalitzPositronAfterTPCdEdxSignalVsP[iCut] =new TH2F("ESD_DalitzPositron_After_TPCdEdxSignalVsP","ESD_DalitzPositron_After_TPCdEdxSignalVsP" ,kPBins,binsPDummy,200,0.0,200); | |
752 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterTPCdEdxSignalVsP[iCut]); | |
753 | ||
754 | hESDDalitzElectronAfterTPCdEdxVsEta[iCut] = new TH2F("ESD_DalitzElectron_After_TPCdEdxVsEta","ESD_DalitzElectron_After_TPCdEdxVsEta",140,-1.4,1.4,200,-10,10); | |
755 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterTPCdEdxVsEta[iCut]); | |
756 | ||
757 | hESDDalitzPositronAfterTPCdEdxVsEta[iCut] = new TH2F("ESD_DalitzPositron_After_TPCdEdxVsEta","ESD_DalitzPositron_After_TPCdEdxVsEta",140,-1.4,1.4,200,-10,10); | |
758 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterTPCdEdxVsEta[iCut]); | |
759 | ||
760 | hESDDalitzElectronAfterTPCdEdxVsPhi[iCut] = new TH2F("ESD_DalitzElectron_After_TPCdEdxVsPhi","ESD_DalitzElectron_After_TPCdEdxVsPhi",180,0,2*TMath::Pi(),200,-10,10); | |
761 | fQAFolder[iCut]->Add(hESDDalitzElectronAfterTPCdEdxVsPhi[iCut]); | |
762 | ||
763 | hESDDalitzPositronAfterTPCdEdxVsPhi[iCut] = new TH2F("ESD_DalitzPositron_After_TPCdEdxVsPhi","ESD_DalitzPositron_After_TPCdEdxVsPhi",180,0,2*TMath::Pi(),200,-10,10); | |
764 | fQAFolder[iCut]->Add(hESDDalitzPositronAfterTPCdEdxVsPhi[iCut]); | |
765 | ||
766 | hESDMotherPhi[iCut] = new TH1F("ESD_DalitzMother_Phi","ESD_DalitzMother_Phi",360,0,2*TMath::Pi()); | |
767 | fQAFolder[iCut]->Add(hESDMotherPhi[iCut]); | |
768 | ||
769 | hESDEposEnegPsiPairDPhi[iCut] = new TH2F("ESD_EposEneg_PsiPair_DPhi","ESD_EposEneg_PsiPair_DPhi", 100, -1.0,1.0,100,-1.0,1.0 ); | |
770 | fQAFolder[iCut]->Add(hESDEposEnegPsiPairDPhi[iCut]); | |
771 | ||
772 | hESDEposEnegInvMassPt[iCut] = new TH2F("ESD_EposEneg_InvMassPt","ESD_EposEneg_InvMassPt",4000,0.0,2.0,100,0.,10.); | |
773 | fQAFolder[iCut]->Add(hESDEposEnegInvMassPt[iCut]); | |
774 | ||
775 | hESDEposEnegAfterMassCutInvMassPi0Pt[iCut] = new TH2F("ESD_EposEneg_AfterMassCut_InvMassPi0Pt","ESD_EposEneg_AfterMassCut_InvMassPi0Pt",4000,0.0,2.0,100,0.,10.); | |
776 | fQAFolder[iCut]->Add(hESDEposEnegAfterMassCutInvMassPi0Pt[iCut]); | |
777 | ||
778 | hESDEposEnegInvMassPi0Pt[iCut] = new TH2F("ESD_EposEneg_InvMassPi0Pt","ESD_EposEneg_InvMassPi0Pt",1000,0.0,0.5,100,0.,10.); | |
779 | fQAFolder[iCut]->Add(hESDEposEnegInvMassPi0Pt[iCut]); | |
780 | ||
781 | hESDEposEnegLikeSignBackInvMassPt[iCut] = new TH2F("ESD_EposEneg_LikeSignBack_InvMassPt","ESD_EposEneg_LikeSignBack_InvMassPt",4000,0.0,2.,100,0.,10.); | |
782 | fQAFolder[iCut]->Add(hESDEposEnegLikeSignBackInvMassPt[iCut]); | |
783 | ||
784 | TAxis *AxisAfter = hESDDalitzElectronAfterTPCdEdxVsP[iCut]->GetXaxis(); | |
785 | Int_t bins = AxisAfter->GetNbins(); | |
786 | Double_t from = AxisAfter->GetXmin(); | |
787 | Double_t to = AxisAfter->GetXmax(); | |
788 | Double_t *newBins = new Double_t[bins+1]; | |
789 | newBins[0] = from; | |
790 | Double_t factor = TMath::Power(to/from, 1./bins); | |
791 | for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1]; | |
792 | ||
793 | AxisAfter->Set(bins, newBins); | |
794 | AxisAfter = hESDDalitzElectronAfterTPCdEdxSignalVsP[iCut]->GetXaxis(); | |
795 | AxisAfter->Set(bins, newBins); | |
796 | ||
797 | AxisAfter = hESDDalitzPositronAfterTPCdEdxVsP[iCut]->GetXaxis(); | |
798 | AxisAfter->Set(bins, newBins); | |
799 | ||
800 | AxisAfter = hESDDalitzPositronAfterTPCdEdxSignalVsP[iCut]->GetXaxis(); | |
801 | AxisAfter->Set(bins,newBins); | |
802 | ||
803 | delete [] newBins; | |
804 | ||
805 | fCutFolder[iCut]->Add(fQAFolder[iCut]); | |
806 | } | |
807 | ||
808 | hESDMotherInvMassPt[iCut] = new TH2F("ESD_DalitzMother_InvMass_Pt","ESD_DalitzMother_InvMass_Pt",800,0,0.8,250,0,25); | |
809 | fESDList[iCut]->Add(hESDMotherInvMassPt[iCut]); | |
810 | ||
811 | ||
812 | if( fDoChicAnalysis) { | |
813 | hESDPi0MotherInvMassPt[iCut] = new TH2F("ESD_Pi0Mother_InvMass_Pt","ESD_Pi0Mother_InvMass_Pt",4000,0,4,250,0,25); | |
814 | fESDList[iCut]->Add(hESDPi0MotherInvMassPt[iCut]); | |
815 | hESDPi0MotherDiffInvMassPt[iCut] = new TH2F("ESD_Pi0Mother_DiffInvMass_Pt","ESD_Pi0Mother_DiffInvMass_Pt",2000,0,2,250,0,25); | |
816 | fESDList[iCut]->Add(hESDPi0MotherDiffInvMassPt[iCut]); | |
817 | hESDPi0MotherDiffLimInvMassPt[iCut] = new TH2F("ESD_Pi0Mother_DiffLimInvMass_Pt","ESD_Pi0Mother_DiffLimInvMass_Pt",2000,0,2,250,0,25); | |
818 | fESDList[iCut]->Add(hESDPi0MotherDiffLimInvMassPt[iCut]); | |
819 | } | |
820 | ||
821 | hESDMotherBackInvMassPt[iCut] = new TH2F("ESD_DalitzBackground_InvMass_Pt","ESD_DalitzBackground_InvMass_Pt",800,0,0.8,250,0,25); | |
822 | fESDList[iCut]->Add(hESDMotherBackInvMassPt[iCut]); | |
823 | ||
824 | fCutFolder[iCut]->Add(fESDList[iCut]); | |
d9d6352b | 825 | } |
344100c4 | 826 | |
827 | ||
828 | InitBack(); // Init Background Handler | |
829 | ||
830 | ||
831 | if( fIsMC ){ | |
832 | // MC Histogramms | |
833 | fMCList = new TList*[fnCuts]; | |
834 | // True Histogramms | |
835 | fTrueList = new TList*[fnCuts]; | |
836 | hESDTrueConvGammaPt = new TH1F*[fnCuts]; | |
837 | hESDTruePositronPt = new TH1F*[fnCuts]; | |
838 | hESDTrueElectronPt = new TH1F*[fnCuts]; | |
839 | hESDTrueSecConvGammaPt = new TH1F*[fnCuts]; | |
840 | hESDTrueSecPositronPt = new TH1F*[fnCuts]; | |
841 | hESDTrueSecElectronPt = new TH1F*[fnCuts]; | |
842 | hESDTruePi0DalitzConvGammaPt = new TH1F*[fnCuts]; | |
843 | hESDTruePi0DalitzPositronPt = new TH1F*[fnCuts]; | |
844 | hESDTruePi0DalitzElectronPt = new TH1F*[fnCuts]; | |
845 | hESDTruePi0DalitzSecConvGammaPt = new TH1F*[fnCuts]; | |
846 | hESDTruePi0DalitzSecPositronPt = new TH1F*[fnCuts]; | |
847 | hESDTruePi0DalitzSecElectronPt = new TH1F*[fnCuts]; | |
848 | //if(fDoMesonAnalysis){ | |
849 | hMCAllGammaPt = new TH1F*[fnCuts]; | |
850 | hMCConvGammaPt = new TH1F*[fnCuts]; | |
851 | hMCConvGammaRSPt = new TH1F*[fnCuts]; | |
852 | hMCAllPositronsPt = new TH1F*[fnCuts]; | |
853 | hMCAllElectronsPt = new TH1F*[fnCuts]; | |
854 | ||
855 | if( fDoMesonQA ) { | |
856 | ||
857 | hMCConvGammaEta = new TH1F*[fnCuts]; | |
858 | hMCAllPositronsEta = new TH1F*[fnCuts]; | |
859 | hMCAllElectronsEta = new TH1F*[fnCuts]; | |
860 | ||
861 | } | |
862 | hMCPi0DalitzGammaPt = new TH1F*[fnCuts]; | |
863 | hMCPi0DalitzElectronPt = new TH1F*[fnCuts]; | |
864 | hMCPi0DalitzPositronPt = new TH1F*[fnCuts]; | |
865 | ||
866 | hMCPi0Pt = new TH1F*[fnCuts]; | |
867 | hMCPi0GGPt = new TH1F*[fnCuts]; | |
868 | hMCEtaPt = new TH1F*[fnCuts]; | |
869 | hMCEtaGGPt = new TH1F*[fnCuts]; | |
870 | hMCPi0InAccPt = new TH1F*[fnCuts]; | |
871 | hMCEtaInAccPt = new TH1F*[fnCuts]; | |
872 | hMCChiCPt = new TH1F*[fnCuts]; | |
873 | hMCChiCInAccPt = new TH1F*[fnCuts]; | |
874 | ||
f4d5bd23 | 875 | |
344100c4 | 876 | if ( fDoMesonQA ) { |
877 | ||
878 | hMCPi0EposEnegInvMassPt = new TH2F*[fnCuts]; | |
879 | hMCEtaEposEnegInvMassPt = new TH2F*[fnCuts]; | |
880 | ||
881 | hESDEposEnegTruePi0DalitzInvMassPt = new TH2F*[fnCuts]; | |
882 | hESDEposEnegTruePrimPi0DalitzInvMass = new TH1F*[fnCuts]; | |
883 | hESDEposEnegTruePi0DalitzPsiPairDPhi = new TH2F*[fnCuts]; | |
884 | hESDEposEnegTrueEtaDalitzInvMassPt = new TH2F*[fnCuts]; | |
885 | hESDEposEnegTruePrimEtaDalitzInvMass = new TH1F*[fnCuts]; | |
886 | hESDEposEnegTrueEtaDalitzPsiPairDPhi = new TH2F*[fnCuts]; | |
887 | hESDEposEnegTruePhotonInvMassPt = new TH2F*[fnCuts]; | |
888 | hESDEposEnegTrueInvMassPt = new TH2F*[fnCuts]; | |
889 | hESDEposEnegTruePhotonPsiPairDPhi = new TH2F*[fnCuts]; | |
890 | hESDEposEnegTruePhotonPsiPairDPhiPtCut = new TH2F*[fnCuts]; | |
891 | hESDEposEnegTrueJPsiInvMassPt = new TH2F*[fnCuts]; | |
892 | } | |
893 | ||
894 | ||
895 | if( fDoChicAnalysis ){ | |
896 | hESDTrueMotherChiCInvMassPt = new TH2F*[fnCuts]; | |
897 | hESDTrueMotherChiCDiffInvMassPt = new TH2F*[fnCuts]; | |
898 | } | |
899 | ||
900 | ||
901 | hESDTrueMotherInvMassPt = new TH2F*[fnCuts]; | |
902 | hESDTrueMotherDalitzInvMassPt = new TH2F*[fnCuts]; | |
903 | hESDTrueMotherPi0GGInvMassPt = new TH2F*[fnCuts]; | |
904 | hESDTruePrimaryMotherPi0GGInvMassPt = new TH2F*[fnCuts]; | |
905 | hESDTrueSecondaryMotherPi0GGInvMassPt = new TH2F*[fnCuts]; | |
906 | hESDTruePrimaryPi0DalitzESDPtMCPt = new TH2F*[fnCuts]; | |
907 | hESDTruePrimaryMotherInvMassMCPt = new TH2F*[fnCuts]; | |
908 | hESDTruePrimaryMotherInvMassPt = new TH2F*[fnCuts]; | |
909 | hESDTruePrimaryMotherW0WeightingInvMassPt = new TH2F*[fnCuts]; | |
910 | hESDTrueSecondaryMotherInvMassPt = new TH2F*[fnCuts]; | |
911 | hESDTrueSecondaryMotherFromK0sInvMassPt = new TH2F*[fnCuts]; | |
912 | hESDTrueBckGGInvMassPt = new TH2F*[fnCuts]; | |
913 | hESDTrueBckContInvMassPt = new TH2F*[fnCuts]; | |
914 | hESDTrueMotherGGInvMassPt = new TH2F*[fnCuts]; | |
915 | //} | |
916 | ||
917 | for(Int_t iCut = 0; iCut<fnCuts;iCut++){ | |
918 | TString cutstringEvent = ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber(); | |
919 | TString cutstringElectron = ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetCutNumber(); | |
920 | TString cutstringMeson = ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->GetCutNumber(); | |
921 | TString cutstringGamma = ((AliConversionPhotonCuts*)fCutGammaArray->At(iCut))->GetCutNumber(); | |
922 | ||
923 | fMCList[iCut] = new TList(); | |
924 | fMCList[iCut]->SetName(Form("%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
925 | fMCList[iCut]->SetOwner(kTRUE); | |
926 | fCutFolder[iCut]->Add(fMCList[iCut]); | |
927 | ||
928 | hMCAllGammaPt[iCut] = new TH1F("MC_AllGamma_Pt","MC_AllGamma_Pt",250,0,25); | |
929 | fMCList[iCut]->Add(hMCAllGammaPt[iCut]); | |
930 | ||
931 | hMCConvGammaPt[iCut] = new TH1F("MC_ConvGamma_Pt","MC_ConvGamma_Pt",250,0,25); | |
932 | fMCList[iCut]->Add(hMCConvGammaPt[iCut]); | |
933 | ||
934 | hMCConvGammaRSPt[iCut] = new TH1F("MC_ConvGamma_RS_Pt","MC_ConvGamma_RS_Pt",250,0,25); | |
935 | fMCList[iCut]->Add(hMCConvGammaRSPt[iCut]); | |
936 | ||
937 | hMCAllPositronsPt[iCut] = new TH1F("MC_AllPositrons_Pt","MC_AllPositrons_Pt",1000,0,25); | |
938 | fMCList[iCut]->Add(hMCAllPositronsPt[iCut]); | |
939 | ||
940 | hMCAllElectronsPt[iCut] = new TH1F("MC_AllElectrons_Pt","MC_AllElectrons_Pt",1000,0,25); | |
941 | fMCList[iCut]->Add(hMCAllElectronsPt[iCut]); | |
942 | ||
943 | hMCPi0DalitzGammaPt[iCut] = new TH1F("MC_Pi0DalitzGamma_Pt","MC_Pi0DalitzGamma_Pt",250,0,25); | |
944 | hMCPi0DalitzGammaPt[iCut]->Sumw2(); | |
945 | fMCList[iCut]->Add(hMCPi0DalitzGammaPt[iCut]); | |
946 | ||
947 | if ( fDoMesonQA ){ | |
948 | hMCConvGammaEta[iCut] = new TH1F("MC_ConvGamma_Eta","MC_ConvGamma_Eta",600,-1.5,1.5); | |
949 | fMCList[iCut]->Add(hMCConvGammaEta[iCut]); | |
950 | hMCAllPositronsEta[iCut] = new TH1F("MC_AllPositrons_Eta","MC_AllPositrons_Eta",600,-1.5,1.5); | |
951 | fMCList[iCut]->Add(hMCAllPositronsEta[iCut]); | |
952 | hMCAllElectronsEta[iCut] = new TH1F("MC_AllElectrons_Eta","MC_AllElectrons_Eta",600,-1.5,1.5); | |
953 | fMCList[iCut]->Add(hMCAllElectronsEta[iCut]); | |
954 | } | |
955 | ||
956 | hMCPi0DalitzPositronPt[iCut] = new TH1F("MC_Pi0DalitzPositron_Pt","MC_Pi0DalitzPositron_Pt",1000,0,25); | |
957 | hMCPi0DalitzPositronPt[iCut]->Sumw2(); | |
958 | fMCList[iCut]->Add(hMCPi0DalitzPositronPt[iCut]); | |
959 | ||
960 | hMCPi0DalitzElectronPt[iCut] = new TH1F("MC_Pi0DalitzElectron_Pt","MC_Pi0DalitzElectron_Pt",1000,0,25); | |
961 | hMCPi0DalitzElectronPt[iCut]->Sumw2(); | |
962 | fMCList[iCut]->Add(hMCPi0DalitzElectronPt[iCut]); | |
963 | ||
964 | hMCPi0Pt[iCut] = new TH1F("MC_Pi0_Pt","MC_Pi0_Pt",250,0,25); | |
965 | hMCPi0Pt[iCut]->Sumw2(); | |
966 | fMCList[iCut]->Add(hMCPi0Pt[iCut]); | |
967 | ||
968 | hMCPi0GGPt[iCut] = new TH1F("MC_Pi0_GG_Pt","MC_Pi0_GG_Pt",250,0,25); | |
969 | hMCPi0GGPt[iCut]->Sumw2(); | |
970 | fMCList[iCut]->Add(hMCPi0GGPt[iCut]); | |
971 | ||
972 | hMCEtaPt[iCut] = new TH1F("MC_Eta_Pt","MC_Eta_Pt",250,0,25); | |
973 | hMCEtaPt[iCut]->Sumw2(); | |
974 | fMCList[iCut]->Add(hMCEtaPt[iCut]); | |
0f8c33c1 | 975 | |
344100c4 | 976 | hMCEtaGGPt[iCut] = new TH1F("MC_Eta_GG_Pt","MC_Eta_GG_Pt",250,0,25); |
977 | hMCEtaGGPt[iCut]->Sumw2(); | |
978 | fMCList[iCut]->Add(hMCEtaGGPt[iCut]); | |
979 | ||
980 | hMCPi0InAccPt[iCut] = new TH1F("MC_Pi0DalitzInAcc_Pt","MC_Pi0DalitzInAcc_Pt",250,0,25); | |
981 | hMCPi0InAccPt[iCut]->Sumw2(); | |
982 | fMCList[iCut]->Add(hMCPi0InAccPt[iCut]); | |
983 | ||
984 | hMCEtaInAccPt[iCut] = new TH1F("MC_EtaDalitzInAcc_Pt","MC_EtaDalitzInAcc_Pt",250,0,25); | |
985 | hMCEtaInAccPt[iCut]->Sumw2(); | |
986 | fMCList[iCut]->Add(hMCEtaInAccPt[iCut]); | |
987 | ||
988 | hMCChiCPt[iCut] = new TH1F("MC_ChiC_Pt","MC_ChiC_Pt",250,0,25); | |
989 | fMCList[iCut]->Add(hMCChiCPt[iCut]); | |
990 | ||
991 | hMCChiCInAccPt[iCut] = new TH1F("MC_ChiCInAcc_Pt","MC_ChiCInAcc_Pt",250,0,25); | |
992 | fMCList[iCut]->Add(hMCChiCInAccPt[iCut]); | |
993 | ||
994 | if ( fDoMesonQA ) { | |
995 | hMCPi0EposEnegInvMassPt[iCut] = new TH2F("MC_Pi0EposEneg_InvMassPt","MC_Pi0EposEneg_InvMassPt",1000,0.0,0.5,100,0.,10.); | |
996 | fMCList[iCut]->Add(hMCPi0EposEnegInvMassPt[iCut]); | |
997 | hMCEtaEposEnegInvMassPt[iCut] = new TH2F("MC_EtaEposEneg_InvMassPt","MC_EtaEposEneg_InvMassPt",1400,0.,0.7,100,0.,10.); | |
998 | fMCList[iCut]->Add(hMCEtaEposEnegInvMassPt[iCut]); | |
999 | } | |
1000 | ||
1001 | fTrueList[iCut] = new TList(); | |
1002 | fTrueList[iCut]->SetName(Form("%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringGamma.Data(),cutstringElectron.Data(),cutstringMeson.Data())); | |
1003 | fTrueList[iCut]->SetOwner(kTRUE); | |
1004 | fCutFolder[iCut]->Add(fTrueList[iCut]); | |
1005 | ||
1006 | if ( fDoMesonQA ) { | |
1007 | hESDEposEnegTruePi0DalitzInvMassPt[iCut] = new TH2F("ESD_EposEneg_TruePi0Dalitz_InvMassPt","ESD_EposEneg_TruePi0Dalitz_InvMassPt",1000,0.0,0.5,100,0.,10.); | |
1008 | fTrueList[iCut]->Add(hESDEposEnegTruePi0DalitzInvMassPt[iCut]); | |
1009 | ||
1010 | hESDEposEnegTruePrimPi0DalitzInvMass[iCut] = new TH1F("ESD_EposEneg_TruePrimPi0Dalitz_InvMass","ESD_EposEneg_TruePrimPi0Dalitz_InvMass",500,0.,0.5); | |
1011 | fTrueList[iCut]->Add(hESDEposEnegTruePrimPi0DalitzInvMass[iCut]); | |
1012 | ||
1013 | hESDEposEnegTruePi0DalitzPsiPairDPhi[iCut] = new TH2F("ESD_EposEneg_TruePi0Dalitz_PsiPair_DPhi","ESD_EposEneg_TruePi0Dalitz_PsiPair_DPhi", 100, -1.0,1.0,100,-1.0,1.0 ); | |
1014 | fTrueList[iCut]->Add(hESDEposEnegTruePi0DalitzPsiPairDPhi[iCut]); | |
1015 | ||
1016 | hESDEposEnegTrueEtaDalitzInvMassPt[iCut] = new TH2F("ESD_EposEneg_TrueEtaDalitz_InvMassPt","ESD_EposEneg_TrueEtaDalitz_InvMassPt",700,0.,0.7,100,0.,10.); | |
1017 | fTrueList[iCut]->Add(hESDEposEnegTrueEtaDalitzInvMassPt[iCut]); | |
1018 | ||
1019 | hESDEposEnegTruePrimEtaDalitzInvMass[iCut] = new TH1F("ESD_EposEneg_TruePrimEtaDalitz_InvMass","ESD_EposEneg_TruePrimEtaDalitz_InvMass",700,0.,0.7); | |
1020 | fTrueList[iCut]->Add(hESDEposEnegTruePrimEtaDalitzInvMass[iCut]); | |
1021 | ||
1022 | hESDEposEnegTrueEtaDalitzPsiPairDPhi[iCut] = new TH2F("ESD_EposEneg_TrueEtaDalitz_PsiPair_DPhi","ESD_EposEneg_TrueEtaDalitz_PsiPair_DPhi", 100, -1.0,1.0,100,-1.0,1.0 ); | |
1023 | fTrueList[iCut]->Add(hESDEposEnegTrueEtaDalitzPsiPairDPhi[iCut]); | |
1024 | ||
1025 | hESDEposEnegTruePhotonInvMassPt[iCut] = new TH2F("ESD_EposEneg_TruePhoton_InvMassPt","ESD_EposEneg_TruePhoton_InvMassPt",500,0.,0.5,100,0.,10.); | |
1026 | fTrueList[iCut]->Add(hESDEposEnegTruePhotonInvMassPt[iCut]); | |
1027 | ||
1028 | hESDEposEnegTrueInvMassPt[iCut] = new TH2F("ESD_EposEneg_True_InvMassPt","ESD_EposEneg_True_InvMassPt",5000,0.,5.,100,0.,10.); | |
1029 | fTrueList[iCut]->Add(hESDEposEnegTrueInvMassPt[iCut]); | |
1030 | ||
1031 | hESDEposEnegTruePhotonPsiPairDPhi[iCut] = new TH2F("ESD_EposEneg_TruePhoton_PsiPair_DPhi","ESD_EposEneg_TruePhoton_PsiPair_DPhi", 100, -1.0,1.0,100,-1.0,1.0 ); | |
1032 | fTrueList[iCut]->Add(hESDEposEnegTruePhotonPsiPairDPhi[iCut]); | |
1033 | ||
1034 | hESDEposEnegTruePhotonPsiPairDPhiPtCut[iCut] = new TH2F("ESD_EposEneg_TruePhoton_PsiPair_DPhi_PtCut","ESD_EposEneg_TruePhoton_PsiPair_DPhi_PtCut", 100, -1.0,1.0,100,-1.0,1.0 ); | |
1035 | fTrueList[iCut]->Add(hESDEposEnegTruePhotonPsiPairDPhiPtCut[iCut]); | |
1036 | ||
1037 | hESDEposEnegTrueJPsiInvMassPt[iCut] = new TH2F("ESD_EposEneg_TrueJPsi_InvMassPt","ESD_EposEneg_TrueJPsi_InvMassPt",5000,0.,5.,100,0.,10.); | |
1038 | fTrueList[iCut]->Add(hESDEposEnegTrueJPsiInvMassPt[iCut]); | |
1039 | } | |
1040 | ||
1041 | hESDTruePositronPt[iCut] = new TH1F("ESD_TruePositron_Pt","ESD_TruePositron_Pt",1000,0,25); | |
1042 | fTrueList[iCut]->Add(hESDTruePositronPt[iCut]); | |
1043 | ||
1044 | hESDTrueElectronPt[iCut] = new TH1F("ESD_TrueElectron_Pt","ESD_TrueElectron_Pt",1000,0,25); | |
1045 | fTrueList[iCut]->Add(hESDTrueElectronPt[iCut]); | |
1046 | ||
1047 | hESDTrueSecPositronPt[iCut] = new TH1F("ESD_TrueSecPositron_Pt","ESD_TrueSecPositron_Pt",1000,0,25); | |
1048 | fTrueList[iCut]->Add(hESDTrueSecPositronPt[iCut]); | |
1049 | ||
1050 | hESDTrueSecElectronPt[iCut] = new TH1F("ESD_TrueSecElectron_Pt","ESD_TrueSecElectron_Pt",1000,0,25); | |
1051 | fTrueList[iCut]->Add(hESDTrueSecElectronPt[iCut]); | |
1052 | ||
1053 | hESDTrueConvGammaPt[iCut] = new TH1F("ESD_TrueConvGamma_Pt","ESD_TrueConvGamma_Pt",250,0,25); | |
1054 | fTrueList[iCut]->Add(hESDTrueConvGammaPt[iCut]); | |
1055 | ||
1056 | hESDTrueSecConvGammaPt[iCut] = new TH1F("ESD_TrueSecConvGamma_Pt","ESD_TrueSecConvGamma_Pt",250,0,25); | |
1057 | fTrueList[iCut]->Add(hESDTrueSecConvGammaPt[iCut]); | |
1058 | ||
1059 | hESDTruePi0DalitzConvGammaPt[iCut] = new TH1F("ESD_TruePi0DalitzConvGamma_Pt","ESD_TruePi0DalitzConvGamma_Pt",250,0,25); | |
1060 | fTrueList[iCut]->Add(hESDTruePi0DalitzConvGammaPt[iCut]); | |
1061 | ||
1062 | hESDTruePi0DalitzElectronPt[iCut] = new TH1F("ESD_TruePi0DalitzElectron_Pt","ESD_TruePi0DalitzElectron_Pt",1000,0,25); | |
1063 | fTrueList[iCut]->Add(hESDTruePi0DalitzElectronPt[iCut]); | |
1064 | ||
1065 | hESDTruePi0DalitzPositronPt[iCut] = new TH1F("ESD_TruePi0DalitzPositron_Pt","ESD_TruePi0DalitzPositron_Pt",1000,0,25); | |
1066 | fTrueList[iCut]->Add(hESDTruePi0DalitzPositronPt[iCut]); | |
1067 | ||
1068 | hESDTruePi0DalitzSecConvGammaPt[iCut] = new TH1F("ESD_TruePi0DalitzSecConvGamma_Pt","ESD_TruePi0DalitzSecConvGamma_Pt",250,0,25); | |
1069 | fTrueList[iCut]->Add(hESDTruePi0DalitzSecConvGammaPt[iCut]); | |
1070 | ||
1071 | hESDTruePi0DalitzSecElectronPt[iCut] = new TH1F("ESD_TruePi0DalitzSecElectron_Pt","ESD_TruePi0DalitzSecElectron_Pt",1000,0,25); | |
1072 | fTrueList[iCut]->Add(hESDTruePi0DalitzSecElectronPt[iCut]); | |
1073 | ||
1074 | hESDTruePi0DalitzSecPositronPt[iCut] = new TH1F("ESD_TruePi0DalitzSecPositron_Pt","ESD_TruePi0DalitzSecPositron_Pt",1000,0,25); | |
1075 | fTrueList[iCut]->Add(hESDTruePi0DalitzSecPositronPt[iCut]); | |
1076 | ||
1077 | if( fDoChicAnalysis) { | |
1078 | hESDTrueMotherChiCInvMassPt[iCut] = new TH2F("ESD_TrueMotherChiC_InvMass_Pt","ESD_TrueMotherChiC_InvMass_Pt",4000,0,4,250,0,25); | |
1079 | fTrueList[iCut]->Add(hESDTrueMotherChiCInvMassPt[iCut]); | |
1080 | hESDTrueMotherChiCDiffInvMassPt[iCut] = new TH2F("ESD_TrueMotherChiCDiff_InvMass_Pt","ESD_TrueMotherChiCDiff_InvMass_Pt",2000,0,2,250,0,25); | |
1081 | fTrueList[iCut]->Add(hESDTrueMotherChiCDiffInvMassPt[iCut]); | |
1082 | } | |
1083 | ||
1084 | hESDTrueMotherInvMassPt[iCut] = new TH2F("ESD_TrueMother_InvMass_Pt","ESD_TrueMother_InvMass_Pt",800,0,0.8,250,0,25); | |
1085 | hESDTrueMotherInvMassPt[iCut]->Sumw2(); | |
1086 | fTrueList[iCut]->Add(hESDTrueMotherInvMassPt[iCut]); | |
1087 | ||
1088 | hESDTrueMotherDalitzInvMassPt[iCut] = new TH2F("ESD_TrueMother_Dalitz_InvMass_Pt","ESD_TrueMother_Dalitz_InvMass_Pt",800,0,0.8,250,0,25); | |
1089 | hESDTrueMotherDalitzInvMassPt[iCut]->Sumw2(); | |
1090 | fTrueList[iCut]->Add(hESDTrueMotherDalitzInvMassPt[iCut]); | |
1091 | ||
1092 | ||
1093 | ||
1094 | ||
1095 | ||
1096 | hESDTrueMotherPi0GGInvMassPt[iCut] = new TH2F("ESD_TrueMotherPi0GG_InvMass_Pt","ESD_TrueMotherPi0GG_InvMass_Pt",800,0,0.8,250,0,25); | |
1097 | hESDTrueMotherPi0GGInvMassPt[iCut]->Sumw2(); | |
1098 | fTrueList[iCut]->Add(hESDTrueMotherPi0GGInvMassPt[iCut]); | |
1099 | ||
1100 | hESDTruePrimaryMotherPi0GGInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMotherPi0GG_InvMass_Pt","ESD_TruePrimaryMotherPi0GG_InvMass_Pt",800,0,0.8,250,0,25); | |
1101 | hESDTruePrimaryMotherPi0GGInvMassPt[iCut]->Sumw2(); | |
1102 | fTrueList[iCut]->Add(hESDTruePrimaryMotherPi0GGInvMassPt[iCut]); | |
1103 | ||
1104 | hESDTrueSecondaryMotherPi0GGInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherPi0GG_InvMass_Pt","ESD_TrueSecondaryMotherPi0GG_InvMass_Pt",800,0,0.8,250,0,25); | |
1105 | hESDTrueSecondaryMotherPi0GGInvMassPt[iCut]->Sumw2(); | |
1106 | fTrueList[iCut]->Add(hESDTrueSecondaryMotherPi0GGInvMassPt[iCut]); | |
1107 | ||
1108 | hESDTruePrimaryPi0DalitzESDPtMCPt[iCut] = new TH2F("ESD_TruePrimaryPi0Dalitz_ESDPt_MCPt","ESD_TruePrimaryPi0Dalitz_ESDPt_MCPt",250,0,25,250,0,25); | |
1109 | hESDTruePrimaryPi0DalitzESDPtMCPt[iCut]->Sumw2(); | |
1110 | fTrueList[iCut]->Add(hESDTruePrimaryPi0DalitzESDPtMCPt[iCut]); | |
1111 | hESDTruePrimaryMotherInvMassMCPt[iCut] = new TH2F("ESD_TruePrimaryMother_InvMass_MCPt","ESD_TrueDalitzPrimaryMother_InvMass_MCPt",800,0,0.8,250,0,25); | |
1112 | hESDTruePrimaryMotherInvMassMCPt[iCut]->Sumw2(); | |
1113 | fTrueList[iCut]->Add(hESDTruePrimaryMotherInvMassMCPt[iCut]); | |
1114 | hESDTruePrimaryMotherInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMother_InvMass_Pt","ESD_TruePrimaryMother_InvMass_Pt",800,0,0.8,250,0,25); | |
1115 | hESDTruePrimaryMotherInvMassPt[iCut]->Sumw2(); | |
1116 | fTrueList[iCut]->Add(hESDTruePrimaryMotherInvMassPt[iCut]); | |
1117 | hESDTruePrimaryMotherW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMotherW0Weighting_InvMass_Pt","ESD_TruePrimaryMotherW0Weighting_InvMass_Pt",800,0,0.8,250,0,25); | |
1118 | hESDTruePrimaryMotherW0WeightingInvMassPt[iCut]->Sumw2(); | |
1119 | fTrueList[iCut]->Add(hESDTruePrimaryMotherW0WeightingInvMassPt[iCut]); | |
1120 | ||
1121 | hESDTrueSecondaryMotherInvMassPt[iCut] = new TH2F("ESD_TrueDalitzSecondaryMother_InvMass_Pt","ESD_TrueDalitzSecondaryMother_InvMass_Pt",800,0,0.8,250,0,25); | |
1122 | hESDTrueSecondaryMotherInvMassPt[iCut]->Sumw2(); | |
1123 | fTrueList[iCut]->Add(hESDTrueSecondaryMotherInvMassPt[iCut]); | |
1124 | // hESDTrueSecondaryMotherFromK0sInvMassPt[iCut] = new TH2F("ESD_TrueDalitzSecondaryMotherFromK0s_InvMass_Pt","ESD_TrueDalitzSecondaryMotherFromK0s_InvMass_Pt",1000,0,1,250,0,25); | |
1125 | // fTrueList[iCut]->Add(hESDTrueSecondaryMotherFromK0sInvMassPt[iCut]); | |
1126 | hESDTrueBckGGInvMassPt[iCut] = new TH2F("ESD_TrueDalitzBckGG_InvMass_Pt","ESD_TrueDalitzBckGG_InvMass_Pt",800,0,0.8,250,0,25); | |
1127 | fTrueList[iCut]->Add(hESDTrueBckGGInvMassPt[iCut]); | |
1128 | hESDTrueBckContInvMassPt[iCut] = new TH2F("ESD_TrueDalitzBckCont_InvMass_Pt","ESD_TrueDalitzBckCont_InvMass_Pt",800,0,0.8,250,0,25); | |
1129 | fTrueList[iCut]->Add(hESDTrueBckContInvMassPt[iCut]); | |
1130 | // hESDTrueMotherGGInvMassPt[iCut] = new TH2F("ESD_TrueGammaGamma_InvMass_Pt","ESD_TrueGammaGamma_InvMass_Pt",1000,0,1,250,0,25); | |
1131 | // fTrueList[iCut]->Add(hESDTrueMotherGGInvMassPt[iCut]); | |
1132 | ||
1133 | } | |
1134 | } | |
1135 | ||
1136 | fV0Reader=(AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"); | |
1137 | if(!fV0Reader){printf("Error: No V0 Reader");return;} // GetV0Reader | |
1138 | ||
1139 | if(fV0Reader) | |
1140 | if((AliConversionPhotonCuts*)fV0Reader->GetConversionCuts()) | |
1141 | if(((AliConversionPhotonCuts*)fV0Reader->GetConversionCuts())->GetCutHistograms()) | |
1142 | fOutputContainer->Add(((AliConversionPhotonCuts*)fV0Reader->GetConversionCuts())->GetCutHistograms()); | |
1143 | ||
1144 | ||
1145 | ||
1146 | fElecSelector=(AliDalitzElectronSelector*)AliAnalysisManager::GetAnalysisManager()->GetTask("ElectronSelector"); | |
1147 | if(!fElecSelector){printf("Error: No ElectronSelector");return;} // GetV0Reader | |
1148 | ||
1149 | if( fElecSelector ){ | |
1150 | if ( ((AliDalitzElectronCuts*)fElecSelector->GetDalitzElectronCuts())->GetCutHistograms() ){ | |
1151 | fOutputContainer->Add( ((AliDalitzElectronCuts*)fElecSelector->GetDalitzElectronCuts())->GetCutHistograms() ); | |
1152 | } | |
1153 | } | |
1154 | ||
1155 | for(Int_t iCut = 0; iCut<fnCuts;iCut++){ | |
1156 | ||
1157 | if( fCutElectronArray ){ | |
1158 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetCutHistograms() ) { | |
1159 | fCutFolder[iCut]->Add( ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetCutHistograms() ); | |
1160 | } | |
1161 | } | |
1162 | ||
1163 | if( fCutMesonArray ) { | |
1164 | if( ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->GetCutHistograms() ) { | |
1165 | fCutFolder[iCut]->Add( ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->GetCutHistograms()); | |
1166 | } | |
1167 | } | |
1168 | ||
1169 | if( fCutGammaArray ) { | |
1170 | if( ((AliConversionPhotonCuts*)fCutGammaArray->At(iCut))->GetCutHistograms() ) { | |
1171 | fCutFolder[iCut]->Add( ((AliConversionPhotonCuts*)fCutGammaArray->At(iCut))->GetCutHistograms() ); | |
1172 | } | |
1173 | } | |
1174 | } | |
1175 | ||
1176 | PostData(1, fOutputContainer); | |
2bb2434e | 1177 | |
1178 | } | |
1179 | ||
1180 | //______________________________________________________________________ | |
1181 | void AliAnalysisTaskGammaConvDalitzV1::UserExec(Option_t *) | |
1182 | { | |
a280ac15 | 1183 | |
344100c4 | 1184 | // |
1185 | // Execute analysis for current event | |
1186 | // | |
1187 | ||
1188 | fV0Reader=(AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"); | |
1189 | if(!fV0Reader){printf("Error: No V0 Reader");return;} // GetV0Reader | |
1190 | ||
1191 | ||
1192 | Int_t eventQuality = ((AliConvEventCuts*)fV0Reader->GetEventCuts())->GetEventQuality(); | |
1193 | ||
1194 | if(eventQuality == 2 || eventQuality == 3){// Event Not Accepted due to MC event missing or wrong trigger for V0ReaderV1 | |
1195 | for(Int_t iCut = 0; iCut<fnCuts; iCut++){ | |
1196 | hNEvents[iCut]->Fill(eventQuality); | |
1197 | } | |
1198 | return; | |
1199 | } | |
1200 | ||
1201 | fElecSelector=(AliDalitzElectronSelector*)AliAnalysisManager::GetAnalysisManager()->GetTask("ElectronSelector"); | |
1202 | if(!fElecSelector){printf("Error: No ElectronSelector");return;} // GetV0Reader | |
1203 | ||
1204 | ||
1205 | if(fIsMC) fMCEvent = MCEvent(); | |
1206 | fESDEvent = (AliESDEvent*)InputEvent(); | |
1207 | fReaderGammas = fV0Reader->GetReconstructedGammas(); // Gammas from default Cut | |
1208 | fSelectorElectronIndex = fElecSelector->GetReconstructedElectronsIndex(); // Electrons from default Cut | |
1209 | fSelectorPositronIndex = fElecSelector->GetReconstructedPositronsIndex(); // Positrons from default Cut | |
1210 | ||
1211 | CountESDTracks(); // Estimate Event Multiplicity | |
1212 | fNumberOfESDTracks = fV0Reader->GetNumberOfPrimaryTracks(); | |
1213 | //AddTaskContainers(); //Add conatiner | |
1214 | ||
1215 | for(Int_t iCut = 0; iCut<fnCuts; iCut++){ | |
1216 | fiCut = iCut; | |
1217 | fNVirtualGammas = 0; | |
1218 | ||
1219 | Int_t eventNotAccepted = ((AliConvEventCuts*)fCutGammaArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon); | |
1220 | ||
1221 | if(eventNotAccepted){ | |
1222 | // cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl; | |
1223 | hNEvents[iCut]->Fill(eventNotAccepted); // Check Centrality, PileUp, SDD and V0AND --> Not Accepted => eventQuality = 1 | |
1224 | continue; | |
1225 | } | |
1226 | ||
1227 | if(eventQuality != 0){// Event Not Accepted | |
1228 | // cout << "event rejected due to: " <<eventQuality << endl; | |
1229 | hNEvents[iCut]->Fill(eventQuality); | |
1230 | continue; | |
1231 | } | |
1232 | ||
1233 | hNEvents[iCut]->Fill(eventQuality); | |
1234 | hNGoodESDTracks[iCut]->Fill(fNumberOfESDTracks); | |
1235 | ||
1236 | if(((AliConvEventCuts*)fCutEventArray->At(iCut))->IsHeavyIon() == 2) hNV0Tracks[iCut]->Fill(fInputEvent->GetVZEROData()->GetMTotV0A()); | |
1237 | else hNV0Tracks[iCut]->Fill(fInputEvent->GetVZEROData()->GetMTotV0A()+fInputEvent->GetVZEROData()->GetMTotV0C()); | |
1238 | ||
1239 | if(fMCEvent){ // Process MC Particle | |
1240 | fMCStack = fMCEvent->Stack(); | |
1241 | if(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetSignalRejection() != 0){ | |
1242 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetNotRejectedParticles( ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetSignalRejection(), | |
1243 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetAcceptedHeader(), | |
1244 | fMCEvent); | |
1245 | } | |
1246 | ProcessMCParticles(); | |
1247 | } | |
1248 | ||
1249 | ProcessPhotonCandidates(); // Process this cuts gammas | |
1250 | ProcessElectronCandidates(); // Process this cuts gammas | |
1251 | ||
1252 | if(((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->UseMCPSmearing() && fMCEvent){ | |
1253 | ||
1254 | fUnsmearedPx = new Double_t[fGoodGammas->GetEntries()]; // Store unsmeared Momenta | |
1255 | fUnsmearedPy = new Double_t[fGoodGammas->GetEntries()]; | |
1256 | fUnsmearedPz = new Double_t[fGoodGammas->GetEntries()]; | |
1257 | fUnsmearedE = new Double_t[fGoodGammas->GetEntries()]; | |
1258 | ||
1259 | for(Int_t gamma=0;gamma<fGoodGammas->GetEntries();gamma++){ // Smear the AODPhotons in MC | |
1260 | fUnsmearedPx[gamma] = ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->Px(); | |
1261 | fUnsmearedPy[gamma] = ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->Py(); | |
1262 | fUnsmearedPz[gamma] = ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->Pz(); | |
1263 | fUnsmearedE[gamma] = ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->E(); | |
1264 | ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->SmearParticle(dynamic_cast<AliAODConversionPhoton*>(fGoodGammas->At(gamma))); | |
1265 | } | |
1266 | } | |
1267 | ||
1268 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetUseVPhotonMCPmearing() && ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->UseMCPSmearing() && fMCEvent){ | |
1269 | // cout<<"Entro virtual photon smearing"<<endl; | |
1270 | fUnsmearedVPx = new Double_t[fGoodVirtualGammas->GetEntries()]; // Store unsmeared Momenta | |
1271 | fUnsmearedVPy = new Double_t[fGoodVirtualGammas->GetEntries()]; | |
1272 | fUnsmearedVPz = new Double_t[fGoodVirtualGammas->GetEntries()]; | |
1273 | fUnsmearedVE = new Double_t[fGoodVirtualGammas->GetEntries()]; | |
1274 | ||
1275 | for(Int_t Vgamma=0;Vgamma<fGoodVirtualGammas->GetEntries();Vgamma++){ // Smear the AODPhotons in MC | |
1276 | fUnsmearedVPx[Vgamma] = ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->Px(); | |
1277 | fUnsmearedVPy[Vgamma] = ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->Py(); | |
1278 | fUnsmearedVPz[Vgamma] = ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->Pz(); | |
1279 | fUnsmearedVE[Vgamma] = ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->E(); | |
1280 | ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->SmearVirtualPhoton(dynamic_cast<AliAODConversionPhoton*>(fGoodVirtualGammas->At(Vgamma))); | |
1281 | } | |
1282 | } | |
1283 | ||
1284 | ProcessVirtualGammasCandidates(); | |
1285 | CalculatePi0DalitzCandidates(); | |
1286 | CalculateBackground(); | |
1287 | UpdateEventByEventData(); | |
1288 | ||
1289 | if ( fDoMesonQA ) { | |
1290 | hNGoodESDTracksVsNGoodGammas[iCut]->Fill(fNumberOfESDTrackskBoth,fGoodGammas->GetEntries()); | |
1291 | hNGoodESDTracksVsNGoodVGammas[iCut]->Fill(fNumberOfESDTrackskBoth,fNVirtualGammas); | |
1292 | } | |
1293 | ||
1294 | ||
1295 | if(((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->UseMCPSmearing() && fMCEvent){ | |
1296 | ||
1297 | for(Int_t gamma=0;gamma<fGoodGammas->GetEntries();gamma++){ // Smear the AODPhotons in MC | |
1298 | ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->SetPx(fUnsmearedPx[gamma]); // Reset Unsmeared Momenta | |
1299 | ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->SetPy(fUnsmearedPy[gamma]); | |
1300 | ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->SetPz(fUnsmearedPz[gamma]); | |
1301 | ((AliAODConversionPhoton*)fGoodGammas->At(gamma))->SetE(fUnsmearedE[gamma]); | |
1302 | } | |
1303 | delete[] fUnsmearedPx; fUnsmearedPx = 0x0; | |
1304 | delete[] fUnsmearedPy; fUnsmearedPy = 0x0; | |
1305 | delete[] fUnsmearedPz; fUnsmearedPz = 0x0; | |
1306 | delete[] fUnsmearedE; fUnsmearedE = 0x0; | |
1307 | } | |
1308 | ||
1309 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->GetUseVPhotonMCPmearing() && ((AliConversionMesonCuts*)fCutMesonArray->At(iCut))->UseMCPSmearing() && fMCEvent){ | |
1310 | ||
1311 | for(Int_t Vgamma=0;Vgamma<fGoodVirtualGammas->GetEntries();Vgamma++){ // Smear the AODPhotons in MC | |
1312 | ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->SetPx(fUnsmearedVPx[Vgamma]); // Reset Unsmeared Momenta | |
1313 | ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->SetPy(fUnsmearedVPy[Vgamma]); | |
1314 | ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->SetPz(fUnsmearedVPz[Vgamma]); | |
1315 | ((AliAODConversionPhoton*)fGoodVirtualGammas->At(Vgamma))->SetE(fUnsmearedVE[Vgamma]); | |
1316 | } | |
1317 | delete[] fUnsmearedVPx; fUnsmearedVPx = 0x0; | |
1318 | delete[] fUnsmearedVPy; fUnsmearedVPy = 0x0; | |
1319 | delete[] fUnsmearedVPz; fUnsmearedVPz = 0x0; | |
1320 | delete[] fUnsmearedVE; fUnsmearedVE = 0x0; | |
1321 | } | |
1322 | fGoodGammas->Clear(); // delete this cuts good gammas | |
1323 | fGoodVirtualGammas->Clear(); // delete this cuts good gammas | |
1324 | } | |
1325 | ||
1326 | fSelectorElectronIndex.clear(); | |
1327 | fSelectorPositronIndex.clear(); | |
1328 | ||
1329 | PostData( 1, fOutputContainer ); | |
2bb2434e | 1330 | } |
1331 | ||
ae947965 | 1332 | Bool_t AliAnalysisTaskGammaConvDalitzV1::Notify() |
1333 | { | |
344100c4 | 1334 | for(Int_t iCut = 0; iCut<fnCuts;iCut++){ |
1335 | if( !((AliConvEventCuts*)fCutEventArray->At(iCut))->GetDoEtaShift() ){ | |
1336 | ||
1337 | /*if (((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift() != 0.){ | |
1338 | printf("Error: Gamma Conversion Dalitz Task %s :: Eta Shift not requested but set to %f, reset to 00. \n\n", | |
1339 | (((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber()).Data(),((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift()); | |
1340 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->SetEtaShift(0.); | |
1341 | ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->SetEtaShift(0.); | |
1342 | ||
1343 | ||
1344 | }*/ | |
1345 | hEtaShift[iCut]->Fill(0.,0.); | |
1346 | continue; // No Eta Shift requested, continue | |
1347 | } | |
1348 | ||
1349 | ||
1350 | if( ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift() == 0.0){ // Eta Shift requested but not set, get shift automatically | |
1351 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCorrectEtaShiftFromPeriod(fV0Reader->GetPeriodName()); | |
1352 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->DoEtaShift(kFALSE); // Eta Shift Set, make sure that it is called only once | |
1353 | ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->SetEtaShift( ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift() ); | |
1354 | hEtaShift[iCut]->Fill(0.,(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift())); | |
1355 | continue; | |
1356 | } else { | |
1357 | printf(" Gamma Conversion Dalitz Task %s :: Eta Shift Manually Set to %f \n\n", | |
1358 | (((AliConvEventCuts*)fCutEventArray->At(iCut))->GetCutNumber()).Data(),((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift()); | |
1359 | ((AliConvEventCuts*)fCutEventArray->At(iCut))->DoEtaShift(kFALSE); // Eta Shift Set, make sure that it is called only once | |
1360 | ((AliDalitzElectronCuts*)fCutElectronArray->At(iCut))->SetEtaShift( ((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift() ); | |
1361 | hEtaShift[iCut]->Fill(0.,(((AliConvEventCuts*)fCutEventArray->At(iCut))->GetEtaShift())); | |
1362 | } | |
1363 | } | |
1364 | ||
1365 | return kTRUE; | |
ae947965 | 1366 | } |
1367 | ||
344100c4 | 1368 | //________________________________________________________________________ |
2bb2434e | 1369 | void AliAnalysisTaskGammaConvDalitzV1::Terminate(const Option_t *) |
1370 | { | |
344100c4 | 1371 | ///Grid |
2bb2434e | 1372 | } |
344100c4 | 1373 | |
2bb2434e | 1374 | //________________________________________________________________________ |
1375 | void AliAnalysisTaskGammaConvDalitzV1::ProcessPhotonCandidates() | |
1376 | { | |
344100c4 | 1377 | Int_t nV0 = 0; |
1378 | TList *GoodGammasStepOne = new TList(); | |
1379 | TList *GoodGammasStepTwo = new TList(); | |
1380 | // Loop over Photon Candidates allocated by ReaderV1 | |
1381 | ||
1382 | for(Int_t i = 0; i < fReaderGammas->GetEntriesFast(); i++){ | |
1383 | AliAODConversionPhoton* PhotonCandidate = (AliAODConversionPhoton*) fReaderGammas->At(i); | |
1384 | if(!PhotonCandidate) continue; | |
1385 | fIsFromMBHeader = kTRUE; | |
1386 | if( fMCEvent && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0 ){ | |
1387 | Int_t isPosFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCStack, fInputEvent); | |
1388 | if(isPosFromMBHeader == 0 && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 3) continue; | |
1389 | Int_t isNegFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCStack,fInputEvent); | |
1390 | if(isNegFromMBHeader == 0 && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 3) continue; | |
1391 | if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE; | |
1392 | } | |
1393 | ||
1394 | if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->PhotonIsSelected(PhotonCandidate,fESDEvent)) continue; | |
1395 | ||
1396 | if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseElecSharingCut() && | |
1397 | !((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseToCloseV0sCut()){ // if no post reader loop is required add to events good gammas | |
1398 | ||
1399 | fGoodGammas->Add(PhotonCandidate); | |
1400 | if(fIsFromMBHeader){ | |
1401 | hESDConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt()); | |
1402 | hESDConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta()); | |
1403 | if( fDoMesonQA ) hESDConvGammaZR[fiCut]->Fill(PhotonCandidate->GetConversionZ(),PhotonCandidate->GetConversionRadius()); | |
1404 | } | |
1405 | if(fMCEvent){ | |
1406 | ProcessTruePhotonCandidates(PhotonCandidate); | |
1407 | } | |
1408 | } else if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseElecSharingCut()){ // if Shared Electron cut is enabled, Fill array, add to step one | |
1409 | ((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->FillElectonLabelArray(PhotonCandidate,nV0); | |
1410 | nV0++; | |
1411 | GoodGammasStepOne->Add(PhotonCandidate); | |
1412 | } else if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseElecSharingCut() && | |
1413 | ((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseToCloseV0sCut()){ // shared electron is disabled, step one not needed -> step two | |
1414 | GoodGammasStepTwo->Add(PhotonCandidate); | |
1415 | } | |
1416 | } | |
1417 | ||
1418 | ||
1419 | if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseElecSharingCut()){ | |
1420 | for(Int_t i = 0;i<GoodGammasStepOne->GetEntries();i++){ | |
1421 | AliAODConversionPhoton *PhotonCandidate= (AliAODConversionPhoton*) GoodGammasStepOne->At(i); | |
1422 | if(!PhotonCandidate) continue; | |
1423 | fIsFromMBHeader = kTRUE; | |
1424 | if(fMCEvent && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0){ | |
1425 | Int_t isPosFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCStack,fInputEvent); | |
1426 | Int_t isNegFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCStack,fInputEvent); | |
1427 | if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE; | |
1428 | } | |
1429 | ||
1430 | if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->RejectSharedElectronV0s(PhotonCandidate,i,GoodGammasStepOne->GetEntries())) continue; | |
1431 | if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseToCloseV0sCut()){ // To Colse v0s cut diabled, step two not needed | |
1432 | fGoodGammas->Add(PhotonCandidate); | |
1433 | ||
1434 | if(fIsFromMBHeader){ | |
1435 | hESDConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt()); | |
1436 | hESDConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta()); | |
1437 | if( fDoMesonQA )hESDConvGammaZR[fiCut]->Fill(PhotonCandidate->GetConversionZ(),PhotonCandidate->GetConversionRadius()); | |
1438 | } | |
1439 | ||
1440 | if(fMCEvent){ | |
1441 | ProcessTruePhotonCandidates(PhotonCandidate); | |
1442 | } | |
1443 | } else GoodGammasStepTwo->Add(PhotonCandidate); // Close v0s cut enabled -> add to list two | |
1444 | } | |
1445 | } | |
1446 | if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->UseToCloseV0sCut()){ | |
1447 | for(Int_t i = 0;i<GoodGammasStepTwo->GetEntries();i++){ | |
1448 | AliAODConversionPhoton* PhotonCandidate = (AliAODConversionPhoton*) GoodGammasStepTwo->At(i); | |
1449 | if(!PhotonCandidate) continue; | |
1450 | if(fMCEvent && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0){ | |
1451 | Int_t isPosFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelPositive(), fMCStack,fInputEvent); | |
1452 | Int_t isNegFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(PhotonCandidate->GetMCLabelNegative(), fMCStack,fInputEvent); | |
1453 | if( (isNegFromMBHeader+isPosFromMBHeader) != 4) fIsFromMBHeader = kFALSE; | |
1454 | } | |
1455 | if(!((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->RejectToCloseV0s(PhotonCandidate,GoodGammasStepTwo,i)) continue; | |
1456 | fGoodGammas->Add(PhotonCandidate); // Add gamma to current cut TList | |
1457 | ||
1458 | if(fIsFromMBHeader){ | |
1459 | hESDConvGammaPt[fiCut]->Fill(PhotonCandidate->Pt()); // Differences to old V0Reader in p_t due to conversion KF->TLorentzVector | |
1460 | hESDConvGammaEta[fiCut]->Fill(PhotonCandidate->Eta()); | |
1461 | if(fDoMesonQA)hESDConvGammaZR[fiCut]->Fill(PhotonCandidate->GetConversionZ(),PhotonCandidate->GetConversionRadius()); | |
1462 | } | |
1463 | ||
1464 | if(fMCEvent){ | |
1465 | ProcessTruePhotonCandidates(PhotonCandidate); | |
1466 | } | |
1467 | } | |
1468 | } | |
1469 | ||
1470 | delete GoodGammasStepOne; | |
1471 | GoodGammasStepOne = 0x0; | |
1472 | delete GoodGammasStepTwo; | |
1473 | GoodGammasStepTwo = 0x0; | |
2bb2434e | 1474 | } |
1475 | ||
1476 | //________________________________________________________________________ | |
1477 | void AliAnalysisTaskGammaConvDalitzV1::ProcessTruePhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate) | |
1478 | { | |
344100c4 | 1479 | // Process True Photons |
1480 | AliStack *MCStack = fMCEvent->Stack(); | |
1481 | TParticle *posDaughter = TruePhotonCandidate->GetPositiveMCDaughter(MCStack); | |
1482 | TParticle *negDaughter = TruePhotonCandidate->GetNegativeMCDaughter(MCStack); | |
1483 | ||
1484 | if(posDaughter == NULL || negDaughter == NULL) return; // One particle does not exist | |
1485 | if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){ // Not Same Mother == Combinatorial Bck | |
1486 | return; | |
1487 | } else if (posDaughter->GetMother(0) == -1){ | |
1488 | return; | |
1489 | } | |
1490 | ||
1491 | if(TMath::Abs(posDaughter->GetPdgCode())!=11 || TMath::Abs(negDaughter->GetPdgCode())!=11) return; //One Particle is not electron | |
1492 | if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()) return; // Same Charge | |
1493 | if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5) return;// check if the daughters come from a conversion | |
2bb2434e | 1494 | |
344100c4 | 1495 | TParticle *Photon = TruePhotonCandidate->GetMCParticle(MCStack); |
1496 | if(Photon->GetPdgCode() != 22) return; // Mother is no Photon | |
2bb2434e | 1497 | |
344100c4 | 1498 | // True Photon |
1499 | ||
1500 | Int_t labelGamma = TruePhotonCandidate->GetMCParticleLabel(MCStack); | |
1501 | ||
1502 | if( labelGamma < MCStack->GetNprimary() ){ | |
1503 | if( fIsFromMBHeader ){ | |
1504 | hESDTrueConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt()); | |
1505 | } | |
1506 | } else { | |
1507 | if( fIsFromMBHeader){ | |
1508 | hESDTrueSecConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt()); | |
1509 | } | |
ae947965 | 1510 | } |
344100c4 | 1511 | |
1512 | if( IsPi0DalitzDaughter(labelGamma) == kTRUE ) { | |
1513 | if( labelGamma < MCStack->GetNprimary() ) { | |
1514 | if( fIsFromMBHeader ){ | |
1515 | hESDTruePi0DalitzConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt()); | |
1516 | } | |
1517 | } else { | |
1518 | if( fIsFromMBHeader ) { | |
1519 | hESDTruePi0DalitzSecConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt()); | |
1520 | } | |
1521 | } | |
ae947965 | 1522 | } |
ccfa8c0d | 1523 | |
1524 | ||
2bb2434e | 1525 | } |
30b9a400 | 1526 | //________________________________________________________________________ |
1527 | void AliAnalysisTaskGammaConvDalitzV1::ProcessVirtualGammasCandidates(){ | |
344100c4 | 1528 | |
1529 | Double_t magField = fInputEvent->GetMagneticField(); | |
30b9a400 | 1530 | |
1531 | ||
344100c4 | 1532 | if( magField < 0.0 ){ |
1533 | magField = 1.0; | |
1534 | } | |
1535 | else { | |
1536 | magField = -1.0; | |
1537 | } | |
1538 | ||
1539 | AliStack *MCStack = 0x0; | |
1540 | ||
1541 | if( fMCEvent ){ | |
1542 | MCStack = fMCEvent->Stack(); | |
1543 | } | |
1544 | ||
1545 | ||
1546 | for(Int_t virtualGammaIndex=0; virtualGammaIndex < fGoodVirtualGammas->GetEntries(); virtualGammaIndex++ ){ | |
1547 | AliAODConversionPhoton *Vgamma=dynamic_cast<AliAODConversionPhoton*>(fGoodVirtualGammas->At(virtualGammaIndex)); | |
1548 | ||
1549 | AliESDtrack* positronVgamma = fESDEvent->GetTrack( Vgamma->GetTrackLabelPositive() ); | |
1550 | AliESDtrack* electronVgamma = fESDEvent->GetTrack( Vgamma->GetTrackLabelNegative() ); | |
1551 | ||
1552 | Bool_t isPhoton = kFALSE; | |
1553 | Bool_t isPi0Dalitz = kFALSE; | |
1554 | Bool_t isEtaDalitz = kFALSE; | |
1555 | Bool_t isJPsi = kFALSE; | |
1556 | Bool_t isTrueEposENeg = kFALSE; | |
1557 | Bool_t isMotherPrimary = kFALSE; | |
1558 | ||
1559 | Double_t psiPair = GetPsiPair(positronVgamma,electronVgamma); | |
1560 | Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronVgamma->GetConstrainedParam()->Phi()-positronVgamma->GetConstrainedParam()->Phi()); | |
1561 | ||
1562 | if ( fDoMesonQA ) { | |
1563 | ||
1564 | hESDEposEnegPsiPairDPhi[fiCut]->Fill(deltaPhi,psiPair); | |
1565 | hESDEposEnegInvMassPt[fiCut]->Fill(Vgamma->M(),Vgamma->Pt()); | |
1566 | ||
1567 | //cout<<"GetMass() "<<Vgamma->GetMass()<<" M "<<Vgamma->M()<<endl; | |
1568 | if( fMCEvent ) { | |
1569 | ||
1570 | Int_t virtualGammaMCLabel = Vgamma->GetMCParticleLabel(MCStack); | |
1571 | ||
1572 | TParticle * negativeMC = 0x0; | |
1573 | TParticle * positiveMC = 0x0; | |
1574 | TParticle * mcVgamma = 0x0; | |
1575 | ||
1576 | if( virtualGammaMCLabel != -1 ){ | |
1577 | mcVgamma = (TParticle*)MCStack->Particle(virtualGammaMCLabel); | |
1578 | } | |
1579 | ||
1580 | negativeMC = (TParticle*)Vgamma->GetNegativeMCDaughter(MCStack); | |
1581 | positiveMC = (TParticle*)Vgamma->GetPositiveMCDaughter(MCStack); | |
1582 | ||
1583 | ||
1584 | if( negativeMC && positiveMC ) { | |
1585 | if( positiveMC->GetPdgCode() == ::kPositron && negativeMC->GetPdgCode() == ::kElectron ) | |
1586 | isTrueEposENeg = kTRUE; | |
1587 | if( positiveMC->GetMother(0) > -1 && positiveMC->GetMother(0) < fMCStack->GetNprimary() ) | |
1588 | isMotherPrimary = kTRUE; | |
1589 | } | |
1590 | if(mcVgamma){ | |
1591 | // Check if it is a true photon | |
1592 | if(mcVgamma->GetPdgCode() == 22){ | |
1593 | isPhoton = kTRUE; | |
1594 | } else if(mcVgamma->GetPdgCode() == 443){ | |
1595 | isJPsi = kTRUE; | |
1596 | } else if( IsDalitz( mcVgamma ) ){ | |
1597 | if ( mcVgamma->GetPdgCode() == 111 ) isPi0Dalitz = kTRUE; | |
1598 | else if( mcVgamma->GetPdgCode() == 221 ) isEtaDalitz = kTRUE; | |
1599 | } | |
1600 | } | |
1601 | ||
1602 | if(isPhoton){ | |
1603 | hESDEposEnegTruePhotonInvMassPt[fiCut]->Fill(Vgamma->M(),Vgamma->Pt()); | |
1604 | hESDEposEnegTruePhotonPsiPairDPhi[fiCut]->Fill(deltaPhi,psiPair); | |
1605 | if( Vgamma->Pt() > 1.5 ){ | |
1606 | hESDEposEnegTruePhotonPsiPairDPhiPtCut[fiCut]->Fill(deltaPhi,psiPair); | |
1607 | } | |
1608 | } else if(isJPsi){ | |
1609 | hESDEposEnegTrueJPsiInvMassPt[fiCut]->Fill(Vgamma->M(),Vgamma->Pt()); | |
1610 | } else if(isPi0Dalitz){ | |
1611 | hESDEposEnegTruePi0DalitzInvMassPt[fiCut]->Fill(Vgamma->M(),Vgamma->Pt()); | |
1612 | hESDEposEnegTruePi0DalitzPsiPairDPhi[fiCut]->Fill(deltaPhi,psiPair); | |
1613 | if( isMotherPrimary ) hESDEposEnegTruePrimPi0DalitzInvMass[fiCut]->Fill( Vgamma->M() ); | |
1614 | } else if(isEtaDalitz){ | |
1615 | hESDEposEnegTrueEtaDalitzInvMassPt[fiCut]->Fill(Vgamma->M(),Vgamma->Pt()); | |
1616 | hESDEposEnegTrueEtaDalitzPsiPairDPhi[fiCut]->Fill(deltaPhi,psiPair); | |
1617 | if( isMotherPrimary ) hESDEposEnegTruePrimEtaDalitzInvMass[fiCut]->Fill( Vgamma->M() ); | |
1618 | } | |
1619 | ||
1620 | if( isTrueEposENeg ) hESDEposEnegTrueInvMassPt[fiCut]->Fill(Vgamma->M(), Vgamma->Pt()); | |
1621 | ||
1622 | } | |
1623 | } | |
1624 | } | |
30b9a400 | 1625 | } |
1626 | ||
2bb2434e | 1627 | //________________________________________________________________________ |
1628 | void AliAnalysisTaskGammaConvDalitzV1::ProcessElectronCandidates(){ | |
1629 | ||
344100c4 | 1630 | Double_t magField = fInputEvent->GetMagneticField(); |
2bb2434e | 1631 | |
344100c4 | 1632 | if( magField < 0.0 ){ |
1633 | magField = 1.0; | |
1634 | } else { | |
1635 | magField = -1.0; | |
ae947965 | 1636 | } |
a280ac15 | 1637 | |
344100c4 | 1638 | vector<Int_t> lGoodElectronIndexPrev(0); |
1639 | vector<Int_t> lGoodPositronIndexPrev(0); | |
78cea1d2 | 1640 | |
344100c4 | 1641 | for(UInt_t i = 0; i < fSelectorElectronIndex.size(); i++){ |
1642 | ||
1643 | AliESDtrack* electronCandidate = fESDEvent->GetTrack(fSelectorElectronIndex[i]); | |
1644 | ||
1645 | if( fMCEvent ) { | |
1646 | Int_t labelelectron = TMath::Abs( electronCandidate->GetLabel() ); | |
1647 | Int_t isMCFromMBHeader = -1; | |
1648 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0) { | |
1649 | isMCFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(labelelectron,fMCStack,fInputEvent); | |
1650 | if(isMCFromMBHeader == 0 && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 3) continue; | |
1651 | } | |
ae947965 | 1652 | } |
344100c4 | 1653 | |
1654 | if(! ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelected(electronCandidate) ) continue; | |
1655 | ||
1656 | lGoodElectronIndexPrev.push_back( fSelectorElectronIndex[i] ); | |
1657 | hESDDalitzElectronPt[fiCut]->Fill(electronCandidate->Pt()); | |
1658 | hESDDalitzElectronPhi[fiCut]->Fill(electronCandidate->Phi()); | |
1659 | ||
1660 | ||
1661 | if( fMCEvent ) { | |
1662 | ||
1663 | Int_t labelelectron = TMath::Abs( electronCandidate->GetLabel() ); | |
1664 | if( labelelectron < fMCStack->GetNtrack() ){ | |
1665 | TParticle* electron = fMCStack->Particle(labelelectron); | |
1666 | if( electron->GetPdgCode() == 11 ){ | |
1667 | if( labelelectron < fMCStack->GetNprimary() ){ | |
1668 | hESDTrueElectronPt[fiCut]->Fill(electronCandidate->Pt()); //primary electron | |
1669 | } else { | |
1670 | hESDTrueSecElectronPt[fiCut]->Fill(electronCandidate->Pt()); //secondary electron | |
1671 | } | |
1672 | if( IsPi0DalitzDaughter(labelelectron) == kTRUE ) { | |
1673 | if( labelelectron < fMCStack->GetNprimary() ) { | |
1674 | hESDTruePi0DalitzElectronPt[fiCut]->Fill(electronCandidate->Pt()); | |
1675 | } else { | |
1676 | hESDTruePi0DalitzSecElectronPt[fiCut]->Fill(electronCandidate->Pt()); | |
1677 | } | |
1678 | } | |
1679 | } | |
1680 | } | |
ae947965 | 1681 | } |
344100c4 | 1682 | } |
2bb2434e | 1683 | |
344100c4 | 1684 | for(UInt_t i = 0; i < fSelectorPositronIndex.size(); i++){ |
2bb2434e | 1685 | |
344100c4 | 1686 | AliESDtrack* positronCandidate = fESDEvent->GetTrack( fSelectorPositronIndex[i] ); |
1687 | ||
1688 | if( fMCEvent ) { | |
1689 | ||
1690 | Int_t labelpositron = TMath::Abs( positronCandidate->GetLabel() ); | |
1691 | Int_t isMCFromMBHeader = -1; | |
1692 | ||
1693 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0) { | |
1694 | isMCFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(labelpositron,fMCStack,fInputEvent); | |
1695 | if(isMCFromMBHeader == 0 && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 3) continue; | |
1696 | } | |
1697 | } | |
1698 | ||
1699 | if(! ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelected(positronCandidate) ) continue; | |
1700 | ||
1701 | lGoodPositronIndexPrev.push_back( fSelectorPositronIndex[i] ); | |
1702 | hESDDalitzPositronPt[fiCut]->Fill( positronCandidate->Pt() ); | |
1703 | hESDDalitzPositronPhi[fiCut]->Fill( positronCandidate->Phi() ); | |
1704 | ||
1705 | if( fMCEvent ) { | |
1706 | Int_t labelpositron = TMath::Abs( positronCandidate->GetLabel() ); | |
1707 | ||
1708 | if( labelpositron < fMCStack->GetNtrack() ) { | |
1709 | TParticle* positron = fMCStack->Particle(labelpositron); | |
1710 | if( positron->GetPdgCode() == -11 ){ | |
1711 | if( labelpositron < fMCStack->GetNprimary() ){ | |
1712 | hESDTruePositronPt[fiCut]->Fill(positronCandidate->Pt()); | |
1713 | } else { | |
1714 | hESDTrueSecPositronPt[fiCut]->Fill(positronCandidate->Pt()); | |
1715 | } | |
1716 | if( IsPi0DalitzDaughter(labelpositron) == kTRUE ) { | |
1717 | if( labelpositron < fMCStack->GetNprimary() ){ | |
1718 | hESDTruePi0DalitzPositronPt[fiCut]->Fill(positronCandidate->Pt()); | |
1719 | } else { | |
1720 | hESDTruePi0DalitzSecPositronPt[fiCut]->Fill(positronCandidate->Pt()); | |
1721 | } | |
1722 | } | |
1723 | } | |
1724 | } | |
1725 | } | |
1726 | } | |
fcc79cf5 | 1727 | |
344100c4 | 1728 | vector<Bool_t> lElectronPsiIndex(lGoodElectronIndexPrev.size(), kTRUE); |
1729 | vector<Bool_t> lPositronPsiIndex(lGoodPositronIndexPrev.size(), kTRUE); | |
fcc79cf5 | 1730 | |
344100c4 | 1731 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->DoPsiPairCut() == kTRUE ){ |
1732 | for( UInt_t i = 0; i < lGoodElectronIndexPrev.size(); i++ ) { | |
1733 | AliESDtrack *electronCandidate = fESDEvent->GetTrack(lGoodElectronIndexPrev[i]); | |
1734 | for(UInt_t j = 0; j < lGoodPositronIndexPrev.size(); j++){ | |
1735 | AliESDtrack *positronCandidate = fESDEvent->GetTrack(lGoodPositronIndexPrev[j]); | |
1736 | Double_t psiPair = GetPsiPair(positronCandidate,electronCandidate); | |
1737 | Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->GetConstrainedParam()->Phi()-positronCandidate->GetConstrainedParam()->Phi()); | |
fcc79cf5 | 1738 | |
344100c4 | 1739 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->IsFromGammaConversion(psiPair,deltaPhi ) ){ |
1740 | lElectronPsiIndex[i] = kFALSE; | |
1741 | lPositronPsiIndex[j] = kFALSE; | |
1742 | } | |
1743 | } | |
1744 | } | |
1745 | } | |
fcc79cf5 | 1746 | |
344100c4 | 1747 | vector<Int_t> lGoodElectronIndex(0); |
1748 | vector<Int_t> lGoodPositronIndex(0); | |
1749 | ||
1750 | for( UInt_t i = 0; i < lGoodElectronIndexPrev.size(); i++ ) { | |
1751 | if( lElectronPsiIndex[i] == kTRUE ) | |
1752 | lGoodElectronIndex.push_back( lGoodElectronIndexPrev[i] ); | |
1753 | } | |
2bb2434e | 1754 | |
344100c4 | 1755 | for( UInt_t i = 0; i < lGoodPositronIndexPrev.size(); i++ ) { |
1756 | if( lPositronPsiIndex[i] == kTRUE ) | |
1757 | lGoodPositronIndex.push_back( lGoodPositronIndexPrev[i] ); | |
1758 | } | |
2bb2434e | 1759 | |
344100c4 | 1760 | for(UInt_t i = 0; i < lGoodElectronIndex.size(); i++){ |
1761 | AliESDtrack *electronCandidate = fESDEvent->GetTrack(lGoodElectronIndex[i]); | |
1762 | AliKFParticle electronCandidateKF( *electronCandidate->GetConstrainedParam(), ::kElectron ); | |
1763 | TLorentzVector electronCandidateTLV; | |
1764 | electronCandidateTLV.SetXYZM(electronCandidate->GetConstrainedParam()->Px(),electronCandidate->GetConstrainedParam()->Py(),electronCandidate->GetConstrainedParam()->Pz(),TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass()); | |
1765 | ||
2bb2434e | 1766 | |
344100c4 | 1767 | for(UInt_t j = 0; j < lGoodPositronIndex.size(); j++){ |
2bb2434e | 1768 | |
344100c4 | 1769 | AliESDtrack *positronCandidate = fESDEvent->GetTrack(lGoodPositronIndex[j]); |
1770 | AliKFParticle positronCandidateKF( *positronCandidate->GetConstrainedParam(), ::kPositron ); | |
1771 | TLorentzVector positronCandidateTLV; | |
1772 | ||
1773 | positronCandidateTLV.SetXYZM(positronCandidate->GetConstrainedParam()->Px(),positronCandidate->GetConstrainedParam()->Py(),positronCandidate->GetConstrainedParam()->Pz(),TDatabasePDG::Instance()->GetParticle( ::kPositron )->Mass()); | |
1774 | TLorentzVector *virtualPhotonTLV = 0; | |
1775 | AliKFConversionPhoton* virtualPhoton = NULL; | |
1776 | AliAODConversionPhoton *vphoton; | |
1777 | ||
1778 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetUseElectronMCSmearing() && ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->UseMCPSmearing() && fMCEvent){ | |
1779 | TLorentzVector smearelectronCandidateTLV = ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->SmearElectron(electronCandidateTLV); | |
1780 | TLorentzVector smearpositronCandidateTLV = ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->SmearElectron(positronCandidateTLV); | |
1781 | virtualPhotonTLV = new TLorentzVector( smearelectronCandidateTLV + smearpositronCandidateTLV ); | |
1782 | //TLorentzVector temp = electronCandidateTLV + positronCandidateTLV; | |
1783 | //cout<<"Mass: "<<"NoSmearElectrons "<<temp.M() <<" SmearElectrons "<<virtualPhotonTLV->M()<<endl; | |
1784 | vphoton= new AliAODConversionPhoton(virtualPhotonTLV); | |
1785 | vphoton->SetMass(virtualPhotonTLV->M()); | |
1786 | } else { | |
1787 | virtualPhoton = new AliKFConversionPhoton(electronCandidateKF,positronCandidateKF); | |
1788 | if( fSetProductionVertextoVGamma == kTRUE ){ | |
1789 | AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex()); | |
1790 | primaryVertexImproved+=*virtualPhoton; | |
1791 | virtualPhoton->SetProductionVertex(primaryVertexImproved); | |
1792 | } | |
7ab8e97e | 1793 | |
344100c4 | 1794 | vphoton= new AliAODConversionPhoton(virtualPhoton); |
1795 | } | |
1796 | //virtualPhoton->SetTrackLabels( lGoodPositronIndex[j], lGoodElectronIndex[i]); | |
1797 | vphoton->SetTrackLabels( lGoodPositronIndex[j], lGoodElectronIndex[i]); | |
1798 | ||
1799 | if( fMCEvent ) { | |
1800 | Int_t labeln=TMath::Abs(electronCandidate->GetLabel()); | |
1801 | Int_t labelp=TMath::Abs(positronCandidate->GetLabel()); | |
1802 | TParticle *fNegativeMCParticle = fMCStack->Particle(labeln); | |
1803 | TParticle *fPositiveMCParticle = fMCStack->Particle(labelp); | |
1804 | if( fPositiveMCParticle && fNegativeMCParticle) { | |
1805 | //virtualPhoton->SetMCLabelPositive(labelp); | |
1806 | //virtualPhoton->SetMCLabelNegative(labeln); | |
1807 | vphoton->SetMCLabelPositive(labelp); | |
1808 | vphoton->SetMCLabelNegative(labeln); | |
1809 | ||
1810 | } | |
1811 | } | |
1812 | ||
1813 | ||
1814 | fGoodVirtualGammas->Add( vphoton ); | |
1815 | ||
1816 | if( virtualPhoton ){ | |
1817 | delete virtualPhoton; | |
1818 | virtualPhoton=NULL; | |
1819 | } | |
1820 | if ( virtualPhotonTLV ){ | |
1821 | delete virtualPhotonTLV; | |
1822 | virtualPhotonTLV=NULL; | |
1823 | } | |
1824 | ||
7ab8e97e | 1825 | } |
344100c4 | 1826 | } |
1827 | ||
1828 | //Computing mixing event | |
1829 | if( fDoMesonQA ) { | |
1830 | for(UInt_t i = 0; i < lGoodElectronIndex.size(); i++){ | |
1831 | AliESDtrack *electronCandidate1 = fESDEvent->GetTrack(lGoodElectronIndex[i]); | |
1832 | AliKFParticle electronCandidate1KF( *electronCandidate1->GetConstrainedParam(), ::kElectron ); | |
1833 | ||
1834 | for(UInt_t j = i+1; j < lGoodElectronIndex.size(); j++){ | |
1835 | ||
1836 | AliESDtrack *electronCandidate2 = fESDEvent->GetTrack(lGoodElectronIndex[j]); | |
1837 | AliKFParticle electronCandidate2KF( *electronCandidate2->GetConstrainedParam(), ::kElectron ); | |
1838 | AliKFConversionPhoton* virtualPhoton = new AliKFConversionPhoton(electronCandidate1KF,electronCandidate2KF); | |
1839 | ||
1840 | //AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex()); | |
1841 | //primaryVertexImproved+=*virtualPhoton; | |
1842 | //virtualPhoton->SetProductionVertex(primaryVertexImproved); | |
1843 | ||
1844 | AliAODConversionPhoton *vphoton = new AliAODConversionPhoton(virtualPhoton); | |
1845 | hESDEposEnegLikeSignBackInvMassPt[fiCut]->Fill(vphoton->M(),vphoton->Pt()); | |
1846 | delete vphoton; | |
1847 | delete virtualPhoton; | |
1848 | vphoton = 0x0; | |
1849 | virtualPhoton = 0x0; | |
1850 | } | |
1851 | } | |
1852 | ||
1853 | ||
1854 | for(UInt_t i = 0; i < lGoodPositronIndex.size(); i++){ | |
1855 | AliESDtrack *positronCandidate1 = fESDEvent->GetTrack(lGoodPositronIndex[i]); | |
1856 | AliKFParticle positronCandidate1KF( *positronCandidate1->GetConstrainedParam(), ::kPositron ); | |
1857 | ||
1858 | for(UInt_t j = i+1; j < lGoodPositronIndex.size(); j++){ | |
1859 | ||
1860 | AliESDtrack *positronCandidate2 = fESDEvent->GetTrack(lGoodPositronIndex[j]); | |
1861 | AliKFParticle positronCandidate2KF( *positronCandidate2->GetConstrainedParam(), ::kPositron ); | |
1862 | AliKFConversionPhoton* virtualPhoton = new AliKFConversionPhoton(positronCandidate1KF,positronCandidate2KF); | |
1863 | //AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex()); | |
1864 | //primaryVertexImproved+=*virtualPhoton; | |
1865 | //virtualPhoton->SetProductionVertex(primaryVertexImproved); | |
1866 | ||
1867 | AliAODConversionPhoton *vphoton = new AliAODConversionPhoton(virtualPhoton); | |
1868 | hESDEposEnegLikeSignBackInvMassPt[fiCut]->Fill(vphoton->M(),vphoton->Pt()); | |
1869 | delete vphoton; | |
1870 | delete virtualPhoton; | |
1871 | vphoton = 0x0; | |
1872 | virtualPhoton = 0x0; | |
1873 | ||
1874 | } | |
1875 | } | |
1876 | } | |
2bb2434e | 1877 | } |
1878 | ||
1879 | //________________________________________________________________________ | |
1880 | void AliAnalysisTaskGammaConvDalitzV1::CalculatePi0DalitzCandidates(){ | |
1881 | ||
344100c4 | 1882 | // Conversion Gammas |
1883 | if( fGoodGammas->GetEntries() > 0 && fGoodVirtualGammas->GetEntries() > 0 ){ | |
1884 | vector<Bool_t> lGoodVirtualGamma(fGoodVirtualGammas->GetEntries(), kFALSE); | |
1885 | ||
1886 | for(Int_t GammaIndex=0; GammaIndex<fGoodGammas->GetEntries(); GammaIndex++){ | |
1887 | AliAODConversionPhoton *gamma=dynamic_cast<AliAODConversionPhoton*>(fGoodGammas->At(GammaIndex)); | |
1888 | if (gamma==NULL) continue; | |
1889 | for(Int_t virtualGammaIndex=0;virtualGammaIndex<fGoodVirtualGammas->GetEntries();virtualGammaIndex++){ | |
1890 | AliAODConversionPhoton *Vgamma=dynamic_cast<AliAODConversionPhoton*>(fGoodVirtualGammas->At(virtualGammaIndex)); | |
1891 | if (Vgamma==NULL) continue; | |
1892 | //Check for same Electron ID | |
1893 | if(gamma->GetTrackLabelPositive() == Vgamma->GetTrackLabelPositive() || | |
1894 | gamma->GetTrackLabelNegative() == Vgamma->GetTrackLabelNegative() || | |
1895 | gamma->GetTrackLabelNegative() == Vgamma->GetTrackLabelPositive() || | |
1896 | gamma->GetTrackLabelPositive() == Vgamma->GetTrackLabelNegative() ) continue; | |
1897 | ||
1898 | AliAODConversionMother *pi0cand = new AliAODConversionMother(gamma,Vgamma); | |
1899 | pi0cand->SetLabels(GammaIndex,virtualGammaIndex); | |
1900 | ||
1901 | ||
1902 | if( ( ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelected(pi0cand,kTRUE,((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift())) ){ | |
1903 | ||
1904 | //cout<< "Meson Accepted "<<endl; | |
1905 | ||
1906 | Int_t zbin= fBGHandler[fiCut]->GetZBinIndex(fESDEvent->GetPrimaryVertex()->GetZ()); | |
1907 | Int_t mbin = 0; | |
1908 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->UseTrackMultiplicity() ){ | |
1909 | mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fNumberOfESDTracks); | |
1910 | } else { | |
1911 | mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fGoodGammas->GetEntries()); | |
1912 | } | |
1913 | ||
1914 | if ( fDoMesonQA ) { | |
1915 | hESDEposEnegInvMassPi0Pt[fiCut]->Fill( Vgamma->M(), pi0cand->Pt() ); | |
1916 | if( pi0cand->M() > 0.1 && pi0cand->M() < 0.145 ){ | |
1917 | hESDEposEnegAfterMassCutInvMassPi0Pt[fiCut]->Fill(Vgamma->M(),pi0cand->Pt()); | |
1918 | } | |
1919 | } | |
1920 | ||
1921 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoMassCut() == kTRUE ) { | |
1922 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->MassCut( pi0cand->Pt() , Vgamma->M() ) == kTRUE ){ | |
1923 | ||
1924 | hESDMotherInvMassPt[fiCut]->Fill(pi0cand->M(),pi0cand->Pt()); | |
1925 | Double_t sparesFill[4] = {pi0cand->M(),pi0cand->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
1926 | sESDMotherInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
1927 | ||
1928 | if ( fDoMesonQA ) { | |
1929 | hESDMotherPhi[fiCut]->Fill(pi0cand->Phi()); | |
1930 | if( lGoodVirtualGamma[virtualGammaIndex] == kFALSE ) { | |
1931 | ||
1932 | FillElectronQAHistos(Vgamma); | |
1933 | ||
1934 | lGoodVirtualGamma[virtualGammaIndex] = kTRUE; | |
1935 | fNVirtualGammas++; | |
1936 | } | |
1937 | } | |
1938 | } | |
1939 | } else { | |
1940 | hESDMotherInvMassPt[fiCut]->Fill(pi0cand->M(),pi0cand->Pt()); | |
1941 | Double_t sparesFill[4] = {pi0cand->M(),pi0cand->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
1942 | sESDMotherInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
1943 | ||
1944 | if ( fDoMesonQA ) { | |
1945 | hESDMotherPhi[fiCut]->Fill(pi0cand->Phi()); | |
1946 | if( lGoodVirtualGamma[virtualGammaIndex] == kFALSE ) { | |
1947 | FillElectronQAHistos(Vgamma); | |
1948 | lGoodVirtualGamma[virtualGammaIndex] = kTRUE; | |
1949 | fNVirtualGammas++; | |
1950 | } | |
1951 | } | |
1952 | } | |
1953 | ||
1954 | if( fDoChicAnalysis) { | |
1955 | ||
1956 | hESDPi0MotherInvMassPt[fiCut]->Fill(pi0cand->M(),pi0cand->Pt()); | |
1957 | Double_t diffMass = pi0cand->M() - Vgamma->M(); | |
1958 | hESDPi0MotherDiffInvMassPt[fiCut]->Fill( diffMass , pi0cand->Pt() ); | |
1959 | ||
1960 | if( Vgamma->M() > 2.5 && Vgamma->M() < 3.4){ | |
1961 | hESDPi0MotherDiffLimInvMassPt[fiCut]->Fill( diffMass , pi0cand->Pt() ); | |
1962 | } | |
1963 | } | |
1964 | ||
1965 | if(fMCEvent){ | |
1966 | ProcessTrueMesonCandidates(pi0cand,gamma,Vgamma); | |
1967 | } | |
1968 | } | |
1969 | delete pi0cand; | |
1970 | pi0cand=0x0; | |
1971 | } | |
fcc79cf5 | 1972 | } |
344100c4 | 1973 | } |
2bb2434e | 1974 | } |
1975 | ||
1976 | //________________________________________________________________________ | |
1977 | void AliAnalysisTaskGammaConvDalitzV1::CalculateBackground(){ | |
1978 | ||
344100c4 | 1979 | Int_t zbin= fBGHandler[fiCut]->GetZBinIndex(fESDEvent->GetPrimaryVertex()->GetZ()); |
1980 | Int_t mbin = 0; | |
2bb2434e | 1981 | |
344100c4 | 1982 | Int_t method = 0; |
2bb2434e | 1983 | |
344100c4 | 1984 | method = ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->GetBKGMethod(); |
2bb2434e | 1985 | |
344100c4 | 1986 | if(((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->UseTrackMultiplicity()){ |
1987 | mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fNumberOfESDTracks); | |
1988 | } else { | |
1989 | mbin = fBGHandler[fiCut]->GetMultiplicityBinIndex(fGoodGammas->GetEntries()); | |
1990 | } | |
2bb2434e | 1991 | |
344100c4 | 1992 | if( method == 1 || method == 2 ) { |
2bb2434e | 1993 | |
344100c4 | 1994 | AliGammaConversionAODBGHandler::GammaConversionVertex *bgEventVertex = NULL; |
8a52eed5 | 1995 | |
344100c4 | 1996 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->UseTrackMultiplicity() ) { |
1997 | for(Int_t nEventsInBG=0;nEventsInBG<fBGHandler[fiCut]->GetNBGEvents();nEventsInBG++){ | |
a280ac15 | 1998 | |
344100c4 | 1999 | AliGammaConversionAODVector *previousEventV0s = fBGHandler[fiCut]->GetBGGoodV0s(zbin,mbin,nEventsInBG); |
2000 | if(fMoveParticleAccordingToVertex == kTRUE && method == 1){ | |
2001 | bgEventVertex = fBGHandler[fiCut]->GetBGEventVertex(zbin,mbin,nEventsInBG); | |
2002 | } | |
a280ac15 | 2003 | |
344100c4 | 2004 | for(Int_t iCurrent=0;iCurrent<fGoodVirtualGammas->GetEntries();iCurrent++){ |
2005 | AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fGoodVirtualGammas->At(iCurrent)); | |
2bb2434e | 2006 | |
344100c4 | 2007 | for(UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){ |
2008 | AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious))); | |
2bb2434e | 2009 | |
344100c4 | 2010 | if(fMoveParticleAccordingToVertex == kTRUE && method == 1 ){ |
2011 | MoveParticleAccordingToVertex(&previousGoodV0,bgEventVertex); | |
2012 | } | |
2bb2434e | 2013 | |
344100c4 | 2014 | AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(¤tEventGoodV0,&previousGoodV0); |
2015 | ||
2016 | if( ( ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE, ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift()))){ | |
2017 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoMassCut() == kTRUE ) { | |
2018 | ||
2019 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->MassCut( backgroundCandidate->Pt() , currentEventGoodV0.M() ) == kTRUE ){ | |
2020 | ||
2021 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2022 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2023 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2024 | } | |
2025 | } else { | |
2026 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2027 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2028 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2029 | } | |
2030 | } | |
2031 | delete backgroundCandidate; | |
2032 | backgroundCandidate = 0x0; | |
2033 | } | |
2034 | } | |
2035 | } | |
2036 | } else { | |
2037 | for(Int_t nEventsInBG=0;nEventsInBG <fBGHandler[fiCut]->GetNBGEvents();nEventsInBG++){ | |
2038 | AliGammaConversionAODVector *previousEventV0s = fBGHandler[fiCut]->GetBGGoodV0s(zbin,mbin,nEventsInBG); | |
2039 | if(previousEventV0s){ | |
2040 | if(fMoveParticleAccordingToVertex == kTRUE && method == 1){ | |
2041 | bgEventVertex = fBGHandler[fiCut]->GetBGEventVertex(zbin,mbin,nEventsInBG); | |
2042 | } | |
2043 | for(Int_t iCurrent=0;iCurrent<fGoodVirtualGammas->GetEntries();iCurrent++){ | |
2044 | AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fGoodVirtualGammas->At(iCurrent)); | |
2045 | for(UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){ | |
2046 | AliAODConversionPhoton previousGoodV0 = (AliAODConversionPhoton)(*(previousEventV0s->at(iPrevious))); | |
2047 | if(fMoveParticleAccordingToVertex == kTRUE && method ==1){ | |
2048 | MoveParticleAccordingToVertex(&previousGoodV0,bgEventVertex); | |
2049 | } | |
2050 | ||
2051 | AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(¤tEventGoodV0,&previousGoodV0); | |
2052 | if((((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE,((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift()))){ | |
2053 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoMassCut() == kTRUE ) { | |
2054 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->MassCut( backgroundCandidate->Pt() , currentEventGoodV0.M() ) == kTRUE ){ | |
2055 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2056 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2057 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2058 | } | |
2059 | } else { | |
2060 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2061 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2062 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2063 | } | |
2064 | } | |
2065 | delete backgroundCandidate; | |
2066 | backgroundCandidate = 0x0; | |
2067 | } | |
2068 | } | |
2069 | } | |
ae947965 | 2070 | } |
344100c4 | 2071 | } |
2072 | } else if( method == 3 ){ | |
2073 | for(Int_t iCurrent=0;iCurrent<fGoodVirtualGammas->GetEntries();iCurrent++){ | |
2074 | AliAODConversionPhoton currentEventGoodV0 = *(AliAODConversionPhoton*)(fGoodVirtualGammas->At(iCurrent)); | |
2bb2434e | 2075 | |
344100c4 | 2076 | for(Int_t iPrevious=0;iPrevious<fGammasPool[fiCut]->GetEntries();iPrevious++){ |
2077 | AliAODConversionPhoton previousGoodV0 = *(AliAODConversionPhoton*)((fGammasPool[fiCut]->At(iPrevious) )); | |
2078 | AliAODConversionMother *backgroundCandidate = new AliAODConversionMother(¤tEventGoodV0,&previousGoodV0); | |
2079 | ||
2080 | if((((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelected(backgroundCandidate,kFALSE, ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift()))){ | |
2081 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoMassCut() == kTRUE ) { | |
2082 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->MassCut( backgroundCandidate->Pt() , currentEventGoodV0.M() ) == kTRUE ){ | |
2083 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2084 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2085 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2086 | } | |
2087 | } else { | |
2088 | hESDMotherBackInvMassPt[fiCut]->Fill(backgroundCandidate->M(),backgroundCandidate->Pt()); | |
2089 | Double_t sparesFill[4] = {backgroundCandidate->M(),backgroundCandidate->Pt(),(Double_t)zbin,(Double_t)mbin}; | |
2090 | sESDMotherBackInvMassPtZM[fiCut]->Fill(sparesFill,1); | |
2091 | } | |
2092 | } | |
2093 | delete backgroundCandidate; | |
2094 | backgroundCandidate = 0x0; | |
2095 | } | |
2096 | } | |
2097 | } | |
2bb2434e | 2098 | } |
344100c4 | 2099 | |
2bb2434e | 2100 | //________________________________________________________________________ |
2101 | void AliAnalysisTaskGammaConvDalitzV1::UpdateEventByEventData(){ | |
344100c4 | 2102 | //see header file for documentation |
a280ac15 | 2103 | |
344100c4 | 2104 | Int_t method = 0; |
a280ac15 | 2105 | |
344100c4 | 2106 | method = ( (AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetBKGMethod(); |
2107 | ||
2108 | if( method == 1 ) { | |
2109 | if(fGoodGammas->GetEntries() > 0 ){ | |
2110 | if( ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->UseTrackMultiplicity() ){ | |
2111 | fBGHandler[fiCut]->AddEvent(fGoodGammas,fESDEvent->GetPrimaryVertex()->GetX(),fESDEvent->GetPrimaryVertex()->GetY(),fESDEvent->GetPrimaryVertex()->GetZ(),fNumberOfESDTracks); | |
2112 | } else { // means we use #V0s for multiplicity | |
2113 | fBGHandler[fiCut]->AddEvent(fGoodGammas,fESDEvent->GetPrimaryVertex()->GetX(),fESDEvent->GetPrimaryVertex()->GetY(),fESDEvent->GetPrimaryVertex()->GetZ(),fGoodGammas->GetEntries()); | |
2114 | } | |
2115 | } | |
2116 | } else if ( method == 2 ){ | |
2117 | if(fGoodVirtualGammas->GetEntries() > 0 ){ | |
2118 | if(((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->UseTrackMultiplicity()){ | |
2119 | fBGHandler[fiCut]->AddEvent(fGoodVirtualGammas,fESDEvent->GetPrimaryVertex()->GetX(),fESDEvent->GetPrimaryVertex()->GetY(),fESDEvent->GetPrimaryVertex()->GetZ(),fNumberOfESDTracks); | |
2120 | } else { // means we use #V0s for multiplicity | |
2121 | fBGHandler[fiCut]->AddEvent(fGoodVirtualGammas,fESDEvent->GetPrimaryVertex()->GetX(),fESDEvent->GetPrimaryVertex()->GetY(),fESDEvent->GetPrimaryVertex()->GetZ(),fGoodVirtualGammas->GetEntries()); | |
2122 | } | |
2123 | } | |
2124 | } else if ( method == 3 ) { | |
2125 | for(Int_t index = 0; index < fGoodGammas->GetEntries(); index++){ | |
2126 | if ( fGammasPool[fiCut]->GetEntries() > ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->NumberOfRotationEvents() ){ | |
2127 | fGammasPool[fiCut]->RemoveLast(); | |
2128 | } | |
2129 | fGammasPool[fiCut]->AddFirst( new AliAODConversionPhoton(*(AliAODConversionPhoton*)(fGoodGammas->At(index)) ) ); | |
2130 | } | |
2131 | } | |
2bb2434e | 2132 | } |
344100c4 | 2133 | |
2bb2434e | 2134 | //______________________________________________________________________ |
2135 | void AliAnalysisTaskGammaConvDalitzV1::ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate) | |
2136 | { | |
2137 | ||
344100c4 | 2138 | // Process True Mesons |
2139 | AliStack *MCStack = fMCEvent->Stack(); | |
2140 | if( TrueGammaCandidate->GetV0Index()<fESDEvent->GetNumberOfV0s() ){ | |
2141 | //cout<<"Entro True Meson"<<endl; | |
2142 | ||
2143 | Bool_t isTruePi0 = kFALSE; | |
2144 | Bool_t isTrueEta = kFALSE; | |
2145 | Bool_t massCutAccept = kFALSE; | |
2146 | //Bool_t isTrueChiC = kFALSE; | |
2147 | Int_t gammaMCLabel = TrueGammaCandidate->GetMCParticleLabel(MCStack); | |
2148 | Int_t gammaMotherLabel = -1; | |
2149 | ||
2150 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoMassCut() == kTRUE ) { | |
2151 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->MassCut( Pi0Candidate->Pt() , TrueVirtualGammaCandidate->M() ) == kTRUE ){ | |
2152 | massCutAccept = kTRUE; | |
2153 | } | |
2154 | } else { | |
2155 | massCutAccept = kTRUE; | |
2156 | } | |
2157 | ||
2158 | if(gammaMCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother | |
2159 | // Daughters Gamma 0 | |
2160 | TParticle * negativeMC = (TParticle*)TrueGammaCandidate->GetNegativeMCDaughter(MCStack); | |
2161 | TParticle * positiveMC = (TParticle*)TrueGammaCandidate->GetPositiveMCDaughter(MCStack); | |
2162 | TParticle * gammaMC = (TParticle*)MCStack->Particle(gammaMCLabel); | |
2163 | ||
2164 | if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){ // Electrons ... | |
2165 | if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ... | |
2166 | if(gammaMC->GetPdgCode() == 22){ // ... with Gamma Mother | |
2167 | gammaMotherLabel=gammaMC->GetFirstMother(); | |
2168 | } | |
2169 | } | |
2170 | } | |
2171 | } | |
2bb2434e | 2172 | |
2bb2434e | 2173 | |
344100c4 | 2174 | Int_t virtualGammaMCLabel = TrueVirtualGammaCandidate->GetMCParticleLabel(MCStack); |
2175 | Int_t virtualGammaMotherLabel = -1; | |
2176 | Int_t virtualGamma = 1; | |
2177 | Int_t virtualGammaGrandMotherLabel =-1; | |
a280ac15 | 2178 | |
2179 | ||
344100c4 | 2180 | if(virtualGammaMCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother |
2181 | // Daughters Gamma 1 | |
2182 | TParticle * negativeMC = (TParticle*)TrueVirtualGammaCandidate->GetNegativeMCDaughter(MCStack); | |
2183 | TParticle * positiveMC = (TParticle*)TrueVirtualGammaCandidate->GetPositiveMCDaughter(MCStack); | |
2184 | TParticle * virtualGammaMotherMC = (TParticle*)MCStack->Particle(virtualGammaMCLabel); | |
ae947965 | 2185 | |
344100c4 | 2186 | if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){ // Electrons ... |
2bb2434e | 2187 | |
344100c4 | 2188 | if( virtualGammaMotherMC->GetPdgCode() != 22 ){ |
2189 | virtualGammaMotherLabel=virtualGammaMCLabel; | |
2190 | if(virtualGammaMotherMC->GetPdgCode() == 443){ | |
2191 | virtualGammaGrandMotherLabel=virtualGammaMotherMC->GetFirstMother(); | |
2192 | } | |
2193 | } else if (negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ... | |
2194 | virtualGammaMotherLabel=virtualGammaMotherMC->GetFirstMother(); | |
2195 | virtualGamma = 0; //no virtual gamma | |
2196 | } | |
2197 | } | |
2198 | } | |
2bb2434e | 2199 | |
2bb2434e | 2200 | |
344100c4 | 2201 | if(gammaMotherLabel >= 0 && ( gammaMotherLabel == virtualGammaMotherLabel) ){ |
2202 | if(((TParticle*)MCStack->Particle(virtualGammaMotherLabel))->GetPdgCode() == 111){ | |
2203 | isTruePi0=kTRUE; | |
2204 | } | |
2205 | if(((TParticle*)MCStack->Particle(virtualGammaMotherLabel))->GetPdgCode() == 221){ | |
2206 | isTrueEta=kTRUE; | |
2207 | } | |
2208 | } | |
2bb2434e | 2209 | |
344100c4 | 2210 | if( fDoChicAnalysis) { |
2211 | if(gammaMotherLabel>=0 && ( gammaMotherLabel == virtualGammaGrandMotherLabel) ){ | |
2212 | if(((TParticle*)MCStack->Particle(virtualGammaGrandMotherLabel))->GetPdgCode() == 445 || | |
2213 | ((TParticle*)MCStack->Particle(virtualGammaGrandMotherLabel))->GetPdgCode() == 10443 || | |
2214 | ((TParticle*)MCStack->Particle(virtualGammaGrandMotherLabel))->GetPdgCode() == 20443 ){ | |
2215 | ||
2216 | hESDTrueMotherChiCInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); | |
2217 | hESDTrueMotherChiCDiffInvMassPt[fiCut]->Fill(Pi0Candidate->M()-TrueVirtualGammaCandidate->M(),Pi0Candidate->Pt()); | |
2218 | } | |
2219 | } | |
2220 | } | |
a280ac15 | 2221 | |
344100c4 | 2222 | if( ( isTruePi0 || isTrueEta) && massCutAccept ){ // True Pion or Eta |
2223 | if ( virtualGamma == 1 ) { //True Dalitz | |
2224 | Float_t weighted= 1; | |
2225 | ||
2226 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2227 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCStack,fInputEvent)){ | |
2228 | if (((TParticle*)MCStack->Particle(gammaMotherLabel))->Pt()>0.005){ | |
2229 | weighted= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gammaMotherLabel,fMCStack,fInputEvent); | |
2230 | } | |
2231 | } | |
2232 | } | |
a280ac15 | 2233 | |
344100c4 | 2234 | hESDTrueMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); |
2235 | hESDTrueMotherDalitzInvMassPt[fiCut]->Fill( TrueVirtualGammaCandidate->M(),Pi0Candidate->Pt(),weighted); | |
2bb2434e | 2236 | |
344100c4 | 2237 | if(gammaMotherLabel < MCStack->GetNprimary()){ // Only primary pi0 for efficiency calculation |
2238 | hESDTruePrimaryMotherInvMassPt[fiCut]->Fill( Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); | |
2239 | hESDTruePrimaryMotherW0WeightingInvMassPt[fiCut]->Fill( Pi0Candidate->M(), Pi0Candidate->Pt() ); | |
2240 | ||
2241 | hESDTruePrimaryMotherInvMassMCPt[fiCut]->Fill(Pi0Candidate->M(),((TParticle*)MCStack->Particle(virtualGammaMotherLabel))->Pt(),weighted); | |
2242 | if(isTruePi0){ // Only primaries for unfolding | |
2243 | hESDTruePrimaryPi0DalitzESDPtMCPt[fiCut]->Fill(Pi0Candidate->Pt(),((TParticle*)MCStack->Particle(virtualGammaMotherLabel))->Pt(),weighted); | |
2244 | } | |
2245 | } else { // Secondary Meson | |
2246 | Float_t weightedSec= 1; | |
2247 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2248 | Int_t secMotherLabel = ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetMother(0); | |
2249 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCStack, fInputEvent) && MCStack->Particle(gammaMotherLabel)->GetPdgCode()==310){ | |
2250 | weightedSec= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt | |
2251 | } | |
2252 | } | |
2253 | hESDTrueSecondaryMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); | |
2254 | } | |
2255 | } else if ( virtualGamma == 0 ){ | |
2256 | Float_t weighted= 1; | |
2257 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2258 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCStack,fInputEvent)){ | |
2259 | if (((TParticle*)MCStack->Particle(gammaMotherLabel))->Pt()>0.005){ | |
2260 | weighted= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gammaMotherLabel,fMCStack,fInputEvent); | |
2261 | } | |
2262 | } | |
2263 | } | |
2264 | hESDTrueMotherPi0GGInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); // Pi0 from GG | |
2265 | if( gammaMotherLabel < MCStack->GetNprimary() ){ | |
2266 | hESDTruePrimaryMotherPi0GGInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); | |
2267 | } else { | |
2268 | Float_t weightedSec= 1; | |
2269 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2270 | Int_t secMotherLabel = ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetMother(0); | |
2271 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(gammaMotherLabel, fMCStack, fInputEvent) && MCStack->Particle(gammaMotherLabel)->GetPdgCode()==310){ | |
2272 | weightedSec= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt | |
2273 | } | |
2274 | } | |
2275 | hESDTrueSecondaryMotherPi0GGInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); | |
2276 | } | |
2277 | } | |
2278 | } | |
2bb2434e | 2279 | |
344100c4 | 2280 | if(!isTruePi0 && !isTrueEta && massCutAccept ){ // Background |
2281 | if(gammaMotherLabel>-1 && virtualGammaMotherLabel>-1 && virtualGamma == 0){ // Both Tracks are Photons and have a mother but not Pi0 or Eta | |
2282 | hESDTrueBckGGInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); | |
2283 | } else { // No photon or without mother | |
2284 | hESDTrueBckContInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); | |
2285 | } | |
2286 | } | |
ae947965 | 2287 | } |
2bb2434e | 2288 | } |
0f8c33c1 | 2289 | |
2290 | ||
2bb2434e | 2291 | //________________________________________________________________________ |
2292 | void AliAnalysisTaskGammaConvDalitzV1::MoveParticleAccordingToVertex(AliAODConversionPhoton* particle,const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex){ | |
2293 | //see header file for documentation | |
2294 | ||
344100c4 | 2295 | Double_t dx = vertex->fX - fESDEvent->GetPrimaryVertex()->GetX(); |
2296 | Double_t dy = vertex->fY - fESDEvent->GetPrimaryVertex()->GetY(); | |
2297 | Double_t dz = vertex->fZ - fESDEvent->GetPrimaryVertex()->GetZ(); | |
2bb2434e | 2298 | |
344100c4 | 2299 | Double_t movedPlace[3] = {particle->GetConversionX() - dx,particle->GetConversionY() - dy,particle->GetConversionZ() - dz}; |
2300 | particle->SetConversionPoint(movedPlace); | |
2bb2434e | 2301 | } |
2302 | ||
2303 | ||
2304 | //________________________________________________________________________ | |
2305 | void AliAnalysisTaskGammaConvDalitzV1::CountESDTracks(){ | |
2306 | ||
344100c4 | 2307 | // Using standard function for setting Cuts |
2308 | Bool_t selectPrimaries=kTRUE; | |
2309 | AliESDtrackCuts *EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(selectPrimaries); | |
2310 | EsdTrackCuts->SetMaxDCAToVertexZ(2); | |
2311 | EsdTrackCuts->SetEtaRange(-0.8, 0.8); | |
2312 | EsdTrackCuts->SetPtRange(0.15); | |
2313 | EsdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth); | |
2314 | ||
2315 | fNumberOfESDTrackskBoth = 0; | |
2316 | for(Int_t iTracks = 0; iTracks < fESDEvent->GetNumberOfTracks(); iTracks++){ | |
2317 | AliESDtrack* curTrack = fESDEvent->GetTrack(iTracks); | |
2318 | if(!curTrack) continue; | |
2319 | if(EsdTrackCuts->AcceptTrack(curTrack) ) fNumberOfESDTrackskBoth++; | |
2320 | } | |
2321 | delete EsdTrackCuts; | |
2322 | EsdTrackCuts=0x0; | |
2323 | ||
2324 | return; | |
2bb2434e | 2325 | } |
2326 | ||
2327 | //_____________________________________________________________________________ | |
2328 | void AliAnalysisTaskGammaConvDalitzV1::ProcessMCParticles() | |
2329 | { | |
2330 | ||
344100c4 | 2331 | // Loop over all primary MC particle |
2332 | ||
2333 | for(Int_t i = 0; i < fMCStack->GetNprimary(); i++) { | |
2334 | ||
2335 | TParticle* particle = (TParticle *)fMCStack->Particle(i); | |
2336 | if (!particle) continue; | |
2337 | ||
2338 | Bool_t mcIsFromMB = kTRUE; | |
2339 | Int_t isMCFromMBHeader = -1; | |
2340 | ||
2341 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 0) { | |
2342 | isMCFromMBHeader = ((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(i,fMCStack,fInputEvent); | |
2343 | if(isMCFromMBHeader == 0 && ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetSignalRejection() != 3) continue; | |
2344 | if(isMCFromMBHeader != 2) mcIsFromMB = kFALSE; | |
2345 | } | |
2346 | ||
2347 | if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->PhotonIsSelectedMC(particle,fMCStack,kFALSE)){ | |
2348 | hMCAllGammaPt[fiCut]->Fill(particle->Pt()); // All MC Gamma | |
2349 | } | |
2350 | ||
2351 | if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->PhotonIsSelectedMC(particle,fMCStack,kTRUE)){ | |
2352 | hMCConvGammaPt[fiCut]->Fill(particle->Pt()); | |
2353 | if(fDoMesonQA) hMCConvGammaEta[fiCut]->Fill( particle->Eta()); | |
2354 | ||
2355 | if(mcIsFromMB){ | |
2356 | hMCConvGammaRSPt[fiCut]->Fill(particle->Pt()); | |
2357 | } | |
2358 | } // Converted MC Gamma | |
2359 | ||
2360 | if(((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelectedMC(i,fMCStack)){ | |
2d49ea4c | 2361 | if( particle->GetPdgCode() == -11) { |
344100c4 | 2362 | hMCAllPositronsPt[fiCut]->Fill(particle->Pt()); // All positrons |
2363 | if(fDoMesonQA) hMCAllPositronsEta[fiCut]->Fill( particle->Eta() ); | |
2d49ea4c | 2364 | } |
2365 | if( particle->GetPdgCode() == 11){ | |
344100c4 | 2366 | hMCAllElectronsPt[fiCut]->Fill(particle->Pt()); // All electrons |
2367 | if (fDoMesonQA) hMCAllElectronsEta[fiCut]->Fill(particle->Eta()); // All electrons | |
2368 | } | |
2369 | } | |
2370 | ||
2371 | if(((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelectedMC( particle,fMCStack,((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift() ) ){ | |
2372 | Float_t weighted= 1; | |
2373 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2374 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(i, fMCStack, fInputEvent)){ | |
2375 | if (particle->Pt()>0.005){ | |
2376 | weighted= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),i, fMCStack,fInputEvent); | |
2377 | } | |
2378 | } | |
ae947965 | 2379 | } |
ae947965 | 2380 | if(particle->GetPdgCode() == 111)hMCPi0GGPt[fiCut]->Fill( particle->Pt() , weighted); // All MC Pi0 GG decay |
2381 | if(particle->GetPdgCode() == 221)hMCEtaGGPt[fiCut]->Fill( particle->Pt() , weighted); // All MC Eta GG decay | |
344100c4 | 2382 | } |
2383 | ||
2384 | ||
2385 | Int_t labelgamma = -1; | |
2386 | Int_t labelelectron = -1; | |
2387 | Int_t labelpositron = -1; | |
ae947965 | 2388 | |
a280ac15 | 2389 | |
344100c4 | 2390 | if( ((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelectedMCDalitz(particle,fMCStack,labelelectron,labelpositron,labelgamma,((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift())){ |
2391 | Float_t weighted= 1; | |
2392 | if( ((AliDalitzElectronCuts*) fCutElectronArray->At(fiCut))->DoWeights() ) { | |
2393 | if(((AliConvEventCuts*)fCutEventArray->At(fiCut))->IsParticleFromBGEvent(i, fMCStack,fInputEvent)){ | |
2394 | if (particle->Pt()>0.005){ | |
2395 | weighted= ((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),i, fMCStack,fInputEvent); | |
2396 | } | |
2397 | } | |
ae947965 | 2398 | } |
ae947965 | 2399 | if(particle->GetPdgCode() == 111)hMCPi0Pt[fiCut]->Fill(particle->Pt(), weighted); // All MC Pi0 |
2400 | if(particle->GetPdgCode() == 221)hMCEtaPt[fiCut]->Fill(particle->Pt(), weighted); // All MC Eta | |
0f8c33c1 | 2401 | |
2402 | // Check the acceptance for gamma and electrons | |
2403 | ||
344100c4 | 2404 | TParticle *gamma = fMCStack->Particle(labelgamma); |
2405 | TParticle *electron = fMCStack->Particle(labelelectron); | |
2406 | TParticle *positron = fMCStack->Particle(labelpositron); | |
2407 | ||
2408 | ||
2409 | if(((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->PhotonIsSelectedMC(gamma,fMCStack,kFALSE) && | |
2410 | ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelectedMC(labelelectron,fMCStack) && | |
2411 | ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelectedMC(labelpositron,fMCStack) ) { | |
0f8c33c1 | 2412 | |
344100c4 | 2413 | Double_t massDalitz = -1; |
2414 | if( fDoMesonQA){ | |
2415 | TLorentzVector TLVEpos,TLVEneg,TLVDalitz; | |
2416 | Double_t electronMass = TDatabasePDG::Instance()->GetParticle( ::kElectron )->Mass(); | |
f4d5bd23 | 2417 | TLVEpos.SetXYZM(positron->Px(),positron->Py(),positron->Pz(),electronMass); |
2418 | TLVEneg.SetXYZM(electron->Px(),electron->Py(),electron->Pz(),electronMass); | |
2419 | TLVDalitz = TLVEpos + TLVEneg ; | |
2420 | massDalitz = TLVDalitz.M(); | |
0f8c33c1 | 2421 | } |
ae947965 | 2422 | |
344100c4 | 2423 | if(particle->GetPdgCode() == 111){ |
2424 | hMCPi0InAccPt[fiCut]->Fill(particle->Pt() , weighted); // MC Pi0Dalitz with gamma and e+e- in acc | |
2425 | hMCPi0DalitzGammaPt[fiCut]->Fill( gamma->Pt() ); | |
2426 | hMCPi0DalitzPositronPt[fiCut]->Fill( positron->Pt() ); | |
2427 | hMCPi0DalitzElectronPt[fiCut]->Fill( electron->Pt() ); | |
2428 | if ( fDoMesonQA )hMCPi0EposEnegInvMassPt[fiCut]->Fill(massDalitz,particle->Pt()); | |
2429 | } | |
2430 | if(particle->GetPdgCode() == 221){ | |
2431 | hMCEtaInAccPt[fiCut]->Fill(particle->Pt(), weighted ); // MC EtaDalitz with gamma and e+e- in acc | |
2432 | if( fDoMesonQA ) hMCEtaEposEnegInvMassPt[fiCut]->Fill( massDalitz, particle->Pt()); | |
2433 | } | |
2434 | } | |
2435 | } | |
2436 | ||
0f8c33c1 | 2437 | Int_t labelgammaChiC=-1; |
2438 | Int_t labelpositronChiC=-1; | |
2439 | Int_t labelelectronChiC=-1; | |
2440 | ||
344100c4 | 2441 | if(((AliConversionMesonCuts*)fCutMesonArray->At(fiCut))->MesonIsSelectedMCChiC(particle,fMCStack,labelelectronChiC,labelpositronChiC,labelgammaChiC,((AliConvEventCuts*)fCutEventArray->At(fiCut))->GetEtaShift())){ |
2442 | ||
0f8c33c1 | 2443 | hMCChiCPt[fiCut]->Fill(particle->Pt()); // All MC ChiC |
2444 | TParticle * gammaChiC =fMCStack->Particle(labelgammaChiC); | |
2445 | ||
344100c4 | 2446 | if( ((AliConversionPhotonCuts*)fCutGammaArray->At(fiCut))->PhotonIsSelectedMC( gammaChiC,fMCStack,kFALSE) && |
2447 | ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelectedMC(labelelectronChiC,fMCStack) && | |
2448 | ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->ElectronIsSelectedMC(labelpositronChiC,fMCStack) ){ | |
0f8c33c1 | 2449 | hMCChiCInAccPt[fiCut]->Fill(particle->Pt()); // All MC ChiC |
2450 | } | |
2451 | } | |
2452 | } | |
ccfa8c0d | 2453 | } |
344100c4 | 2454 | |
ccfa8c0d | 2455 | //_____________________________________________________________________________ |
ae947965 | 2456 | Bool_t AliAnalysisTaskGammaConvDalitzV1::IsDalitz(TParticle *fMCMother) const |
ccfa8c0d | 2457 | { |
2458 | ||
0f8c33c1 | 2459 | if( fMCMother->GetNDaughters() != 3 ) return kFALSE; |
2460 | if( fMCMother->GetPdgCode() != 111 && fMCMother->GetPdgCode() != 221 ) return kFALSE; | |
2461 | ||
ae947965 | 2462 | |
0f8c33c1 | 2463 | TParticle *positron = 0x0; |
2464 | TParticle *electron = 0x0; | |
ae947965 | 2465 | TParticle *gamma = 0x0; |
0f8c33c1 | 2466 | |
2467 | for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){ | |
0f8c33c1 | 2468 | TParticle* temp = (TParticle*)fMCStack->Particle( index ); |
0f8c33c1 | 2469 | switch( temp->GetPdgCode() ) { |
344100c4 | 2470 | case ::kPositron: |
2471 | positron = temp; | |
2472 | break; | |
2473 | case ::kElectron: | |
2474 | electron = temp; | |
2475 | break; | |
2476 | case ::kGamma: | |
2477 | gamma = temp; | |
2478 | break; | |
0f8c33c1 | 2479 | } |
2480 | } | |
2481 | ||
2482 | if( positron && electron && gamma) return kTRUE; | |
2483 | ||
2484 | return kFALSE; | |
a280ac15 | 2485 | } |
344100c4 | 2486 | |
ccfa8c0d | 2487 | //_____________________________________________________________________________________ |
2488 | Bool_t AliAnalysisTaskGammaConvDalitzV1::IsPi0DalitzDaughter( Int_t label ) const | |
2489 | { | |
2490 | // | |
2491 | // Returns true if the particle comes from Pi0 -> e+ e- gamma | |
344100c4 | 2492 | // |
2493 | Int_t motherLabel = fMCStack->Particle( label )->GetMother(0); | |
2494 | ||
2495 | if( motherLabel < 0 || motherLabel >= fMCStack->GetNtrack() ) return kFALSE; | |
ae947965 | 2496 | |
344100c4 | 2497 | TParticle* mother = fMCStack->Particle( motherLabel ); |
2498 | ||
ae947965 | 2499 | if( mother->GetPdgCode() != 111 ) return kFALSE; |
2500 | ||
2501 | if( IsDalitz( mother ) ) return kTRUE; | |
344100c4 | 2502 | |
ae947965 | 2503 | return kFALSE; |
344100c4 | 2504 | |
d9d6352b | 2505 | } |
2506 | ||
a1c2f90c | 2507 | void AliAnalysisTaskGammaConvDalitzV1::FillElectronQAHistos(AliAODConversionPhoton *Vgamma) const |
d9d6352b | 2508 | { |
d9d6352b | 2509 | |
344100c4 | 2510 | AliESDtrack *positronVgamma = 0; |
2511 | AliESDtrack *electronVgamma = 0; | |
2512 | ||
2513 | Double_t clsToFPos = -1.0; | |
2514 | Double_t clsToFNeg = -1.0; | |
2515 | ||
2516 | Double_t NumClsITSPos = -1.0; | |
2517 | Double_t NumClsITSNeg = -1.0; | |
2518 | Double_t NumClsTPCPos = -1.0; | |
2519 | Double_t NumClsTPCNeg = -1.0; | |
2520 | Double_t nCrossedRowsTPCPos = -1.0; | |
2521 | Double_t nCrossedRowsTPCNeg = -1.0; | |
2522 | ||
2523 | Float_t dcaToVertexXYPos = -1.0; | |
2524 | Float_t dcaToVertexZPos = -1.0; | |
2525 | Float_t dcaToVertexXYNeg = -1.0; | |
2526 | Float_t dcaToVertexZNeg = -1.0; | |
2527 | ||
2528 | Double_t nSigmaPosTPC = -999.; | |
2529 | Double_t nSigmaNegTPC = -999.; | |
2530 | ||
2531 | positronVgamma = fESDEvent->GetTrack( Vgamma->GetTrackLabelPositive() ); | |
2532 | electronVgamma = fESDEvent->GetTrack( Vgamma->GetTrackLabelNegative() ); | |
2533 | clsToFPos = ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetNFindableClustersTPC(positronVgamma); | |
2534 | clsToFNeg = ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetNFindableClustersTPC(electronVgamma); | |
2535 | ||
2536 | nSigmaPosTPC = ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetPIDResponse()->NumberOfSigmasTPC(positronVgamma, AliPID::kElectron) ; | |
2537 | nSigmaNegTPC = ((AliDalitzElectronCuts*)fCutElectronArray->At(fiCut))->GetPIDResponse()->NumberOfSigmasTPC(electronVgamma, AliPID::kElectron) ; | |
2538 | ||
2539 | NumClsITSPos = positronVgamma->GetNcls(0); //Get number of ITS clusters | |
2540 | NumClsITSNeg = electronVgamma->GetNcls(0); | |
2541 | NumClsTPCPos = positronVgamma->GetNcls(1); //Get number of TPC clusters | |
2542 | NumClsTPCNeg = electronVgamma->GetNcls(1); | |
2543 | ||
2544 | nCrossedRowsTPCPos = positronVgamma->GetTPCCrossedRows(); | |
2545 | nCrossedRowsTPCNeg = electronVgamma->GetTPCCrossedRows(); | |
2546 | ||
2547 | Float_t bPos[2]; | |
2548 | Float_t bCovPos[3]; | |
2549 | positronVgamma->GetImpactParameters(bPos,bCovPos); | |
2550 | ||
2551 | if (bCovPos[0]<=0 || bCovPos[2]<=0) { | |
2552 | AliDebug(1, "Estimated b resolution lower or equal zero!"); | |
2553 | bCovPos[0]=0; bCovPos[2]=0; | |
2554 | } | |
2555 | ||
2556 | Float_t bNeg[2]; | |
2557 | Float_t bCovNeg[3]; | |
2558 | positronVgamma->GetImpactParameters(bNeg,bCovNeg); | |
2559 | ||
2560 | if (bCovNeg[0]<=0 || bCovNeg[2]<=0) { | |
2561 | AliDebug(1, "Estimated b resolution lower or equal zero!"); | |
2562 | bCovNeg[0]=0; bCovNeg[2]=0; | |
2563 | } | |
2564 | ||
2565 | dcaToVertexXYPos = bPos[0]; | |
2566 | dcaToVertexZPos = bPos[1]; | |
2567 | dcaToVertexXYNeg = bNeg[0]; | |
2568 | dcaToVertexZNeg = bNeg[1]; | |
2569 | ||
2570 | if( electronVgamma->P() > 0.3 && electronVgamma->P() < 0.45 ){ | |
2571 | hESDDalitzElectronAfterEtaPCut[fiCut]->Fill( electronVgamma->Eta() ); | |
2572 | } | |
2573 | if( positronVgamma->P() > 0.3 && positronVgamma->P() < 0.45 ){ | |
2574 | hESDDalitzPositronAfterEtaPCut[fiCut]->Fill( positronVgamma->Eta() ); | |
2575 | } | |
2576 | ||
2577 | hESDDalitzElectronAfterPt[fiCut]->Fill( electronVgamma->Pt() ); | |
2578 | hESDDalitzPositronAfterPt[fiCut]->Fill( positronVgamma->Pt() ); | |
2579 | ||
2580 | hESDDalitzElectronAfterEta[fiCut]->Fill( electronVgamma->Eta() ); | |
2581 | hESDDalitzPositronAfterEta[fiCut]->Fill( positronVgamma->Eta() ); | |
2582 | ||
2583 | hESDDalitzElectronAfterPhi[fiCut]->Fill( electronVgamma->Phi() ); | |
2584 | hESDDalitzPositronAfterPhi[fiCut]->Fill( positronVgamma->Phi() ); | |
2585 | ||
2586 | hESDDalitzElectronAfterNFindClsTPC[fiCut]->Fill(clsToFNeg,electronVgamma->Pt()); | |
2587 | hESDDalitzPositronAfterNFindClsTPC[fiCut]->Fill(clsToFPos,positronVgamma->Pt()); | |
2588 | ||
2589 | hESDDalitzElectronAfterNClsTPC[fiCut]->Fill( NumClsTPCNeg,electronVgamma->Pt()); | |
2590 | hESDDalitzPositronAfterNClsTPC[fiCut]->Fill( NumClsTPCPos,positronVgamma->Pt()); | |
2591 | ||
2592 | hESDDalitzElectronAfterNCrossedRowsTPC[fiCut]->Fill( nCrossedRowsTPCNeg, electronVgamma->Pt() ); | |
2593 | hESDDalitzPositronAfterNCrossedRowsTPC[fiCut]->Fill( nCrossedRowsTPCPos, positronVgamma->Pt() ); | |
2594 | ||
2595 | hESDDalitzElectronAfterNClsITS[fiCut]->Fill( NumClsITSNeg); | |
2596 | hESDDalitzPositronAfterNClsITS[fiCut]->Fill( NumClsITSPos); | |
2597 | ||
2598 | hESDDalitzPosEleAfterDCAxy[fiCut]->Fill( dcaToVertexXYNeg, electronVgamma->Pt() ); | |
2599 | hESDDalitzPosEleAfterDCAz[fiCut]->Fill( dcaToVertexZNeg, electronVgamma->Pt() ); | |
2600 | hESDDalitzPosEleAfterDCAxy[fiCut]->Fill( dcaToVertexXYPos, positronVgamma->Pt() ); | |
2601 | hESDDalitzPosEleAfterDCAz[fiCut]->Fill( dcaToVertexZPos, positronVgamma->Pt() ); | |
2602 | ||
2603 | hESDDalitzElectronAfterTPCdEdxVsP[fiCut]->Fill( electronVgamma->P(),nSigmaNegTPC); | |
2604 | hESDDalitzPositronAfterTPCdEdxVsP[fiCut]->Fill( positronVgamma->P(), nSigmaPosTPC); | |
2605 | ||
2606 | hESDDalitzElectronAfterTPCdEdxVsEta[fiCut]->Fill( electronVgamma->Eta(),nSigmaNegTPC); | |
2607 | hESDDalitzPositronAfterTPCdEdxVsEta[fiCut]->Fill( positronVgamma->Eta(),nSigmaPosTPC); | |
2608 | ||
2609 | hESDDalitzElectronAfterTPCdEdxVsPhi[fiCut]->Fill( electronVgamma->Phi(),nSigmaNegTPC); | |
2610 | hESDDalitzPositronAfterTPCdEdxVsPhi[fiCut]->Fill( positronVgamma->Phi(),nSigmaPosTPC); | |
2611 | ||
2612 | hESDDalitzElectronAfterTPCdEdxSignalVsP[fiCut]->Fill( electronVgamma->P(), TMath::Abs(electronVgamma->GetTPCsignal())); | |
2613 | hESDDalitzPositronAfterTPCdEdxSignalVsP[fiCut]->Fill( positronVgamma->P(), TMath::Abs(positronVgamma->GetTPCsignal())); | |
2614 | ||
ccfa8c0d | 2615 | } |
2616 | ||
2617 | ||
a280ac15 | 2618 | //_____________________________________________________________________________ |
2619 | Double_t AliAnalysisTaskGammaConvDalitzV1::GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg ) const | |
2620 | { | |
344100c4 | 2621 | // |
2622 | // This angle is a measure for the contribution of the opening in polar | |
2623 | // direction ?0 to the opening angle ? Pair | |
2624 | // | |
2625 | // Ref. Measurement of photons via conversion pairs with the PHENIX experiment at RHIC | |
2626 | // Mas ter Thesis. Thorsten Dahms. 2005 | |
2627 | // https://twiki.cern.ch/twiki/pub/ALICE/GammaPhysicsPublications/tdahms_thesis.pdf | |
2628 | // | |
2629 | Double_t momPos[3]; | |
2630 | Double_t momNeg[3]; | |
2631 | if( trackPos->GetConstrainedPxPyPz(momPos) == 0 ) trackPos->GetPxPyPz( momPos ); | |
2632 | if( trackNeg->GetConstrainedPxPyPz(momNeg) == 0 ) trackNeg->GetPxPyPz( momNeg ); | |
a280ac15 | 2633 | |
344100c4 | 2634 | TVector3 posDaughter; |
2635 | TVector3 negDaughter; | |
a280ac15 | 2636 | |
344100c4 | 2637 | posDaughter.SetXYZ( momPos[0], momPos[1], momPos[2] ); |
2638 | negDaughter.SetXYZ( momNeg[0], momNeg[1], momNeg[2] ); | |
a280ac15 | 2639 | |
344100c4 | 2640 | Double_t deltaTheta = negDaughter.Theta() - posDaughter.Theta(); |
2641 | Double_t openingAngle = posDaughter.Angle( negDaughter ); //TMath::ACos( posDaughter.Dot(negDaughter)/(negDaughter.Mag()*posDaughter.Mag()) ); | |
a280ac15 | 2642 | |
344100c4 | 2643 | if( openingAngle < 1e-20 ) return 0.; |
a280ac15 | 2644 | |
344100c4 | 2645 | Double_t psiAngle = TMath::ASin( deltaTheta/openingAngle ); |
a280ac15 | 2646 | |
344100c4 | 2647 | return psiAngle; |
4803eb1f | 2648 | } |