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