29 #include "THnSparse.h"
32 #include "AliAnalysisTask.h"
33 #include "AliAnalysisManager.h"
34 #include "AliESDEvent.h"
35 #include "AliESDInputHandler.h"
36 #include "AliMCEventHandler.h"
37 #include "AliMCEvent.h"
38 #include "AliMCParticle.h"
39 #include "AliCentrality.h"
40 #include "AliESDVZERO.h"
41 #include "AliESDpid.h"
43 #include "AliVParticle.h"
44 #include "AliESDtrack.h"
45 #include "AliESDtrackCuts.h"
46 #include "AliKFVertex.h"
47 #include "AliGenCocktailEventHeader.h"
49 #include "AliAODMCParticle.h"
50 #include "AliAODMCHeader.h"
51 #include "AliEventplane.h"
53 #include "AliAODEvent.h"
54 #include "AliAODInputHandler.h"
55 #include "AliESDEvent.h"
56 #include "AliESDInputHandler.h"
57 #include "AliInputEventHandler.h"
67 fV0ReaderName("V0ReaderV1"),
71 fBGClusHandlerRP(NULL),
80 fInvMassShowerShape(NULL),
83 fClusterOutputList(NULL),
84 fOutputContainer(NULL),
86 fGammaCandidates(NULL),
87 fClusterCandidates(NULL),
91 fConversionCuts(NULL),
92 fClusterCutArray(NULL),
93 fCaloPhotonCuts(NULL),
96 fHistoConvGammaPt(NULL),
97 fHistoConvGammaR(NULL),
98 fHistoConvGammaEta(NULL),
99 fTreeConvGammaPtDcazCat(NULL),
105 fCharPhotonMCInfo(0),
106 tESDGammaERM02(NULL),
113 tESDClusterNCells(0),
114 tESDClusterMaxECell(0),
116 tESDInvMassShowerShape(0),
117 tESDIMMesonInvMass(0),
122 tESDIMClusterLeadCellID(0),
123 tESDIMClusterClassification(0),
124 tESDIMClusMatchedTrackPt(0),
125 tESDIMClusTrackDeltaEta(0),
126 tESDIMClusTrackDeltaPhi(0),
127 tESDIMClusterIsoSumClusterEt(0),
128 tESDIMClusterIsoSumTrackEt(0),
129 tESDmapIsClusterAcceptedWithoutTrackMatch(),
130 fHistoMotherInvMassPt(NULL),
131 fHistoMotherMatchedInvMassPt(NULL),
132 fSparseMotherInvMassPtZM(NULL),
133 fHistoMotherBackInvMassPt(NULL),
134 fSparseMotherBackInvMassPtZM(NULL),
135 fHistoMotherInvMassPtAlpha(NULL),
136 fHistoMotherPi0PtY(NULL),
137 fHistoMotherEtaPtY(NULL),
138 fHistoMotherPi0PtAlpha(NULL),
139 fHistoMotherEtaPtAlpha(NULL),
140 fHistoMotherPi0PtOpenAngle(NULL),
141 fHistoMotherEtaPtOpenAngle(NULL),
142 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
143 fHistoMotherEtaConvPhotonEtaPhi(NULL),
144 fHistoMotherInvMassECalib(NULL),
145 fHistoMotherBackInvMassECalib(NULL),
146 fHistoPhotonPairPtconv(NULL),
147 fHistoPhotonPairMixedEventPtconv(NULL),
148 fHistoClusGammaPt(NULL),
149 fHistoClusGammaE(NULL),
150 fHistoClusOverlapHeadersGammaPt(NULL),
151 fHistoMCHeaders(NULL),
152 fHistoMCAllGammaPt(NULL),
153 fHistoMCAllGammaEMCALAccPt(NULL),
154 fHistoMCAllSecondaryGammaPt(NULL),
155 fHistoMCDecayGammaPi0Pt(NULL),
156 fHistoMCDecayGammaRhoPt(NULL),
157 fHistoMCDecayGammaEtaPt(NULL),
158 fHistoMCDecayGammaOmegaPt(NULL),
159 fHistoMCDecayGammaEtapPt(NULL),
160 fHistoMCDecayGammaPhiPt(NULL),
161 fHistoMCDecayGammaSigmaPt(NULL),
162 fHistoMCConvGammaPt(NULL),
163 fHistoMCSecondaryConvGammaPt(NULL),
164 fHistoMCConvGammaR(NULL),
165 fHistoMCConvGammaEta(NULL),
167 fHistoMCPi0WOWeightPt(NULL),
168 fHistoMCPi0WOEvtWeightPt(NULL),
170 fHistoMCEtaWOWeightPt(NULL),
171 fHistoMCEtaWOEvtWeightPt(NULL),
172 fHistoMCPi0InAccPt(NULL),
173 fHistoMCPi0WOWeightInAccPt(NULL),
174 fHistoMCPi0WOEvtWeightInAccPt(NULL),
175 fHistoMCEtaInAccPt(NULL),
176 fHistoMCEtaWOWeightInAccPt(NULL),
177 fHistoMCEtaWOEvtWeightInAccPt(NULL),
178 fHistoMCPi0PtY(NULL),
179 fHistoMCEtaPtY(NULL),
180 fHistoMCPi0PtAlpha(NULL),
181 fHistoMCEtaPtAlpha(NULL),
182 fHistoMCPrimaryPtvsSource(NULL),
183 fHistoMCSecPi0PtvsSource(NULL),
184 fHistoMCSecPi0Source(NULL),
185 fHistoMCSecPi0InAccPtvsSource(NULL),
186 fHistoMCSecEtaPt(NULL),
187 fHistoMCSecEtaSource(NULL),
188 fHistoMCPi0PtJetPt(NULL),
189 fHistoMCEtaPtJetPt(NULL),
190 fHistoMCPi0PtGammaLeg(NULL),
191 fHistoMCPi0WOWeightPtGammaLeg(NULL),
192 fHistoMCPi0InAccPtGammaLeg(NULL),
193 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
194 fHistoMCSecPi0PtGamma1vsSource(NULL),
195 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
196 fHistoMCSecPi0PtGamma2vsSource(NULL),
197 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
198 fHistoTruePi0InvMassPt(NULL),
199 fHistoTrueEtaInvMassPt(NULL),
200 fHistoTruePi0MatchedInvMassPt(NULL),
201 fHistoTrueEtaMatchedInvMassPt(NULL),
202 fHistoTruePi0CaloPhotonInvMassPt(NULL),
203 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
204 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
205 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
206 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
207 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
208 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
209 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
210 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
211 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
212 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
213 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
214 fHistoTruePi0CaloElectronInvMassPt(NULL),
215 fHistoTrueEtaCaloElectronInvMassPt(NULL),
216 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
217 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
218 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
219 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
220 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
221 fHistoTruePrimaryPi0InvMassPt(NULL),
222 fHistoTruePrimaryEtaInvMassPt(NULL),
223 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
224 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
225 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
226 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
227 fHistoTruePrimaryPi0MCPtResolPt(NULL),
228 fHistoTruePrimaryEtaMCPtResolPt(NULL),
229 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
230 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
231 fHistoTrueSecondaryPi0InvMassPt(NULL),
232 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
233 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
234 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
235 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
236 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
237 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
238 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
239 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
240 fHistoTrueBckGGInvMassPt(NULL),
241 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
242 fHistoTrueBckAsymEClustersInvMassPt(NULL),
243 fHistoTrueBckContInvMassPt(NULL),
244 fHistoTruePi0PtY(NULL),
245 fHistoTrueEtaPtY(NULL),
246 fHistoTruePi0PtAlpha(NULL),
247 fHistoTrueEtaPtAlpha(NULL),
248 fHistoTruePi0PtOpenAngle(NULL),
249 fHistoTrueEtaPtOpenAngle(NULL),
250 fHistoTrueConvGammaPt(NULL),
251 fHistoTrueConvGammaEta(NULL),
252 fHistoCombinatorialPt(NULL),
253 fHistoTruePrimaryConvGammaPt(NULL),
254 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
255 fHistoTrueSecondaryConvGammaPt(NULL),
256 fHistoTrueSecondaryConvGammaMCPt(NULL),
257 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
258 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
259 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
260 fHistoTrueClusGammaPt(NULL),
261 fHistoTrueClusElectronPt(NULL),
262 fHistoTrueClusConvGammaPt(NULL),
263 fHistoTrueClusConvGammaFullyPt(NULL),
264 fHistoTrueClusMergedGammaPt(NULL),
265 fHistoTrueClusMergedPartConvGammaPt(NULL),
266 fHistoTrueClusDalitzPt(NULL),
267 fHistoTrueClusDalitzMergedPt(NULL),
268 fHistoTrueClusPhotonFromElecMotherPt(NULL),
269 fHistoTrueClusShowerPt(NULL),
270 fHistoTrueClusSubLeadingPt(NULL),
271 fHistoTrueClusNMothers(NULL),
272 fHistoTrueClusEMNonLeadingPt(NULL),
273 fHistoTrueNLabelsInClusPt(NULL),
274 fHistoTruePrimaryClusGammaPt(NULL),
275 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
276 fHistoTruePrimaryClusConvGammaPt(NULL),
277 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
278 fHistoTrueSecondaryClusGammaPt(NULL),
279 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
280 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
281 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
282 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
283 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
284 fHistoTruePrimaryPi0DCPtconv(NULL),
285 fHistoTruePrimaryPi0MissingPtconv(NULL),
286 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
287 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
288 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
289 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
290 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
291 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
292 fVectorRecTruePi0s(0),
293 fVectorRecTrueEtas(0),
294 fHistoDoubleCountTruePi0InvMassPt(NULL),
295 fHistoDoubleCountTrueEtaInvMassPt(NULL),
296 fHistoDoubleCountTrueConvGammaRPt(NULL),
297 fHistoDoubleCountTrueClusterGammaPt(NULL),
298 fVectorDoubleCountTruePi0s(0),
299 fVectorDoubleCountTrueEtas(0),
300 fVectorDoubleCountTrueConvGammas(0),
301 fVectorDoubleCountTrueClusterGammas(0),
302 fHistoMultipleCountTruePi0(NULL),
303 fHistoMultipleCountTrueEta(NULL),
304 fHistoMultipleCountTrueConvGamma(NULL),
305 fHistoMultipleCountTrueClusterGamma(NULL),
306 fMapMultipleCountTruePi0s(),
307 fMapMultipleCountTrueEtas(),
308 fMapMultipleCountTrueConvGammas(),
309 fMapMultipleCountTrueClusterGammas(),
310 fHistoTrueClusGammaEM02(NULL),
311 fHistoTrueClusPi0EM02(NULL),
312 fHistoTruePi0InvMassECalib(NULL),
313 fHistoTruePi0PureGammaInvMassECalib(NULL),
315 fHistoNEventsWOWeight(NULL),
316 fHistoNGoodESDTracks(NULL),
320 fHistoNGammaCandidates(NULL),
321 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
322 fHistoSPDClusterTrackletBackground(NULL),
323 fHistoNV0Tracks(NULL),
324 fProfileEtaShift(NULL),
325 fProfileJetJetXSection(NULL),
326 fHistoJetJetNTrials(NULL),
329 fEventPlaneAngle(-100),
331 fNGammaCandidates(0),
342 fMoveParticleAccordingToVertex(kTRUE),
344 fDoLightOutput(kFALSE),
345 fDoMesonAnalysis(kTRUE),
349 fIsFromMBHeader(kTRUE),
350 fIsOverlappingWithOtherHeader(kFALSE),
353 fSetPlotHistsExtQA(kFALSE),
355 fDoConvGammaShowerShapeTree(kFALSE),
356 fEnableSortForClusMC(kFALSE),
357 fDoPrimaryTrackMatching(kFALSE),
358 fDoInvMassShowerShapeTree(kFALSE),
360 fFileNameBroken(NULL)
369 fV0ReaderName(
"V0ReaderV1"),
372 fBGClusHandler(NULL),
373 fBGClusHandlerRP(NULL),
380 fPhotonDCAList(NULL),
382 fInvMassShowerShape(NULL),
385 fClusterOutputList(NULL),
388 fGammaCandidates(NULL),
389 fClusterCandidates(NULL),
390 fEventCutArray(NULL),
393 fConversionCuts(NULL),
394 fClusterCutArray(NULL),
395 fCaloPhotonCuts(NULL),
396 fMesonCutArray(NULL),
398 fHistoConvGammaPt(NULL),
399 fHistoConvGammaR(NULL),
400 fHistoConvGammaEta(NULL),
401 fTreeConvGammaPtDcazCat(NULL),
407 fCharPhotonMCInfo(0),
408 tESDGammaERM02(NULL),
415 tESDClusterNCells(0),
416 tESDClusterMaxECell(0),
418 tESDInvMassShowerShape(0),
419 tESDIMMesonInvMass(0),
424 tESDIMClusterLeadCellID(0),
425 tESDIMClusterClassification(0),
426 tESDIMClusMatchedTrackPt(0),
427 tESDIMClusTrackDeltaEta(0),
428 tESDIMClusTrackDeltaPhi(0),
429 tESDIMClusterIsoSumClusterEt(0),
430 tESDIMClusterIsoSumTrackEt(0),
431 tESDmapIsClusterAcceptedWithoutTrackMatch(),
432 fHistoMotherInvMassPt(NULL),
433 fHistoMotherMatchedInvMassPt(NULL),
434 fSparseMotherInvMassPtZM(NULL),
435 fHistoMotherBackInvMassPt(NULL),
436 fSparseMotherBackInvMassPtZM(NULL),
437 fHistoMotherInvMassPtAlpha(NULL),
438 fHistoMotherPi0PtY(NULL),
439 fHistoMotherEtaPtY(NULL),
440 fHistoMotherPi0PtAlpha(NULL),
441 fHistoMotherEtaPtAlpha(NULL),
442 fHistoMotherPi0PtOpenAngle(NULL),
443 fHistoMotherEtaPtOpenAngle(NULL),
444 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
445 fHistoMotherEtaConvPhotonEtaPhi(NULL),
446 fHistoMotherInvMassECalib(NULL),
447 fHistoMotherBackInvMassECalib(NULL),
448 fHistoPhotonPairPtconv(NULL),
449 fHistoPhotonPairMixedEventPtconv(NULL),
450 fHistoClusGammaPt(NULL),
451 fHistoClusGammaE(NULL),
452 fHistoClusOverlapHeadersGammaPt(NULL),
453 fHistoMCHeaders(NULL),
454 fHistoMCAllGammaPt(NULL),
455 fHistoMCAllGammaEMCALAccPt(NULL),
456 fHistoMCAllSecondaryGammaPt(NULL),
457 fHistoMCDecayGammaPi0Pt(NULL),
458 fHistoMCDecayGammaRhoPt(NULL),
459 fHistoMCDecayGammaEtaPt(NULL),
460 fHistoMCDecayGammaOmegaPt(NULL),
461 fHistoMCDecayGammaEtapPt(NULL),
462 fHistoMCDecayGammaPhiPt(NULL),
463 fHistoMCDecayGammaSigmaPt(NULL),
464 fHistoMCConvGammaPt(NULL),
465 fHistoMCSecondaryConvGammaPt(NULL),
466 fHistoMCConvGammaR(NULL),
467 fHistoMCConvGammaEta(NULL),
469 fHistoMCPi0WOWeightPt(NULL),
470 fHistoMCPi0WOEvtWeightPt(NULL),
472 fHistoMCEtaWOWeightPt(NULL),
473 fHistoMCEtaWOEvtWeightPt(NULL),
474 fHistoMCPi0InAccPt(NULL),
475 fHistoMCPi0WOWeightInAccPt(NULL),
476 fHistoMCPi0WOEvtWeightInAccPt(NULL),
477 fHistoMCEtaInAccPt(NULL),
478 fHistoMCEtaWOWeightInAccPt(NULL),
479 fHistoMCEtaWOEvtWeightInAccPt(NULL),
480 fHistoMCPi0PtY(NULL),
481 fHistoMCEtaPtY(NULL),
482 fHistoMCPi0PtAlpha(NULL),
483 fHistoMCEtaPtAlpha(NULL),
484 fHistoMCPrimaryPtvsSource(NULL),
485 fHistoMCSecPi0PtvsSource(NULL),
486 fHistoMCSecPi0Source(NULL),
487 fHistoMCSecPi0InAccPtvsSource(NULL),
488 fHistoMCSecEtaPt(NULL),
489 fHistoMCSecEtaSource(NULL),
490 fHistoMCPi0PtJetPt(NULL),
491 fHistoMCEtaPtJetPt(NULL),
492 fHistoMCPi0PtGammaLeg(NULL),
493 fHistoMCPi0WOWeightPtGammaLeg(NULL),
494 fHistoMCPi0InAccPtGammaLeg(NULL),
495 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
496 fHistoMCSecPi0PtGamma1vsSource(NULL),
497 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
498 fHistoMCSecPi0PtGamma2vsSource(NULL),
499 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
500 fHistoTruePi0InvMassPt(NULL),
501 fHistoTrueEtaInvMassPt(NULL),
502 fHistoTruePi0MatchedInvMassPt(NULL),
503 fHistoTrueEtaMatchedInvMassPt(NULL),
504 fHistoTruePi0CaloPhotonInvMassPt(NULL),
505 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
506 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
507 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
508 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
509 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
510 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
511 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
512 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
513 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
514 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
515 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
516 fHistoTruePi0CaloElectronInvMassPt(NULL),
517 fHistoTrueEtaCaloElectronInvMassPt(NULL),
518 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
519 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
520 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
521 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
522 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
523 fHistoTruePrimaryPi0InvMassPt(NULL),
524 fHistoTruePrimaryEtaInvMassPt(NULL),
525 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
526 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
527 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
528 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
529 fHistoTruePrimaryPi0MCPtResolPt(NULL),
530 fHistoTruePrimaryEtaMCPtResolPt(NULL),
531 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
532 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
533 fHistoTrueSecondaryPi0InvMassPt(NULL),
534 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
535 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
536 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
537 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
538 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
539 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
540 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
541 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
542 fHistoTrueBckGGInvMassPt(NULL),
543 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
544 fHistoTrueBckAsymEClustersInvMassPt(NULL),
545 fHistoTrueBckContInvMassPt(NULL),
546 fHistoTruePi0PtY(NULL),
547 fHistoTrueEtaPtY(NULL),
548 fHistoTruePi0PtAlpha(NULL),
549 fHistoTrueEtaPtAlpha(NULL),
550 fHistoTruePi0PtOpenAngle(NULL),
551 fHistoTrueEtaPtOpenAngle(NULL),
552 fHistoTrueConvGammaPt(NULL),
553 fHistoTrueConvGammaEta(NULL),
554 fHistoCombinatorialPt(NULL),
555 fHistoTruePrimaryConvGammaPt(NULL),
556 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
557 fHistoTrueSecondaryConvGammaPt(NULL),
558 fHistoTrueSecondaryConvGammaMCPt(NULL),
559 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
560 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
561 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
562 fHistoTrueClusGammaPt(NULL),
563 fHistoTrueClusElectronPt(NULL),
564 fHistoTrueClusConvGammaPt(NULL),
565 fHistoTrueClusConvGammaFullyPt(NULL),
566 fHistoTrueClusMergedGammaPt(NULL),
567 fHistoTrueClusMergedPartConvGammaPt(NULL),
568 fHistoTrueClusDalitzPt(NULL),
569 fHistoTrueClusDalitzMergedPt(NULL),
570 fHistoTrueClusPhotonFromElecMotherPt(NULL),
571 fHistoTrueClusShowerPt(NULL),
572 fHistoTrueClusSubLeadingPt(NULL),
573 fHistoTrueClusNMothers(NULL),
574 fHistoTrueClusEMNonLeadingPt(NULL),
575 fHistoTrueNLabelsInClusPt(NULL),
576 fHistoTruePrimaryClusGammaPt(NULL),
577 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
578 fHistoTruePrimaryClusConvGammaPt(NULL),
579 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
580 fHistoTrueSecondaryClusGammaPt(NULL),
581 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
582 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
583 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
584 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
585 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
586 fHistoTruePrimaryPi0DCPtconv(NULL),
587 fHistoTruePrimaryPi0MissingPtconv(NULL),
588 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
589 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
590 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
591 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
592 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
593 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
594 fVectorRecTruePi0s(0),
595 fVectorRecTrueEtas(0),
596 fHistoDoubleCountTruePi0InvMassPt(NULL),
597 fHistoDoubleCountTrueEtaInvMassPt(NULL),
598 fHistoDoubleCountTrueConvGammaRPt(NULL),
599 fHistoDoubleCountTrueClusterGammaPt(NULL),
600 fVectorDoubleCountTruePi0s(0),
601 fVectorDoubleCountTrueEtas(0),
602 fVectorDoubleCountTrueConvGammas(0),
603 fVectorDoubleCountTrueClusterGammas(0),
604 fHistoMultipleCountTruePi0(NULL),
605 fHistoMultipleCountTrueEta(NULL),
606 fHistoMultipleCountTrueConvGamma(NULL),
607 fHistoMultipleCountTrueClusterGamma(NULL),
608 fMapMultipleCountTruePi0s(),
609 fMapMultipleCountTrueEtas(),
610 fMapMultipleCountTrueConvGammas(),
611 fMapMultipleCountTrueClusterGammas(),
612 fHistoTrueClusGammaEM02(NULL),
613 fHistoTrueClusPi0EM02(NULL),
614 fHistoTruePi0InvMassECalib(NULL),
615 fHistoTruePi0PureGammaInvMassECalib(NULL),
617 fHistoNEventsWOWeight(NULL),
618 fHistoNGoodESDTracks(NULL),
622 fHistoNGammaCandidates(NULL),
623 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
624 fHistoSPDClusterTrackletBackground(NULL),
625 fHistoNV0Tracks(NULL),
626 fProfileEtaShift(NULL),
627 fProfileJetJetXSection(NULL),
628 fHistoJetJetNTrials(NULL),
631 fEventPlaneAngle(-100),
633 fNGammaCandidates(0),
644 fMoveParticleAccordingToVertex(kTRUE),
646 fDoLightOutput(kFALSE),
647 fDoMesonAnalysis(kTRUE),
651 fIsFromMBHeader(kTRUE),
652 fIsOverlappingWithOtherHeader(kFALSE),
655 fSetPlotHistsExtQA(kFALSE),
657 fDoConvGammaShowerShapeTree(kFALSE),
658 fEnableSortForClusMC(kFALSE),
659 fDoPrimaryTrackMatching(kFALSE),
660 fDoInvMassShowerShapeTree(kFALSE),
662 fFileNameBroken(NULL)
665 DefineOutput(1, TList::Class());
698 const Int_t nDim = 4;
699 Int_t nBins[nDim] = {800,300,7,4};
725 if(collisionSystem == 1 || collisionSystem == 2 ||
726 collisionSystem == 5 || collisionSystem == 8 ||
727 collisionSystem == 9){
728 centMin = centMin*10;
729 centMax = centMax*10;
730 if(centMax ==0 && centMax!=centMin) centMax=100;
731 }
else if(collisionSystem == 3 || collisionSystem == 6){
734 }
else if(collisionSystem == 4 || collisionSystem == 7){
735 centMin = ((centMin*5)+45);
736 centMax = ((centMax*5)+45);
741 fBackList[iCut]->SetName(Form(
"%s_%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
749 fMotherList[iCut]->SetName(Form(
"%s_%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
753 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
759 collisionSystem,centMin,centMax,
764 collisionSystem,centMin,centMax,
787 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
793 }
else if (
fIsMC == 3){
893 Int_t nBinsQAPt = 200;
896 Int_t nBinsClusterPt = 500;
906 nBinsClusterPt = 800;
916 nBinsClusterPt = 800;
925 TString cutstringMeson =
"NoMesonCut";
930 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
934 fESDList[iCut]->SetName(Form(
"%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
938 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
940 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
941 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
943 TString TriggerNames =
"Not Trigger: ";
945 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
950 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
954 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
955 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
956 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
957 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
958 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
967 TString TriggerNames =
"Not Trigger: ";
1003 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
1006 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX",200,-5,5);
1008 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY",200,-5,5);
1036 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
1038 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
1040 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
1044 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1050 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift",1, -0.5,0.5);
1071 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s_%s Photon DCA tree",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1089 fHistoConvGammaR[iCut] =
new TH1F(
"ESD_ConvGamma_R",
"ESD_ConvGamma_R",800,0,200);
1092 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",2000,-2,2);
1098 fClusterOutputList[iCut]->SetName(Form(
"%s_%s_%s_%s Cluster Output",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1102 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1105 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
1108 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1114 fGammaERM02[iCut]->SetName(Form(
"%s_%s_%s_%s ConvGamma-Cluster Matched",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1118 tESDGammaERM02[iCut] =
new TTree(
"ESD_ConvGamma_E_ConvR_M02_M20",
"ESD_ConvGamma_E_ConvR_M02_M20");
1133 fInvMassShowerShape[iCut]->SetName(Form(
"%s_%s_%s_%s InvMass_ShowerShape",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1136 tESDInvMassShowerShape[iCut] =
new TTree(
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20",
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20");
1159 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1222 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1227 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1232 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1237 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1247 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
1483 TString cutstringMeson =
"NoMesonCut";
1488 fMCList[iCut]->SetName(Form(
"%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1489 fMCList[iCut]->SetOwner(kTRUE);
1494 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsPt, minPt, maxPt);
1519 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1552 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1555 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1558 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1561 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1564 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1569 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1580 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1582 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1590 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1594 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1618 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1663 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1667 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1671 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1674 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1686 fTrueList[iCut]->SetName(Form(
"%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1691 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",nBinsPt, minPt, maxPt);
1699 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt",nBinsPt, minPt, maxPt,16,-0.5,15.5);
1744 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1747 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1749 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1751 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1753 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1755 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1757 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1760 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH1F(
"TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1775 fHistoTrueNLabelsInClusPt[iCut] =
new TH2F(
"TrueNLabelsInClus_Pt",
"TrueNLabelsInClus_Pt",100,-0.5,99.5,nBinsClusterPt, minClusterPt, maxClusterPt);
1777 fHistoTrueClusGammaEM02[iCut] =
new TH2F(
"TrueClusGammaEM02",
"TrueClusGammaEM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1779 fHistoTrueClusPi0EM02[iCut] =
new TH2F(
"TrueClusPi0EM02",
"TrueClusPi0EM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1781 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1843 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1845 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1849 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1851 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1855 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1857 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
2177 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2182 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2187 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2192 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2203 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
2265 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2329 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2350 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2352 if(eventQuality == 2 || eventQuality == 3){
2379 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2394 Bool_t isRunningEMCALrelAna = kFALSE;
2403 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2424 Bool_t triggered = kTRUE;
2426 if(eventNotAccepted!= 0){
2430 if (eventNotAccepted==3 &&
fIsMC > 0){
2437 if(eventQuality != 0){
2444 if (triggered==kTRUE){
2467 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2476 if (nameBin.CompareTo(
"")== 0){
2478 ->GetAcceptedHeader())->At(i))->GetString();
2479 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2492 if (triggered==kFALSE)
continue;
2588 if(nclus == 0)
return;
2598 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2601 for(
Int_t i = 0; i < nclus; i++){
2602 AliVCluster* clus = NULL;
2603 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2604 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2606 if (!clus)
continue;
2614 TLorentzVector clusterVector;
2615 clus->GetMomentum(clusterVector,vertex);
2617 TLorentzVector* tmpvec =
new TLorentzVector();
2618 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2622 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2631 Int_t* mclabelsCluster = clus->GetLabels();
2634 if (clus->GetNLabels()>0){
2635 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
2651 if (clus->GetNLabels()>1){
2652 Int_t* mclabelsCluster = clus->GetLabels();
2653 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2676 delete PhotonCandidate;
2689 TParticle *Photon = NULL;
2690 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2704 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2705 Double_t mcProdVtxX = primVtxMC->GetX();
2706 Double_t mcProdVtxY = primVtxMC->GetY();
2707 Double_t mcProdVtxZ = primVtxMC->GetZ();
2735 Int_t secondaryClass = -1;
2741 if (secondaryClass > 0 ){
2745 if (secondaryClass == 2)
2748 else if (secondaryClass == 3)
2750 else if (secondaryClass == 5)
2782 if (TruePhotonCandidate->
IsDalitz())
2791 if (TruePhotonCandidate->
IsShower())
2801 Int_t motherLab = Photon->GetMother(0);
2802 if (motherLab > -1){
2809 if ( TMath::Abs(
fMCEvent->Particle(motherLab)->GetPdgCode()) == 111 &&
2817 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2818 if (grandMotherLab > -1){
2835 AliAODMCParticle *Photon = NULL;
2836 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2837 if (AODMCTrackArray){
2838 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2842 AliInfo(
"AODMCTrackArray could not be loaded");
2854 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2855 Double_t mcProdVtxX = primVtxMC->GetX();
2856 Double_t mcProdVtxY = primVtxMC->GetY();
2857 Double_t mcProdVtxZ = primVtxMC->GetZ();
2862 if (Photon->GetMother()> -1){
2863 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2881 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2885 Int_t secondaryClass = -1;
2891 if (secondaryClass > 0 ){
2895 if (secondaryClass == 2)
2898 else if (secondaryClass == 3)
2900 else if (secondaryClass == 5)
2923 if (TruePhotonCandidate->
IsDalitz())
2929 if (TruePhotonCandidate->
IsShower())
2936 Int_t motherLab = Photon->GetMother();
2937 if (motherLab > -1){
2948 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2949 if (grandMotherLab > -1){
2973 if(!PhotonCandidate)
continue;
2980 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3003 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3010 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3022 GammaCandidatesStepOne->Add(PhotonCandidate);
3025 GammaCandidatesStepTwo->Add(PhotonCandidate);
3029 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
3031 if(!PhotonCandidate)
continue;
3036 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3055 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3062 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3071 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
3075 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
3077 if(!PhotonCandidate)
continue;
3082 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3100 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3107 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3119 delete GammaCandidatesStepOne;
3120 GammaCandidatesStepOne = 0x0;
3121 delete GammaCandidatesStepTwo;
3122 GammaCandidatesStepTwo = 0x0;
3129 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3130 Double_t mcProdVtxX = primVtxMC->GetX();
3131 Double_t mcProdVtxY = primVtxMC->GetY();
3132 Double_t mcProdVtxZ = primVtxMC->GetZ();
3135 if( magField < 0.0 ){
3142 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3143 if (AODMCTrackArray == NULL)
return;
3144 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
3145 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
3148 if(posDaughter == NULL || negDaughter == NULL)
return;
3149 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3151 if(posDaughter->GetMother() != negDaughter->GetMother()){
3156 else if(posDaughter->GetMother() == -1){
3162 if(pdgCode[0]!=11 || pdgCode[1]!=11){
3167 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
3172 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
3173 if(Photon->GetPdgCode() != 22){
3178 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
3212 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3213 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
3221 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3222 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
3230 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3231 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122){
3238 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3239 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
3259 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3260 Double_t mcProdVtxX = primVtxMC->GetX();
3261 Double_t mcProdVtxY = primVtxMC->GetY();
3262 Double_t mcProdVtxZ = primVtxMC->GetZ();
3265 if( magField < 0.0 ){
3277 if(posDaughter == NULL || negDaughter == NULL)
return;
3278 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3280 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
3284 else if(posDaughter->GetMother(0) == -1){
3289 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
3291 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
3295 if(Photon->GetPdgCode() != 22){
3299 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
3314 fCharPhotonMCInfo = 6;
3324 fCharPhotonMCInfo = 2;
3325 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
3326 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3327 fCharPhotonMCInfo = 4;
3333 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3334 fCharPhotonMCInfo = 7;
3340 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3341 fCharPhotonMCInfo = 5;
3347 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3348 fCharPhotonMCInfo = 3;
3373 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3374 Double_t mcProdVtxX = primVtxMC->GetX();
3375 Double_t mcProdVtxY = primVtxMC->GetY();
3376 Double_t mcProdVtxZ = primVtxMC->GetZ();
3378 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3379 if (AODMCTrackArray == NULL)
return;
3382 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3384 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3385 if (!particle)
continue;
3390 Int_t isMCFromMBHeader = -1;
3400 if (TMath::Abs(particle->Eta()) < 0.66 ){
3403 if(particle->GetMother() >-1){
3404 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3432 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
3433 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
3434 if(!tmpDaughter)
continue;
3435 if(TMath::Abs(tmpDaughter->GetPdgCode()) == 11){
3436 rConv = sqrt( (tmpDaughter->Xv()*tmpDaughter->Xv()) + (tmpDaughter->Yv()*tmpDaughter->Yv()) );
3449 if(particle->E() - particle->Pz() == 0 || particle->E() + particle->Pz() == 0){
3456 if ( particle->GetPdgCode() == 211 ){
3458 }
else if ( particle->GetPdgCode() == -211 ){
3460 }
else if ( particle->GetPdgCode() == 321 ){
3462 }
else if ( particle->GetPdgCode() == -321 ){
3464 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3466 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3468 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3476 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3477 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3480 if (particle->Pt()>0.005){
3488 if(particle->E() - particle->Pz() == 0 || particle->E() + particle->Pz() == 0){
3495 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3496 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
3500 if(particle->GetPdgCode() == 111){
3523 }
else if(particle->GetPdgCode() == 221){
3542 if(particle->GetPdgCode() == 111){
3559 }
else if(particle->GetPdgCode() == 221){
3570 Int_t isMCFromMBHeader = -1;
3577 if (particle->GetMother() > -1) {
3578 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3579 if (tmpMother->GetMother() > -1) {
3580 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3581 if(tmpGrandMother->GetPdgCode() == 310) {
3583 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3585 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3588 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3600 if (particle->GetMother() > -1) {
3601 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3602 if (tmpMother->GetMother() > -1) {
3603 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3604 if(tmpGrandMother->GetPdgCode() == 310) {
3606 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3608 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3611 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3625 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3626 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3627 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3628 Int_t pdgCode = mother->GetPdgCode();
3629 if(particle->GetPdgCode() == 111){
3637 }
else if(particle->GetPdgCode() == 221){
3651 if (particle->GetPdgCode() == 111){
3670 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3671 Double_t mcProdVtxX = primVtxMC->GetX();
3672 Double_t mcProdVtxY = primVtxMC->GetY();
3673 Double_t mcProdVtxZ = primVtxMC->GetZ();
3677 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3680 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3681 if (!particle)
continue;
3683 Int_t isMCFromMBHeader = -1;
3693 if (TMath::Abs(particle->Eta()) < 0.66 ){
3697 if(particle->GetMother(0) >-1){
3698 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3738 if(particle->Energy() - particle->Pz() == 0 || particle->Energy() + particle->Pz() == 0){
3745 if ( particle->GetPdgCode() == 211 ){
3747 }
else if ( particle->GetPdgCode() == -211 ){
3749 }
else if ( particle->GetPdgCode() == 321 ){
3751 }
else if ( particle->GetPdgCode() == -321 ){
3753 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3755 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3757 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3765 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3766 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3770 if (particle->Pt()>0.005){
3775 if(particle->Energy() - particle->Pz() == 0 || particle->Energy() + particle->Pz() == 0){
3782 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3783 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
3786 if(particle->GetPdgCode() == 111){
3809 }
else if(particle->GetPdgCode() == 221){
3824 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3832 if(particle->GetPdgCode() == 111){
3849 }
else if(particle->GetPdgCode() == 221){
3860 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3861 if (!particle)
continue;
3862 Int_t isMCFromMBHeader = -1;
3870 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3871 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3873 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3875 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3878 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )