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"),
72 fBGClusHandlerRP(NULL),
81 fInvMassShowerShape(NULL),
84 fClusterOutputList(NULL),
85 fOutputContainer(NULL),
87 fGammaCandidates(NULL),
88 fClusterCandidates(NULL),
92 fConversionCuts(NULL),
93 fClusterCutArray(NULL),
94 fCaloPhotonCuts(NULL),
97 fHistoConvGammaPt(NULL),
98 fHistoConvGammaR(NULL),
99 fHistoConvGammaEta(NULL),
100 fTreeConvGammaPtDcazCat(NULL),
106 fCharPhotonMCInfo(0),
107 tESDGammaERM02(NULL),
114 tESDClusterNCells(0),
115 tESDClusterMaxECell(0),
117 tESDInvMassShowerShape(0),
118 tESDIMMesonInvMass(0),
123 tESDIMClusterLeadCellID(0),
124 tESDIMClusterClassification(0),
125 tESDIMClusMatchedTrackPt(0),
126 tESDIMClusTrackDeltaEta(0),
127 tESDIMClusTrackDeltaPhi(0),
128 tESDIMClusterIsoSumClusterEt(0),
129 tESDIMClusterIsoSumTrackEt(0),
130 tESDmapIsClusterAcceptedWithoutTrackMatch(),
131 fHistoMotherInvMassPt(NULL),
132 fHistoMotherMatchedInvMassPt(NULL),
133 fSparseMotherInvMassPtZM(NULL),
134 fHistoMotherBackInvMassPt(NULL),
135 fSparseMotherBackInvMassPtZM(NULL),
136 fHistoMotherInvMassPtAlpha(NULL),
137 fHistoMotherPi0PtY(NULL),
138 fHistoMotherEtaPtY(NULL),
139 fHistoMotherPi0PtAlpha(NULL),
140 fHistoMotherEtaPtAlpha(NULL),
141 fHistoMotherPi0PtOpenAngle(NULL),
142 fHistoMotherEtaPtOpenAngle(NULL),
143 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
144 fHistoMotherEtaConvPhotonEtaPhi(NULL),
145 fHistoMotherInvMassECalib(NULL),
146 fHistoMotherBackInvMassECalib(NULL),
147 fHistoPhotonPairPtconv(NULL),
148 fHistoPhotonPairMixedEventPtconv(NULL),
149 fHistoClusGammaPt(NULL),
150 fHistoClusGammaE(NULL),
151 fHistoClusOverlapHeadersGammaPt(NULL),
152 fHistoClusAllHeadersGammaPt(NULL),
153 fHistoClusRejectedHeadersGammaPt(NULL),
154 fHistoMCHeaders(NULL),
155 fHistoMCAllGammaPt(NULL),
156 fHistoMCAllGammaEMCALAccPt(NULL),
157 fHistoMCAllSecondaryGammaPt(NULL),
158 fHistoMCDecayGammaPi0Pt(NULL),
159 fHistoMCDecayGammaRhoPt(NULL),
160 fHistoMCDecayGammaEtaPt(NULL),
161 fHistoMCDecayGammaOmegaPt(NULL),
162 fHistoMCDecayGammaEtapPt(NULL),
163 fHistoMCDecayGammaPhiPt(NULL),
164 fHistoMCDecayGammaSigmaPt(NULL),
165 fHistoMCConvGammaPt(NULL),
166 fHistoMCSecondaryConvGammaPt(NULL),
167 fHistoMCConvGammaR(NULL),
168 fHistoMCConvGammaEta(NULL),
170 fHistoMCPi0WOWeightPt(NULL),
171 fHistoMCPi0WOEvtWeightPt(NULL),
173 fHistoMCEtaWOWeightPt(NULL),
174 fHistoMCEtaWOEvtWeightPt(NULL),
175 fHistoMCPi0InAccPt(NULL),
176 fHistoMCPi0WOWeightInAccPt(NULL),
177 fHistoMCPi0WOEvtWeightInAccPt(NULL),
178 fHistoMCEtaInAccPt(NULL),
179 fHistoMCEtaWOWeightInAccPt(NULL),
180 fHistoMCEtaWOEvtWeightInAccPt(NULL),
181 fHistoMCPi0PtY(NULL),
182 fHistoMCEtaPtY(NULL),
183 fHistoMCPi0PtAlpha(NULL),
184 fHistoMCEtaPtAlpha(NULL),
185 fHistoMCPrimaryPtvsSource(NULL),
186 fHistoMCSecPi0PtvsSource(NULL),
187 fHistoMCSecPi0Source(NULL),
188 fHistoMCSecPi0InAccPtvsSource(NULL),
189 fHistoMCSecEtaPt(NULL),
190 fHistoMCSecEtaSource(NULL),
191 fHistoMCPi0PtJetPt(NULL),
192 fHistoMCEtaPtJetPt(NULL),
193 fHistoMCPi0PtGammaLeg(NULL),
194 fHistoMCPi0WOWeightPtGammaLeg(NULL),
195 fHistoMCPi0InAccPtGammaLeg(NULL),
196 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
197 fHistoMCSecPi0PtGamma1vsSource(NULL),
198 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
199 fHistoMCSecPi0PtGamma2vsSource(NULL),
200 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
201 fHistoTruePi0InvMassPt(NULL),
202 fHistoTrueEtaInvMassPt(NULL),
203 fHistoTruePi0MatchedInvMassPt(NULL),
204 fHistoTrueEtaMatchedInvMassPt(NULL),
205 fHistoTruePi0CaloPhotonInvMassPt(NULL),
206 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
207 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
208 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
209 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
210 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
211 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
212 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
213 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
214 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
215 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
216 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
217 fHistoTruePi0CaloElectronInvMassPt(NULL),
218 fHistoTrueEtaCaloElectronInvMassPt(NULL),
219 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
220 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
221 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
222 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
223 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
224 fHistoTruePrimaryPi0InvMassPt(NULL),
225 fHistoTruePrimaryEtaInvMassPt(NULL),
226 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
227 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
228 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
229 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
230 fHistoTruePrimaryPi0MCPtResolPt(NULL),
231 fHistoTruePrimaryEtaMCPtResolPt(NULL),
232 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
233 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
234 fHistoTrueSecondaryPi0InvMassPt(NULL),
235 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
236 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
237 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
238 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
239 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
240 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
241 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
242 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
243 fHistoTrueBckGGInvMassPt(NULL),
244 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
245 fHistoTrueBckAsymEClustersInvMassPt(NULL),
246 fHistoTrueBckContInvMassPt(NULL),
247 fHistoTruePi0PtY(NULL),
248 fHistoTrueEtaPtY(NULL),
249 fHistoTruePi0PtAlpha(NULL),
250 fHistoTrueEtaPtAlpha(NULL),
251 fHistoTruePi0PtOpenAngle(NULL),
252 fHistoTrueEtaPtOpenAngle(NULL),
253 fHistoTrueConvGammaPt(NULL),
254 fHistoTrueConvGammaEta(NULL),
255 fHistoCombinatorialPt(NULL),
256 fHistoTruePrimaryConvGammaPt(NULL),
257 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
258 fHistoTrueSecondaryConvGammaPt(NULL),
259 fHistoTrueSecondaryConvGammaMCPt(NULL),
260 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
261 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
262 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
263 fHistoTrueClusGammaPt(NULL),
264 fHistoTrueClusElectronPt(NULL),
265 fHistoTrueClusConvGammaPt(NULL),
266 fHistoTrueClusConvGammaFullyPt(NULL),
267 fHistoTrueClusMergedGammaPt(NULL),
268 fHistoTrueClusMergedPartConvGammaPt(NULL),
269 fHistoTrueClusDalitzPt(NULL),
270 fHistoTrueClusDalitzMergedPt(NULL),
271 fHistoTrueClusPhotonFromElecMotherPt(NULL),
272 fHistoTrueClusShowerPt(NULL),
273 fHistoTrueClusSubLeadingPt(NULL),
274 fHistoTrueClusNMothers(NULL),
275 fHistoTrueClusEMNonLeadingPt(NULL),
276 fHistoTrueNLabelsInClusPt(NULL),
277 fHistoTruePrimaryClusGammaPt(NULL),
278 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
279 fHistoTruePrimaryClusConvGammaPt(NULL),
280 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
281 fHistoTrueSecondaryClusGammaPt(NULL),
282 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
283 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
284 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
285 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
286 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
287 fHistoTruePrimaryPi0DCPtconv(NULL),
288 fHistoTruePrimaryPi0MissingPtconv(NULL),
289 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
290 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
291 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
292 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
293 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
294 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
295 fVectorRecTruePi0s(0),
296 fVectorRecTrueEtas(0),
297 fHistoDoubleCountTruePi0InvMassPt(NULL),
298 fHistoDoubleCountTrueEtaInvMassPt(NULL),
299 fHistoDoubleCountTrueConvGammaRPt(NULL),
300 fHistoDoubleCountTrueClusterGammaPt(NULL),
301 fVectorDoubleCountTruePi0s(0),
302 fVectorDoubleCountTrueEtas(0),
303 fVectorDoubleCountTrueConvGammas(0),
304 fVectorDoubleCountTrueClusterGammas(0),
305 fHistoMultipleCountTruePi0(NULL),
306 fHistoMultipleCountTrueEta(NULL),
307 fHistoMultipleCountTrueConvGamma(NULL),
308 fHistoMultipleCountTrueClusterGamma(NULL),
309 fMapMultipleCountTruePi0s(),
310 fMapMultipleCountTrueEtas(),
311 fMapMultipleCountTrueConvGammas(),
312 fMapMultipleCountTrueClusterGammas(),
313 fHistoTrueClusGammaEM02(NULL),
314 fHistoTrueClusPi0EM02(NULL),
315 fHistoTruePi0InvMassECalib(NULL),
316 fHistoTruePi0PureGammaInvMassECalib(NULL),
318 fHistoNEventsWOWeight(NULL),
319 fHistoNGoodESDTracks(NULL),
323 fHistoNGammaCandidates(NULL),
324 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
325 fHistoSPDClusterTrackletBackground(NULL),
326 fHistoNV0Tracks(NULL),
327 fProfileEtaShift(NULL),
328 fProfileJetJetXSection(NULL),
329 fHistoJetJetNTrials(NULL),
332 fEventPlaneAngle(-100),
334 fNGammaCandidates(0),
345 fMoveParticleAccordingToVertex(kTRUE),
347 fDoLightOutput(kFALSE),
348 fDoMesonAnalysis(kTRUE),
352 fIsFromDesiredHeader(kTRUE),
353 fIsOverlappingWithOtherHeader(kFALSE),
356 fSetPlotHistsExtQA(kFALSE),
358 fDoConvGammaShowerShapeTree(kFALSE),
359 fEnableSortForClusMC(kFALSE),
360 fDoPrimaryTrackMatching(kFALSE),
361 fDoInvMassShowerShapeTree(kFALSE),
363 fFileNameBroken(NULL),
364 fAllowOverlapHeaders(kTRUE)
373 fV0ReaderName(
"V0ReaderV1"),
374 fCorrTaskSetting(
""),
377 fBGClusHandler(NULL),
378 fBGClusHandlerRP(NULL),
385 fPhotonDCAList(NULL),
387 fInvMassShowerShape(NULL),
390 fClusterOutputList(NULL),
393 fGammaCandidates(NULL),
394 fClusterCandidates(NULL),
395 fEventCutArray(NULL),
398 fConversionCuts(NULL),
399 fClusterCutArray(NULL),
400 fCaloPhotonCuts(NULL),
401 fMesonCutArray(NULL),
403 fHistoConvGammaPt(NULL),
404 fHistoConvGammaR(NULL),
405 fHistoConvGammaEta(NULL),
406 fTreeConvGammaPtDcazCat(NULL),
412 fCharPhotonMCInfo(0),
413 tESDGammaERM02(NULL),
420 tESDClusterNCells(0),
421 tESDClusterMaxECell(0),
423 tESDInvMassShowerShape(0),
424 tESDIMMesonInvMass(0),
429 tESDIMClusterLeadCellID(0),
430 tESDIMClusterClassification(0),
431 tESDIMClusMatchedTrackPt(0),
432 tESDIMClusTrackDeltaEta(0),
433 tESDIMClusTrackDeltaPhi(0),
434 tESDIMClusterIsoSumClusterEt(0),
435 tESDIMClusterIsoSumTrackEt(0),
436 tESDmapIsClusterAcceptedWithoutTrackMatch(),
437 fHistoMotherInvMassPt(NULL),
438 fHistoMotherMatchedInvMassPt(NULL),
439 fSparseMotherInvMassPtZM(NULL),
440 fHistoMotherBackInvMassPt(NULL),
441 fSparseMotherBackInvMassPtZM(NULL),
442 fHistoMotherInvMassPtAlpha(NULL),
443 fHistoMotherPi0PtY(NULL),
444 fHistoMotherEtaPtY(NULL),
445 fHistoMotherPi0PtAlpha(NULL),
446 fHistoMotherEtaPtAlpha(NULL),
447 fHistoMotherPi0PtOpenAngle(NULL),
448 fHistoMotherEtaPtOpenAngle(NULL),
449 fHistoMotherPi0ConvPhotonEtaPhi(NULL),
450 fHistoMotherEtaConvPhotonEtaPhi(NULL),
451 fHistoMotherInvMassECalib(NULL),
452 fHistoMotherBackInvMassECalib(NULL),
453 fHistoPhotonPairPtconv(NULL),
454 fHistoPhotonPairMixedEventPtconv(NULL),
455 fHistoClusGammaPt(NULL),
456 fHistoClusGammaE(NULL),
457 fHistoClusOverlapHeadersGammaPt(NULL),
458 fHistoClusAllHeadersGammaPt(NULL),
459 fHistoClusRejectedHeadersGammaPt(NULL),
460 fHistoMCHeaders(NULL),
461 fHistoMCAllGammaPt(NULL),
462 fHistoMCAllGammaEMCALAccPt(NULL),
463 fHistoMCAllSecondaryGammaPt(NULL),
464 fHistoMCDecayGammaPi0Pt(NULL),
465 fHistoMCDecayGammaRhoPt(NULL),
466 fHistoMCDecayGammaEtaPt(NULL),
467 fHistoMCDecayGammaOmegaPt(NULL),
468 fHistoMCDecayGammaEtapPt(NULL),
469 fHistoMCDecayGammaPhiPt(NULL),
470 fHistoMCDecayGammaSigmaPt(NULL),
471 fHistoMCConvGammaPt(NULL),
472 fHistoMCSecondaryConvGammaPt(NULL),
473 fHistoMCConvGammaR(NULL),
474 fHistoMCConvGammaEta(NULL),
476 fHistoMCPi0WOWeightPt(NULL),
477 fHistoMCPi0WOEvtWeightPt(NULL),
479 fHistoMCEtaWOWeightPt(NULL),
480 fHistoMCEtaWOEvtWeightPt(NULL),
481 fHistoMCPi0InAccPt(NULL),
482 fHistoMCPi0WOWeightInAccPt(NULL),
483 fHistoMCPi0WOEvtWeightInAccPt(NULL),
484 fHistoMCEtaInAccPt(NULL),
485 fHistoMCEtaWOWeightInAccPt(NULL),
486 fHistoMCEtaWOEvtWeightInAccPt(NULL),
487 fHistoMCPi0PtY(NULL),
488 fHistoMCEtaPtY(NULL),
489 fHistoMCPi0PtAlpha(NULL),
490 fHistoMCEtaPtAlpha(NULL),
491 fHistoMCPrimaryPtvsSource(NULL),
492 fHistoMCSecPi0PtvsSource(NULL),
493 fHistoMCSecPi0Source(NULL),
494 fHistoMCSecPi0InAccPtvsSource(NULL),
495 fHistoMCSecEtaPt(NULL),
496 fHistoMCSecEtaSource(NULL),
497 fHistoMCPi0PtJetPt(NULL),
498 fHistoMCEtaPtJetPt(NULL),
499 fHistoMCPi0PtGammaLeg(NULL),
500 fHistoMCPi0WOWeightPtGammaLeg(NULL),
501 fHistoMCPi0InAccPtGammaLeg(NULL),
502 fHistoMCPi0WOWeightInAccPtGammaLeg(NULL),
503 fHistoMCSecPi0PtGamma1vsSource(NULL),
504 fHistoMCSecPi0InAccPtGamma1vsSource(NULL),
505 fHistoMCSecPi0PtGamma2vsSource(NULL),
506 fHistoMCSecPi0InAccPtGamma2vsSource(NULL),
507 fHistoTruePi0InvMassPt(NULL),
508 fHistoTrueEtaInvMassPt(NULL),
509 fHistoTruePi0MatchedInvMassPt(NULL),
510 fHistoTrueEtaMatchedInvMassPt(NULL),
511 fHistoTruePi0CaloPhotonInvMassPt(NULL),
512 fHistoTrueEtaCaloPhotonInvMassPt(NULL),
513 fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL),
514 fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL),
515 fHistoTruePi0CaloConvPhotonConvRPt(NULL),
516 fHistoTruePi0CaloConvPhotonConvRAlpha(NULL),
517 fHistoTruePi0CaloConvPhotonPtAlpha(NULL),
518 fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL),
519 fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL),
520 fHistoTrueEtaCaloConvPhotonConvRPt(NULL),
521 fHistoTrueEtaCaloConvPhotonConvRAlpha(NULL),
522 fHistoTrueEtaCaloConvPhotonPtAlpha(NULL),
523 fHistoTruePi0CaloElectronInvMassPt(NULL),
524 fHistoTrueEtaCaloElectronInvMassPt(NULL),
525 fHistoTruePi0CaloMergedClusterInvMassPt(NULL),
526 fHistoTrueEtaCaloMergedClusterInvMassPt(NULL),
527 fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL),
528 fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL),
529 fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL),
530 fHistoTruePrimaryPi0InvMassPt(NULL),
531 fHistoTruePrimaryEtaInvMassPt(NULL),
532 fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL),
533 fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL),
534 fProfileTruePrimaryPi0WeightsInvMassPt(NULL),
535 fProfileTruePrimaryEtaWeightsInvMassPt(NULL),
536 fHistoTruePrimaryPi0MCPtResolPt(NULL),
537 fHistoTruePrimaryEtaMCPtResolPt(NULL),
538 fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
539 fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
540 fHistoTrueSecondaryPi0InvMassPt(NULL),
541 fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
542 fHistoTrueK0sWithPi0DaughterMCPt(NULL),
543 fHistoTrueSecondaryPi0FromK0lInvMassPt(NULL),
544 fHistoTrueK0lWithPi0DaughterMCPt(NULL),
545 fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
546 fHistoTrueEtaWithPi0DaughterMCPt(NULL),
547 fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL),
548 fHistoTrueLambdaWithPi0DaughterMCPt(NULL),
549 fHistoTrueBckGGInvMassPt(NULL),
550 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
551 fHistoTrueBckAsymEClustersInvMassPt(NULL),
552 fHistoTrueBckContInvMassPt(NULL),
553 fHistoTruePi0PtY(NULL),
554 fHistoTrueEtaPtY(NULL),
555 fHistoTruePi0PtAlpha(NULL),
556 fHistoTrueEtaPtAlpha(NULL),
557 fHistoTruePi0PtOpenAngle(NULL),
558 fHistoTrueEtaPtOpenAngle(NULL),
559 fHistoTrueConvGammaPt(NULL),
560 fHistoTrueConvGammaEta(NULL),
561 fHistoCombinatorialPt(NULL),
562 fHistoTruePrimaryConvGammaPt(NULL),
563 fHistoTruePrimaryConvGammaESDPtMCPt(NULL),
564 fHistoTrueSecondaryConvGammaPt(NULL),
565 fHistoTrueSecondaryConvGammaMCPt(NULL),
566 fHistoTrueSecondaryConvGammaFromXFromK0sMCPtESDPt(NULL),
567 fHistoTrueSecondaryConvGammaFromXFromK0lMCPtESDPt(NULL),
568 fHistoTrueSecondaryConvGammaFromXFromLambdaMCPtESDPt(NULL),
569 fHistoTrueClusGammaPt(NULL),
570 fHistoTrueClusElectronPt(NULL),
571 fHistoTrueClusConvGammaPt(NULL),
572 fHistoTrueClusConvGammaFullyPt(NULL),
573 fHistoTrueClusMergedGammaPt(NULL),
574 fHistoTrueClusMergedPartConvGammaPt(NULL),
575 fHistoTrueClusDalitzPt(NULL),
576 fHistoTrueClusDalitzMergedPt(NULL),
577 fHistoTrueClusPhotonFromElecMotherPt(NULL),
578 fHistoTrueClusShowerPt(NULL),
579 fHistoTrueClusSubLeadingPt(NULL),
580 fHistoTrueClusNMothers(NULL),
581 fHistoTrueClusEMNonLeadingPt(NULL),
582 fHistoTrueNLabelsInClusPt(NULL),
583 fHistoTruePrimaryClusGammaPt(NULL),
584 fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
585 fHistoTruePrimaryClusConvGammaPt(NULL),
586 fHistoTruePrimaryClusConvGammaESDPtMCPt(NULL),
587 fHistoTrueSecondaryClusGammaPt(NULL),
588 fHistoTrueSecondaryClusGammaFromK0sPt(NULL),
589 fHistoTrueSecondaryClusGammaFromK0lPt(NULL),
590 fHistoTrueSecondaryClusGammaFromLambdaPt(NULL),
591 fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
592 fHistoTruePrimaryPi0W0WeightsPhotonPairPtconv(NULL),
593 fHistoTruePrimaryPi0DCPtconv(NULL),
594 fHistoTruePrimaryPi0MissingPtconv(NULL),
595 fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
596 fHistoTrueSecondaryPi0FromK0sPhotonPairPtconv(NULL),
597 fHistoTrueSecondaryPi0FromK0lPhotonPairPtconv(NULL),
598 fHistoTrueSecondaryPi0FromLambdaPhotonPairPtconv(NULL),
599 fHistoTrueSecondaryPi0DCPtconvSource(NULL),
600 fHistoTrueSecondaryPi0MissingPtconvSource(NULL),
601 fVectorRecTruePi0s(0),
602 fVectorRecTrueEtas(0),
603 fHistoDoubleCountTruePi0InvMassPt(NULL),
604 fHistoDoubleCountTrueEtaInvMassPt(NULL),
605 fHistoDoubleCountTrueConvGammaRPt(NULL),
606 fHistoDoubleCountTrueClusterGammaPt(NULL),
607 fVectorDoubleCountTruePi0s(0),
608 fVectorDoubleCountTrueEtas(0),
609 fVectorDoubleCountTrueConvGammas(0),
610 fVectorDoubleCountTrueClusterGammas(0),
611 fHistoMultipleCountTruePi0(NULL),
612 fHistoMultipleCountTrueEta(NULL),
613 fHistoMultipleCountTrueConvGamma(NULL),
614 fHistoMultipleCountTrueClusterGamma(NULL),
615 fMapMultipleCountTruePi0s(),
616 fMapMultipleCountTrueEtas(),
617 fMapMultipleCountTrueConvGammas(),
618 fMapMultipleCountTrueClusterGammas(),
619 fHistoTrueClusGammaEM02(NULL),
620 fHistoTrueClusPi0EM02(NULL),
621 fHistoTruePi0InvMassECalib(NULL),
622 fHistoTruePi0PureGammaInvMassECalib(NULL),
624 fHistoNEventsWOWeight(NULL),
625 fHistoNGoodESDTracks(NULL),
629 fHistoNGammaCandidates(NULL),
630 fHistoNGoodESDTracksVsNGammaCandidates(NULL),
631 fHistoSPDClusterTrackletBackground(NULL),
632 fHistoNV0Tracks(NULL),
633 fProfileEtaShift(NULL),
634 fProfileJetJetXSection(NULL),
635 fHistoJetJetNTrials(NULL),
638 fEventPlaneAngle(-100),
640 fNGammaCandidates(0),
651 fMoveParticleAccordingToVertex(kTRUE),
653 fDoLightOutput(kFALSE),
654 fDoMesonAnalysis(kTRUE),
658 fIsFromDesiredHeader(kTRUE),
659 fIsOverlappingWithOtherHeader(kFALSE),
662 fSetPlotHistsExtQA(kFALSE),
664 fDoConvGammaShowerShapeTree(kFALSE),
665 fEnableSortForClusMC(kFALSE),
666 fDoPrimaryTrackMatching(kFALSE),
667 fDoInvMassShowerShapeTree(kFALSE),
669 fFileNameBroken(NULL),
670 fAllowOverlapHeaders(kTRUE)
673 DefineOutput(1, TList::Class());
706 const Int_t nDim = 4;
707 Int_t nBins[nDim] = {800,300,7,4};
733 if(collisionSystem == 1 || collisionSystem == 2 ||
734 collisionSystem == 5 || collisionSystem == 8 ||
735 collisionSystem == 9){
736 centMin = centMin*10;
737 centMax = centMax*10;
738 if(centMax ==0 && centMax!=centMin) centMax=100;
739 }
else if(collisionSystem == 3 || collisionSystem == 6){
742 }
else if(collisionSystem == 4 || collisionSystem == 7){
743 centMin = ((centMin*5)+45);
744 centMax = ((centMax*5)+45);
749 fBackList[iCut]->SetName(Form(
"%s_%s_%s_%s Back histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(), cutstringMeson.Data()));
757 fMotherList[iCut]->SetName(Form(
"%s_%s_%s_%s Mother histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
761 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
767 collisionSystem,centMin,centMax,
772 collisionSystem,centMin,centMax,
795 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
801 }
else if (
fIsMC == 3){
903 Int_t nBinsQAPt = 200;
906 Int_t nBinsClusterPt = 500;
916 nBinsClusterPt = 800;
926 nBinsClusterPt = 800;
938 nBinsClusterPt = 1000;
947 TString cutstringMeson =
"NoMesonCut";
952 fCutFolder[iCut]->SetName(Form(
"Cut Number %s_%s_%s_%s",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
956 fESDList[iCut]->SetName(Form(
"%s_%s_%s_%s ESD histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
960 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents",14,-0.5,13.5);
962 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
963 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
965 TString TriggerNames =
"Not Trigger: ";
967 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
972 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
976 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
977 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
978 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
979 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
980 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
989 TString TriggerNames =
"Not Trigger: ";
1025 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ",1000,-50,50);
1028 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX",200,-5,5);
1030 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY",200,-5,5);
1058 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",30000,0,30000);
1060 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",2500,0,2500);
1062 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity",1500,0,1500);
1066 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1072 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift",1, -0.5,0.5);
1093 fPhotonDCAList[iCut]->SetName(Form(
"%s_%s_%s_%s Photon DCA tree",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1111 fHistoConvGammaR[iCut] =
new TH1F(
"ESD_ConvGamma_R",
"ESD_ConvGamma_R",800,0,200);
1114 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",2000,-2,2);
1120 fClusterOutputList[iCut]->SetName(Form(
"%s_%s_%s_%s Cluster Output",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1124 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1127 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E",nBinsClusterPt, minClusterPt, maxClusterPt);
1130 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1133 fHistoClusAllHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaAllHeaders_Pt",
"ClusGammaAllHeaders_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1142 fGammaERM02[iCut]->SetName(Form(
"%s_%s_%s_%s ConvGamma-Cluster Matched",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1146 tESDGammaERM02[iCut] =
new TTree(
"ESD_ConvGamma_E_ConvR_M02_M20",
"ESD_ConvGamma_E_ConvR_M02_M20");
1161 fInvMassShowerShape[iCut]->SetName(Form(
"%s_%s_%s_%s InvMass_ShowerShape",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1164 tESDInvMassShowerShape[iCut] =
new TTree(
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20",
"ESD_Meson_InvMass_Pt_ClusE_ClusM02_ClusM20");
1189 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",800,0,0.8,nBinsPt, minPt, maxPt);
1252 fHistoMotherPi0PtY[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Y",
"ESD_MotherPi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1257 fHistoMotherEtaPtY[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Y",
"ESD_MotherEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1262 fHistoMotherPi0PtAlpha[iCut] =
new TH2F(
"ESD_MotherPi0_Pt_Alpha",
"ESD_MotherPi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1267 fHistoMotherEtaPtAlpha[iCut] =
new TH2F(
"ESD_MotherEta_Pt_Alpha",
"ESD_MotherEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1277 fHistoMotherEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherEta_Pt_OpenAngle",
"ESD_MotherEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
1513 TString cutstringMeson =
"NoMesonCut";
1518 fMCList[iCut]->SetName(Form(
"%s_%s_%s_%s MC histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1519 fMCList[iCut]->SetOwner(kTRUE);
1524 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",nBinsPt, minPt, maxPt);
1549 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",nBinsPt, minPt, maxPt);
1582 fHistoMCPi0Pt[iCut] =
new TH1F(
"MC_Pi0_Pt",
"MC_Pi0_Pt",nBinsPt, minPt, maxPt);
1585 fHistoMCPi0WOWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOWeights_Pt",
"MC_Pi0_WOWeights_Pt",nBinsPt, minPt, maxPt);
1588 fHistoMCEtaPt[iCut] =
new TH1F(
"MC_Eta_Pt",
"MC_Eta_Pt",nBinsPt, minPt, maxPt);
1591 fHistoMCEtaWOWeightPt[iCut] =
new TH1F(
"MC_Eta_WOWeights_Pt",
"MC_Eta_WOWeights_Pt",nBinsPt, minPt, maxPt);
1594 fHistoMCPi0InAccPt[iCut] =
new TH1F(
"MC_Pi0InAcc_Pt",
"MC_Pi0InAcc_Pt",nBinsPt, minPt, maxPt);
1599 fHistoMCEtaInAccPt[iCut] =
new TH1F(
"MC_EtaInAcc_Pt",
"MC_EtaInAcc_Pt",nBinsPt, minPt, maxPt);
1610 fHistoMCPi0WOEvtWeightPt[iCut] =
new TH1F(
"MC_Pi0_WOEventWeights_Pt",
"MC_Pi0_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1612 fHistoMCEtaWOEvtWeightPt[iCut] =
new TH1F(
"MC_Eta_WOEventWeights_Pt",
"MC_Eta_WOEventWeights_Pt",nBinsPt, minPt, maxPt);
1620 fHistoMCPi0PtJetPt[iCut] =
new TH2F(
"MC_Pi0_Pt_JetPt",
"MC_Pi0_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1624 fHistoMCEtaPtJetPt[iCut] =
new TH2F(
"MC_Eta_Pt_JetPt",
"MC_Eta_Pt_JetPt",nBinsQAPt, minQAPt, maxQAPt,200,0,200);
1648 fHistoMCSecEtaPt[iCut] =
new TH1F(
"MC_SecEta_Pt",
"MC_SecEta_Pt",nBinsPt, minPt, maxPt);
1693 fHistoMCPi0PtY[iCut] =
new TH2F(
"MC_Pi0_Pt_Y",
"MC_Pi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1697 fHistoMCEtaPtY[iCut] =
new TH2F(
"MC_Eta_Pt_Y",
"MC_Eta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
1701 fHistoMCPi0PtAlpha[iCut] =
new TH2F(
"MC_Pi0_Pt_Alpha",
"MC_Pi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1704 fHistoMCEtaPtAlpha[iCut] =
new TH2F(
"MC_Eta_Pt_Alpha",
"MC_Eta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
1716 fTrueList[iCut]->SetName(Form(
"%s_%s_%s_%s True histograms",cutstringEvent.Data(),cutstringPhoton.Data(),cutstringCalo.Data(),cutstringMeson.Data()));
1721 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",nBinsPt, minPt, maxPt);
1729 fHistoCombinatorialPt[iCut] =
new TH2F(
"ESD_TrueCombinatorial_Pt",
"ESD_TrueCombinatorial_Pt",nBinsPt, minPt, maxPt,16,-0.5,15.5);
1774 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1777 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1779 fHistoTruePrimaryClusGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusGamma_Pt_MCPt",
"ESD_TruePrimaryClusGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1781 fHistoTrueClusElectronPt[iCut] =
new TH1F(
"TrueClusElectron_Pt",
"TrueElectronGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1783 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1785 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1787 fHistoTruePrimaryClusConvGammaESDPtMCPt[iCut] =
new TH2F(
"TruePrimaryClusConvGamma_Pt_MCPt",
"ESD_TruePrimaryClusConvGamma_Pt_MCPt",nBinsClusterPt, minClusterPt, maxClusterPt, nBinsClusterPt, minClusterPt, maxClusterPt);
1790 fHistoTrueSecondaryClusGammaPt[iCut] =
new TH1F(
"TrueSecondaryClusGamma_Pt",
"ESD_TrueSecondaryClusGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1805 fHistoTrueNLabelsInClusPt[iCut] =
new TH2F(
"TrueNLabelsInClus_Pt",
"TrueNLabelsInClus_Pt",100,-0.5,99.5,nBinsClusterPt, minClusterPt, maxClusterPt);
1807 fHistoTrueClusGammaEM02[iCut] =
new TH2F(
"TrueClusGammaEM02",
"TrueClusGammaEM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1809 fHistoTrueClusPi0EM02[iCut] =
new TH2F(
"TrueClusPi0EM02",
"TrueClusPi0EM02",nBinsClusterPt, minClusterPt, maxClusterPt,400,0,5);
1811 fHistoTrueClusEMNonLeadingPt[iCut] =
new TH1F(
"TrueClusEMNonLeading_Pt",
"TrueClusEMNonLeading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1873 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1875 fHistoTrueClusMergedGammaPt[iCut] =
new TH1F(
"TrueClusMergedGamma_Pt",
"TrueClusMergedGamma_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1879 fHistoTrueClusDalitzPt[iCut] =
new TH1F(
"TrueClusDalitz_Pt",
"TrueClusDalitz_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1881 fHistoTrueClusDalitzMergedPt[iCut] =
new TH1F(
"TrueClusDalitzMerged_Pt",
"TrueClusDalitzMerged_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1885 fHistoTrueClusShowerPt[iCut] =
new TH1F(
"TrueClusShower_Pt",
"TrueClusShower_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
1887 fHistoTrueClusSubLeadingPt[iCut] =
new TH1F(
"TrueClusSubleading_Pt",
"TrueClusSubleading_Pt",nBinsClusterPt, minClusterPt, maxClusterPt);
2207 fHistoTruePi0PtY[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Y",
"ESD_TruePi0_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2212 fHistoTrueEtaPtY[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Y",
"ESD_TrueEta_Pt_Y",nBinsQAPt, minQAPt, maxQAPt,150,-1.5,1.5);
2217 fHistoTruePi0PtAlpha[iCut] =
new TH2F(
"ESD_TruePi0_Pt_Alpha",
"ESD_TruePi0_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2222 fHistoTrueEtaPtAlpha[iCut] =
new TH2F(
"ESD_TrueEta_Pt_Alpha",
"ESD_TrueEta_Pt_Alpha",nBinsQAPt, minQAPt, maxQAPt,200,-1,1);
2233 fHistoTrueEtaPtOpenAngle[iCut] =
new TH2F(
"ESD_TrueEta_Pt_OpenAngle",
"ESD_TrueEta_Pt_OpenAngle",nBinsQAPt, minQAPt, maxQAPt,200,0,TMath::Pi());
2295 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
2359 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
2380 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
2382 if(eventQuality == 2 || eventQuality == 3){
2409 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
2424 Bool_t isRunningEMCALrelAna = kFALSE;
2433 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
2454 Bool_t triggered = kTRUE;
2456 if(eventNotAccepted!= 0){
2460 if (eventNotAccepted==3 &&
fIsMC > 0){
2467 if(eventQuality != 0){
2474 if (triggered==kTRUE){
2497 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2506 if (nameBin.CompareTo(
"")== 0){
2508 ->GetAcceptedHeader())->At(i))->GetString();
2509 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
2522 if (triggered==kFALSE)
continue;
2613 TClonesArray * arrClustersProcess = NULL;
2618 if(!arrClustersProcess)
2619 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskGammaConvCalo! Check the correction framework settings!",
fCorrTaskSetting.Data()));
2620 nclus = arrClustersProcess->GetEntries();
2625 if(nclus == 0)
return;
2635 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2638 for(
Int_t i = 0; i < nclus; i++){
2639 AliVCluster* clus = NULL;
2641 if(arrClustersProcess)
2642 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
2644 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
2645 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2646 if(arrClustersProcess)
2647 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
2649 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
2652 if (!clus)
continue;
2660 TLorentzVector clusterVector;
2661 clus->GetMomentum(clusterVector,vertex);
2663 TLorentzVector* tmpvec =
new TLorentzVector();
2664 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
2668 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
2677 Int_t* mclabelsCluster = clus->GetLabels();
2680 if (clus->GetNLabels()>0){
2681 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
2697 if (clus->GetNLabels()>1){
2698 Int_t* mclabelsCluster = clus->GetLabels();
2699 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
2724 delete PhotonCandidate;
2737 TParticle *Photon = NULL;
2738 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2752 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2753 Double_t mcProdVtxX = primVtxMC->GetX();
2754 Double_t mcProdVtxY = primVtxMC->GetY();
2755 Double_t mcProdVtxZ = primVtxMC->GetZ();
2783 Int_t secondaryClass = -1;
2789 if (secondaryClass > 0 ){
2793 if (secondaryClass == 2)
2796 else if (secondaryClass == 3)
2798 else if (secondaryClass == 5)
2830 if (TruePhotonCandidate->
IsDalitz())
2839 if (TruePhotonCandidate->
IsShower())
2849 Int_t motherLab = Photon->GetMother(0);
2850 if (motherLab > -1){
2857 if ( TMath::Abs(
fMCEvent->Particle(motherLab)->GetPdgCode()) == 111 &&
2865 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
2866 if (grandMotherLab > -1){
2883 AliAODMCParticle *Photon = NULL;
2884 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2885 if (AODMCTrackArray){
2886 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
2890 AliInfo(
"AODMCTrackArray could not be loaded");
2902 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2903 Double_t mcProdVtxX = primVtxMC->GetX();
2904 Double_t mcProdVtxY = primVtxMC->GetY();
2905 Double_t mcProdVtxZ = primVtxMC->GetZ();
2910 if (Photon->GetMother()> -1){
2911 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2928 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
2932 Int_t secondaryClass = -1;
2938 if (secondaryClass > 0 ){
2942 if (secondaryClass == 2)
2945 else if (secondaryClass == 3)
2947 else if (secondaryClass == 5)
2970 if (TruePhotonCandidate->
IsDalitz())
2976 if (TruePhotonCandidate->
IsShower())
2983 Int_t motherLab = Photon->GetMother();
2984 if (motherLab > -1){
2995 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
2996 if (grandMotherLab > -1){
3018 if(!PhotonCandidate)
continue;
3048 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3055 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3067 GammaCandidatesStepOne->Add(PhotonCandidate);
3070 GammaCandidatesStepTwo->Add(PhotonCandidate);
3074 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
3076 if(!PhotonCandidate)
continue;
3100 if (
fIsHeavyIon ==1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3107 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3116 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
3120 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
3122 if(!PhotonCandidate)
continue;
3145 if (
fIsHeavyIon == 1 && PhotonCandidate->Pt() > 0.399 && PhotonCandidate->Pt() < 12.){
3152 }
else if ( PhotonCandidate->Pt() > 0.299 && PhotonCandidate->Pt() < 16.){
3164 delete GammaCandidatesStepOne;
3165 GammaCandidatesStepOne = 0x0;
3166 delete GammaCandidatesStepTwo;
3167 GammaCandidatesStepTwo = 0x0;
3174 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3175 Double_t mcProdVtxX = primVtxMC->GetX();
3176 Double_t mcProdVtxY = primVtxMC->GetY();
3177 Double_t mcProdVtxZ = primVtxMC->GetZ();
3180 if( magField < 0.0 ){
3187 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3188 if (AODMCTrackArray == NULL)
return;
3189 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
3190 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
3193 if(posDaughter == NULL || negDaughter == NULL)
return;
3194 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3196 if(posDaughter->GetMother() != negDaughter->GetMother()){
3201 else if(posDaughter->GetMother() == -1){
3207 if(pdgCode[0]!=11 || pdgCode[1]!=11){
3212 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
3217 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
3218 if(Photon->GetPdgCode() != 22){
3223 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
3257 if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3258 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 310){
3266 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3267 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 130) {
3275 }
else if(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3276 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 3122){
3283 }
else if (((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother() > -1 &&
3284 ((AliAODMCParticle*)AODMCTrackArray->At(((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetMother()))->GetPdgCode() == 221) {
3304 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3305 Double_t mcProdVtxX = primVtxMC->GetX();
3306 Double_t mcProdVtxY = primVtxMC->GetY();
3307 Double_t mcProdVtxZ = primVtxMC->GetZ();
3310 if( magField < 0.0 ){
3322 if(posDaughter == NULL || negDaughter == NULL)
return;
3323 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
3325 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
3329 else if(posDaughter->GetMother(0) == -1){
3334 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
3336 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
3340 if(Photon->GetPdgCode() != 22){
3344 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
3359 fCharPhotonMCInfo = 6;
3369 fCharPhotonMCInfo = 2;
3370 if( Photon->GetMother(0) > -1 &&
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0) > -1){
3371 if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3372 fCharPhotonMCInfo = 4;
3378 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {
3379 fCharPhotonMCInfo = 7;
3385 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 3122) {
3386 fCharPhotonMCInfo = 5;
3392 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(Photon->GetMother(0))->GetMother(0))->GetPdgCode() == 221) {
3393 fCharPhotonMCInfo = 3;
3418 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3419 Double_t mcProdVtxX = primVtxMC->GetX();
3420 Double_t mcProdVtxY = primVtxMC->GetY();
3421 Double_t mcProdVtxZ = primVtxMC->GetZ();
3423 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3424 if (AODMCTrackArray == NULL)
return;
3427 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
3429 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
3430 if (!particle)
continue;
3435 Int_t isMCFromMBHeader = -1;
3445 if (TMath::Abs(particle->Eta()) < 0.66 ){
3448 if(particle->GetMother() >-1){
3449 switch((static_cast<AliAODMCParticle*>(AODMCTrackArray->At(particle->GetMother())))->GetPdgCode()){
3477 for(
Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){
3478 AliAODMCParticle *tmpDaughter =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(daughterIndex));
3479 if(!tmpDaughter)
continue;
3480 if(TMath::Abs(tmpDaughter->GetPdgCode()) == 11){
3481 rConv = sqrt( (tmpDaughter->Xv()*tmpDaughter->Xv()) + (tmpDaughter->Yv()*tmpDaughter->Yv()) );
3495 if (particle->E() != TMath::Abs(particle->Pz())){
3496 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3498 if( !(ratio <= 0) ){
3503 if ( particle->GetPdgCode() == 211 ){
3505 }
else if ( particle->GetPdgCode() == -211 ){
3507 }
else if ( particle->GetPdgCode() == 321 ){
3509 }
else if ( particle->GetPdgCode() == -321 ){
3511 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3513 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3515 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3523 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3524 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3527 if (particle->Pt()>0.005){
3536 if (particle->E() != TMath::Abs(particle->Pz())){
3537 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
3539 if( !(ratio <= 0) ){
3543 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3544 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
3548 if(particle->GetPdgCode() == 111){
3571 }
else if(particle->GetPdgCode() == 221){
3590 if(particle->GetPdgCode() == 111){
3607 }
else if(particle->GetPdgCode() == 221){
3618 Int_t isMCFromMBHeader = -1;
3625 if (particle->GetMother() > -1) {
3626 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3627 if (tmpMother->GetMother() > -1) {
3628 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3629 if(tmpGrandMother->GetPdgCode() == 310) {
3631 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3633 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3636 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3648 if (particle->GetMother() > -1) {
3649 AliAODMCParticle *tmpMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3650 if (tmpMother->GetMother() > -1) {
3651 AliAODMCParticle *tmpGrandMother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(tmpMother->GetMother()));
3652 if(tmpGrandMother->GetPdgCode() == 310) {
3654 }
else if (tmpGrandMother->GetPdgCode() == 130) {
3656 }
else if (tmpGrandMother->GetPdgCode() == 3122) {
3659 if ( !(TMath::Abs(tmpMother->GetPdgCode()) == 11 && tmpGrandMother->GetPdgCode() == 22) )
3673 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
3674 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
3675 AliAODMCParticle* mother =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetMother()));
3676 Int_t pdgCode = mother->GetPdgCode();
3677 if(particle->GetPdgCode() == 111){
3685 }
else if(particle->GetPdgCode() == 221){
3699 if (particle->GetPdgCode() == 111){
3718 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3719 Double_t mcProdVtxX = primVtxMC->GetX();
3720 Double_t mcProdVtxY = primVtxMC->GetY();
3721 Double_t mcProdVtxZ = primVtxMC->GetZ();
3725 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
3728 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3729 if (!particle)
continue;
3731 Int_t isMCFromMBHeader = -1;
3741 if (TMath::Abs(particle->Eta()) < 0.66 ){
3745 if(particle->GetMother(0) >-1){
3746 switch(
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode()){
3787 if (particle->Energy() != TMath::Abs(particle->Pz())){
3788 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3790 if( !(ratio <= 0) ){
3795 if ( particle->GetPdgCode() == 211 ){
3797 }
else if ( particle->GetPdgCode() == -211 ){
3799 }
else if ( particle->GetPdgCode() == 321 ){
3801 }
else if ( particle->GetPdgCode() == -321 ){
3803 }
else if ( TMath::Abs(particle->GetPdgCode()) == 310 ){
3805 }
else if ( TMath::Abs(particle->GetPdgCode()) == 130 ){
3807 }
else if ( TMath::Abs(particle->GetPdgCode()) == 3122 ){
3815 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
3816 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
3820 if (particle->Pt()>0.005){
3826 if (particle->Energy() != TMath::Abs(particle->Pz())){
3827 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
3829 if( !(ratio <= 0) ){
3834 if (particle->GetPdgCode() == 111 || particle->GetPdgCode() == 221){
3835 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
3838 if(particle->GetPdgCode() == 111){
3861 }
else if(particle->GetPdgCode() == 221){
3876 if( kDaughter0IsPrim && kDaughter1IsPrim &&
3884 if(particle->GetPdgCode() == 111){
3901 }
else if(particle->GetPdgCode() == 221){
3912 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
3913 if (!particle)
continue;
3914 Int_t isMCFromMBHeader = -1;
3922 if (particle->GetMother(0) > -1 &&
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1) {
3923 if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 310){
3925 }
else if (
fMCEvent->Particle(
fMCEvent->Particle(particle->GetMother(0))->GetMother(0))->GetPdgCode() == 130) {