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;
928 nBinsClusterPt = 1000;
937 TString cutstringMeson =
"NoMesonCut";
942 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
946 fESDList[iCut]->SetName(Form(
"%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
950 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
952 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
953 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
955 TString TriggerNames =
"Not Trigger: ";
957 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
962 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
966 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
967 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
968 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
969 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
970 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
979 TString TriggerNames =
"Not Trigger: ";
1015 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
1018 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX",200,-5,5);
1020 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY",200,-5,5);
1048 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
1050 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
1052 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
1056 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1062 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift",1, -0.5,0.5);
1083 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s_%s Photon DCA tree",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1101 fHistoConvGammaR[iCut] =
new TH1F(
"ESD_ConvGamma_R",
"ESD_ConvGamma_R",800,0,200);
1104 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",2000,-2,2);
1110 fClusterOutputList[iCut]->SetName(Form(
"%s_%s_%s_%s Cluster Output",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1114 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1117 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
1120 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1126 fGammaERM02[iCut]->SetName(Form(
"%s_%s_%s_%s ConvGamma-Cluster Matched",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1130 tESDGammaERM02[iCut] =
new TTree(
"ESD_ConvGamma_E_ConvR_M02_M20",
"ESD_ConvGamma_E_ConvR_M02_M20");
1145 fInvMassShowerShape[iCut]->SetName(Form(
"%s_%s_%s_%s InvMass_ShowerShape",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1148 tESDInvMassShowerShape[iCut] =
new TTree(
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20",
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20");
1171 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1234 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1239 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1244 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1249 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1259 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
1495 TString cutstringMeson =
"NoMesonCut";
1500 fMCList[iCut]->SetName(Form(
"%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1501 fMCList[iCut]->SetOwner(kTRUE);
1506 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsPt, minPt, maxPt);
1531 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1564 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1567 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1570 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1573 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1576 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1581 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1592 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1594 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1602 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1606 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1630 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1675 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1679 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1683 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1686 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1698 fTrueList[iCut]->SetName(Form(
"%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1703 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",nBinsPt, minPt, maxPt);
1711 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt",nBinsPt, minPt, maxPt,16,-0.5,15.5);
1756 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1759 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1761 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1763 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1765 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1767 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1769 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1772 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH1F(
"TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1787 fHistoTrueNLabelsInClusPt[iCut] =
new TH2F(
"TrueNLabelsInClus_Pt",
"TrueNLabelsInClus_Pt",100,-0.5,99.5,nBinsClusterPt, minClusterPt, maxClusterPt);
1789 fHistoTrueClusGammaEM02[iCut] =
new TH2F(
"TrueClusGammaEM02",
"TrueClusGammaEM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1791 fHistoTrueClusPi0EM02[iCut] =
new TH2F(
"TrueClusPi0EM02",
"TrueClusPi0EM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1793 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1855 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1857 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1861 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1863 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1867 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1869 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
2189 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2194 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2199 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2204 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2215 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
2277 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2341 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2362 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2364 if(eventQuality == 2 || eventQuality == 3){
2391 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2406 Bool_t isRunningEMCALrelAna = kFALSE;
2415 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2436 Bool_t triggered = kTRUE;
2438 if(eventNotAccepted!= 0){
2442 if (eventNotAccepted==3 &&
fIsMC > 0){
2449 if(eventQuality != 0){
2456 if (triggered==kTRUE){
2479 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2488 if (nameBin.CompareTo(
"")== 0){
2490 ->GetAcceptedHeader())->At(i))->GetString();
2491 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2504 if (triggered==kFALSE)
continue;
2600 if(nclus == 0)
return;
2610 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2613 for(
Int_t i = 0; i < nclus; i++){
2614 AliVCluster* clus = NULL;
2615 if(
fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2616 else if(
fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2618 if (!clus)
continue;
2626 TLorentzVector clusterVector;
2627 clus->GetMomentum(clusterVector,vertex);
2629 TLorentzVector* tmpvec =
new TLorentzVector();
2630 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2634 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2643 Int_t* mclabelsCluster = clus->GetLabels();
2646 if (clus->GetNLabels()>0){
2647 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
2663 if (clus->GetNLabels()>1){
2664 Int_t* mclabelsCluster = clus->GetLabels();
2665 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2688 delete PhotonCandidate;
2701 TParticle *Photon = NULL;
2702 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2716 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2717 Double_t mcProdVtxX = primVtxMC->GetX();
2718 Double_t mcProdVtxY = primVtxMC->GetY();
2719 Double_t mcProdVtxZ = primVtxMC->GetZ();
2747 Int_t secondaryClass = -1;
2753 if (secondaryClass > 0 ){
2757 if (secondaryClass == 2)
2760 else if (secondaryClass == 3)
2762 else if (secondaryClass == 5)
2794 if (TruePhotonCandidate->
IsDalitz())
2803 if (TruePhotonCandidate->
IsShower())
2813 Int_t motherLab = Photon->GetMother(0);
2814 if (motherLab > -1){
2821 if ( TMath::Abs(
fMCEvent->Particle(motherLab)->GetPdgCode()) == 111 &&
2829 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2830 if (grandMotherLab > -1){
2847 AliAODMCParticle *Photon = NULL;
2848 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2849 if (AODMCTrackArray){
2850 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2854 AliInfo(
"AODMCTrackArray could not be loaded");
2866 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2867 Double_t mcProdVtxX = primVtxMC->GetX();
2868 Double_t mcProdVtxY = primVtxMC->GetY();
2869 Double_t mcProdVtxZ = primVtxMC->GetZ();
2874 if (Photon->GetMother()> -1){
2875 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2893 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2897 Int_t secondaryClass = -1;
2903 if (secondaryClass > 0 ){
2907 if (secondaryClass == 2)
2910 else if (secondaryClass == 3)
2912 else if (secondaryClass == 5)
2935 if (TruePhotonCandidate->
IsDalitz())
2941 if (TruePhotonCandidate->
IsShower())
2948 Int_t motherLab = Photon->GetMother();
2949 if (motherLab > -1){
2960 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2961 if (grandMotherLab > -1){
2985 if(!PhotonCandidate)
continue;
2992 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3015 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3022 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3034 GammaCandidatesStepOne->Add(PhotonCandidate);
3037 GammaCandidatesStepTwo->Add(PhotonCandidate);
3041 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
3043 if(!PhotonCandidate)
continue;
3048 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3067 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3074 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3083 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
3087 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
3089 if(!PhotonCandidate)
continue;
3094 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
3112 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3119 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3131 delete GammaCandidatesStepOne;
3132 GammaCandidatesStepOne = 0x0;
3133 delete GammaCandidatesStepTwo;
3134 GammaCandidatesStepTwo = 0x0;
3141 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3142 Double_t mcProdVtxX = primVtxMC->GetX();
3143 Double_t mcProdVtxY = primVtxMC->GetY();
3144 Double_t mcProdVtxZ = primVtxMC->GetZ();
3147 if( magField < 0.0 ){
3154 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3155 if (AODMCTrackArray == NULL)
return;
3156 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
3157 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
3160 if(posDaughter == NULL || negDaughter == NULL)
return;
3161 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3163 if(posDaughter->GetMother() != negDaughter->GetMother()){
3168 else if(posDaughter->GetMother() == -1){
3174 if(pdgCode[0]!=11 || pdgCode[1]!=11){
3179 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
3184 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
3185 if(Photon->GetPdgCode() != 22){
3190 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
3224 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3225 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
3233 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3234 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
3242 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3243 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122){
3250 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3251 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
3271 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3272 Double_t mcProdVtxX = primVtxMC->GetX();
3273 Double_t mcProdVtxY = primVtxMC->GetY();
3274 Double_t mcProdVtxZ = primVtxMC->GetZ();
3277 if( magField < 0.0 ){
3289 if(posDaughter == NULL || negDaughter == NULL)
return;
3290 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3292 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
3296 else if(posDaughter->GetMother(0) == -1){
3301 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
3303 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
3307 if(Photon->GetPdgCode() != 22){
3311 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
3326 fCharPhotonMCInfo = 6;
3336 fCharPhotonMCInfo = 2;
3337 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
3338 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3339 fCharPhotonMCInfo = 4;
3345 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3346 fCharPhotonMCInfo = 7;
3352 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3353 fCharPhotonMCInfo = 5;
3359 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3360 fCharPhotonMCInfo = 3;
3385 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3386 Double_t mcProdVtxX = primVtxMC->GetX();
3387 Double_t mcProdVtxY = primVtxMC->GetY();
3388 Double_t mcProdVtxZ = primVtxMC->GetZ();
3390 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3391 if (AODMCTrackArray == NULL)
return;
3394 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3396 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3397 if (!particle)
continue;
3402 Int_t isMCFromMBHeader = -1;
3412 if (TMath::Abs(particle->Eta()) < 0.66 ){
3415 if(particle->GetMother() >-1){
3416 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3444 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
3445 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
3446 if(!tmpDaughter)
continue;
3447 if(TMath::Abs(tmpDaughter->GetPdgCode()) == 11){
3448 rConv = sqrt( (tmpDaughter->Xv()*tmpDaughter->Xv()) + (tmpDaughter->Yv()*tmpDaughter->Yv()) );
3462 if (particle->E() != TMath::Abs(particle->Pz())){
3463 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3465 if( !(ratio <= 0) ){
3470 if ( particle->GetPdgCode() == 211 ){
3472 }
else if ( particle->GetPdgCode() == -211 ){
3474 }
else if ( particle->GetPdgCode() == 321 ){
3476 }
else if ( particle->GetPdgCode() == -321 ){
3478 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3480 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3482 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3490 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3491 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3494 if (particle->Pt()>0.005){
3503 if (particle->E() != TMath::Abs(particle->Pz())){
3504 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3506 if( !(ratio <= 0) ){
3510 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3511 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
3515 if(particle->GetPdgCode() == 111){
3538 }
else if(particle->GetPdgCode() == 221){
3557 if(particle->GetPdgCode() == 111){
3574 }
else if(particle->GetPdgCode() == 221){
3585 Int_t isMCFromMBHeader = -1;
3592 if (particle->GetMother() > -1) {
3593 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3594 if (tmpMother->GetMother() > -1) {
3595 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3596 if(tmpGrandMother->GetPdgCode() == 310) {
3598 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3600 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3603 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3615 if (particle->GetMother() > -1) {
3616 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3617 if (tmpMother->GetMother() > -1) {
3618 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3619 if(tmpGrandMother->GetPdgCode() == 310) {
3621 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3623 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3626 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3640 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3641 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3642 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3643 Int_t pdgCode = mother->GetPdgCode();
3644 if(particle->GetPdgCode() == 111){
3652 }
else if(particle->GetPdgCode() == 221){
3666 if (particle->GetPdgCode() == 111){
3685 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3686 Double_t mcProdVtxX = primVtxMC->GetX();
3687 Double_t mcProdVtxY = primVtxMC->GetY();
3688 Double_t mcProdVtxZ = primVtxMC->GetZ();
3692 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3695 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3696 if (!particle)
continue;
3698 Int_t isMCFromMBHeader = -1;
3708 if (TMath::Abs(particle->Eta()) < 0.66 ){
3712 if(particle->GetMother(0) >-1){
3713 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3754 if (particle->Energy() != TMath::Abs(particle->Pz())){
3755 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3757 if( !(ratio <= 0) ){
3762 if ( particle->GetPdgCode() == 211 ){
3764 }
else if ( particle->GetPdgCode() == -211 ){
3766 }
else if ( particle->GetPdgCode() == 321 ){
3768 }
else if ( particle->GetPdgCode() == -321 ){
3770 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3772 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3774 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3782 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3783 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3787 if (particle->Pt()>0.005){
3793 if (particle->Energy() != TMath::Abs(particle->Pz())){
3794 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3796 if( !(ratio <= 0) ){
3801 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3802 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
3805 if(particle->GetPdgCode() == 111){
3828 }
else if(particle->GetPdgCode() == 221){
3843 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3851 if(particle->GetPdgCode() == 111){
3868 }
else if(particle->GetPdgCode() == 221){
3879 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3880 if (!particle)
continue;
3881 Int_t isMCFromMBHeader = -1;
3889 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3890 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3892 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3894 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3897 if ( !(TMath::Abs(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()) == 11 &&
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 22) )