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