19 #include "TParticle.h" 21 #include "TMCProcess.h" 22 #include "TDatabasePDG.h" 25 #include "TDirectory.h" 29 #include "THnSparse.h" 31 #include "AliAnalysisManager.h" 32 #include "AliESDInputHandler.h" 33 #include "AliESDtrack.h" 34 #include "AliMCEvent.h" 35 #include "AliMCEventHandler.h" 38 #include "AliESDtrackCuts.h" 39 #include "AliESDpidCuts.h" 40 #include "AliMCEvent.h" 42 #include "AliESDEvent.h" 43 #include "AliESDpid.h" 44 #include "AliKFParticle.h" 45 #include "AliMCEventHandler.h" 46 #include "AliKFVertex.h" 47 #include "AliTriggerAnalysis.h" 48 #include "AliCentrality.h" 49 #include "AliMultiplicity.h" 50 #include "AliAODEvent.h" 60 fV0ReaderName("V0ReaderV1"),
73 fSelectorNegPionIndex(0),
74 fSelectorPosPionIndex(0),
75 fGoodConvGammas(NULL),
76 fClusterCandidates(NULL),
77 fNeutralPionCandidates(NULL),
78 fNeutralPionSidebandCandidates(NULL),
79 fPosPionCandidates(NULL),
80 fNegPionCandidates(NULL),
81 fGoodVirtualParticles(NULL),
84 fClusterCutArray(NULL),
86 fNeutralPionMesonCutArray(NULL),
89 fConversionCuts(NULL),
91 fTreePiPiSameMother(NULL),
92 fTreePiPiPiSameMother(NULL),
93 fTreeEventInfoOmega(NULL),
94 fTreeEventInfoEta(NULL),
96 fSamePiPiMotherID(-1),
97 fSamePiPiMotherInvMass(-1),
98 fSamePiPiMotherPt(-1),
99 fSamePiPiPiMotherID(-1),
100 fSamePiPiPiMotherInvMass(-1),
101 fSamePiPiPiMotherPt(-1),
102 fV0MultiplicityOmegaEvent(-1),
103 fTrackMultiplicityOmegaEvent(-1),
104 fZVertexOmegaEvent(-1),
106 fV0MultiplicityEtaEvent(-1),
107 fTrackMultiplicityEtaEvent(-1),
108 fZVertexEtaEvent(-1),
111 fHistoConvGammaPt(NULL),
112 fHistoConvGammaEta(NULL),
113 fHistoClusterGammaPt(NULL),
114 fHistoClusterGammaEta(NULL),
115 fHistoNegPionPt(NULL),
116 fHistoPosPionPt(NULL),
117 fHistoNegPionPhi(NULL),
118 fHistoPosPionPhi(NULL),
119 fHistoNegPionEta(NULL),
120 fHistoPosPionEta(NULL),
121 fHistoNegPionClsTPC(NULL),
122 fHistoPosPionClsTPC(NULL),
123 fHistoPionDCAxy(NULL),
124 fHistoPionDCAz(NULL),
125 fHistoPionTPCdEdxNSigma(NULL),
126 fHistoPionTPCdEdx(NULL),
127 fHistoPionPionInvMassPt(NULL),
128 fHistoGammaGammaInvMassPt(NULL),
129 fHistoMotherInvMassPt(NULL),
130 fHistoMotherInvMassPtRejectedKinematic(NULL),
131 fHistoBackInvMassPtGroup1(NULL),
132 fHistoBackInvMassPtGroup2(NULL),
133 fHistoBackInvMassPtGroup3(NULL),
134 fHistoBackInvMassPtGroup4(NULL),
135 fHistoMotherLikeSignBackInvMassPt(NULL),
136 fHistoAngleOmegaPiPlPiMi(NULL),
137 fHistoAngleOmegaPiZero(NULL),
138 fHistoAngleOmegaPiPl(NULL),
139 fHistoAngleOmegaPiMi(NULL),
140 fHistoAnglePiPlPiMi(NULL),
141 fHistoAnglePiZeroPiMi(NULL),
142 fHistoAnglePiPlPiZero(NULL),
143 fHistoAngleSum(NULL),
144 fHistoTrueAngleSum(NULL),
145 fHistoMotherInvMassSubPi0(NULL),
146 fHistoBackInvMassPtGroup1SubPi0(NULL),
147 fHistoBackInvMassPtGroup2SubPi0(NULL),
148 fHistoBackInvMassPtGroup3SubPi0(NULL),
149 fHistoBackInvMassPtGroup4SubPi0(NULL),
150 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
151 fHistoMotherInvMassFixedPzPi0(NULL),
152 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
153 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
154 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
155 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
156 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
157 fHistoMCAllGammaPt(NULL),
158 fHistoMCConvGammaPt(NULL),
159 fHistoMCAllPosPionsPt(NULL),
160 fHistoMCAllNegPionsPt(NULL),
161 fHistoMCGammaFromNeutralMesonPt(NULL),
162 fHistoMCPosPionsFromNeutralMesonPt(NULL),
163 fHistoMCNegPionsFromNeutralMesonPt(NULL),
164 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
165 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
166 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
167 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
168 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
169 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
170 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
171 fHistoTrueMotherGammaGammaInvMassPt(NULL),
172 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
173 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
174 fHistoTrueConvGammaPt(NULL),
175 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
176 fHistoTrueClusterGammaPt(NULL),
177 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
178 fHistoTruePosPionPt(NULL),
179 fHistoTruePosPionFromNeutralMesonPt(NULL),
180 fHistoTrueNegPionPt(NULL),
181 fHistoTrueNegPionFromNeutralMesonPt(NULL),
182 fHistoTruePionPionInvMassPt(NULL),
183 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
184 fHistoTruePionPionFromEtaInvMassPt(NULL),
185 fHistoTruePionPionFromOmegaInvMassPt(NULL),
186 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
187 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
188 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
189 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
190 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
191 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
192 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
193 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
194 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
195 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
196 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
197 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
198 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
199 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
200 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
201 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
202 fHistoDoubleCountTruePi0InvMassPt(NULL),
203 fHistoDoubleCountTrueEtaInvMassPt(NULL),
204 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
205 fHistoDoubleCountTrueConvGammaRPt(NULL),
206 fVectorDoubleCountTruePi0s(0),
207 fVectorDoubleCountTrueEtas(0),
208 fVectorDoubleCountTrueOmegas(0),
209 fVectorDoubleCountTrueConvGammas(0),
211 fHistoNGoodESDTracks(NULL),
212 fProfileEtaShift(NULL),
213 fHistoSPDClusterTrackletBackground(NULL),
217 fNumberOfESDTracks(0),
218 fMoveParticleAccordingToVertex(kFALSE),
220 fDoMesonAnalysis(kTRUE),
222 fIsFromMBHeader(kTRUE),
224 fDoLightOutput(kFALSE),
235 fV0ReaderName(
"V0ReaderV1"),
237 fBGHandlerPiPl(NULL),
238 fBGHandlerPiMi(NULL),
248 fSelectorNegPionIndex(0),
249 fSelectorPosPionIndex(0),
250 fGoodConvGammas(NULL),
251 fClusterCandidates(NULL),
252 fNeutralPionCandidates(NULL),
253 fNeutralPionSidebandCandidates(NULL),
254 fPosPionCandidates(NULL),
255 fNegPionCandidates(NULL),
256 fGoodVirtualParticles(NULL),
257 fEventCutArray(NULL),
258 fGammaCutArray(NULL),
259 fClusterCutArray(NULL),
261 fNeutralPionMesonCutArray(NULL),
262 fMesonCutArray(NULL),
264 fConversionCuts(NULL),
266 fTreePiPiSameMother(NULL),
267 fTreePiPiPiSameMother(NULL),
268 fTreeEventInfoOmega(NULL),
269 fTreeEventInfoEta(NULL),
271 fSamePiPiMotherID(-1),
272 fSamePiPiMotherInvMass(-1),
273 fSamePiPiMotherPt(-1),
274 fSamePiPiPiMotherID(-1),
275 fSamePiPiPiMotherInvMass(-1),
276 fSamePiPiPiMotherPt(-1),
277 fV0MultiplicityOmegaEvent(-1),
278 fTrackMultiplicityOmegaEvent(-1),
279 fZVertexOmegaEvent(-1),
281 fV0MultiplicityEtaEvent(-1),
282 fTrackMultiplicityEtaEvent(-1),
283 fZVertexEtaEvent(-1),
286 fHistoConvGammaPt(NULL),
287 fHistoConvGammaEta(NULL),
288 fHistoClusterGammaPt(NULL),
289 fHistoClusterGammaEta(NULL),
290 fHistoNegPionPt(NULL),
291 fHistoPosPionPt(NULL),
292 fHistoNegPionPhi(NULL),
293 fHistoPosPionPhi(NULL),
294 fHistoNegPionEta(NULL),
295 fHistoPosPionEta(NULL),
296 fHistoNegPionClsTPC(NULL),
297 fHistoPosPionClsTPC(NULL),
298 fHistoPionDCAxy(NULL),
299 fHistoPionDCAz(NULL),
300 fHistoPionTPCdEdxNSigma(NULL),
301 fHistoPionTPCdEdx(NULL),
302 fHistoPionPionInvMassPt(NULL),
303 fHistoGammaGammaInvMassPt(NULL),
304 fHistoMotherInvMassPt(NULL),
305 fHistoMotherInvMassPtRejectedKinematic(NULL),
306 fHistoBackInvMassPtGroup1(NULL),
307 fHistoBackInvMassPtGroup2(NULL),
308 fHistoBackInvMassPtGroup3(NULL),
309 fHistoBackInvMassPtGroup4(NULL),
310 fHistoMotherLikeSignBackInvMassPt(NULL),
311 fHistoAngleOmegaPiPlPiMi(NULL),
312 fHistoAngleOmegaPiZero(NULL),
313 fHistoAngleOmegaPiPl(NULL),
314 fHistoAngleOmegaPiMi(NULL),
315 fHistoAnglePiPlPiMi(NULL),
316 fHistoAnglePiZeroPiMi(NULL),
317 fHistoAnglePiPlPiZero(NULL),
318 fHistoAngleSum(NULL),
319 fHistoTrueAngleSum(NULL),
320 fHistoMotherInvMassSubPi0(NULL),
321 fHistoBackInvMassPtGroup1SubPi0(NULL),
322 fHistoBackInvMassPtGroup2SubPi0(NULL),
323 fHistoBackInvMassPtGroup3SubPi0(NULL),
324 fHistoBackInvMassPtGroup4SubPi0(NULL),
325 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
326 fHistoMotherInvMassFixedPzPi0(NULL),
327 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
328 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
329 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
330 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
331 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
332 fHistoMCAllGammaPt(NULL),
333 fHistoMCConvGammaPt(NULL),
334 fHistoMCAllPosPionsPt(NULL),
335 fHistoMCAllNegPionsPt(NULL),
336 fHistoMCGammaFromNeutralMesonPt(NULL),
337 fHistoMCPosPionsFromNeutralMesonPt(NULL),
338 fHistoMCNegPionsFromNeutralMesonPt(NULL),
339 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
340 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
341 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
342 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
343 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
344 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
345 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
346 fHistoTrueMotherGammaGammaInvMassPt(NULL),
347 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
348 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
349 fHistoTrueConvGammaPt(NULL),
350 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
351 fHistoTrueClusterGammaPt(NULL),
352 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
353 fHistoTruePosPionPt(NULL),
354 fHistoTruePosPionFromNeutralMesonPt(NULL),
355 fHistoTrueNegPionPt(NULL),
356 fHistoTrueNegPionFromNeutralMesonPt(NULL),
357 fHistoTruePionPionInvMassPt(NULL),
358 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
359 fHistoTruePionPionFromEtaInvMassPt(NULL),
360 fHistoTruePionPionFromOmegaInvMassPt(NULL),
361 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
362 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
363 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
364 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
365 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
366 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
367 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
368 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
369 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
370 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
371 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
372 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
373 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
374 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
375 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
376 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
377 fHistoDoubleCountTruePi0InvMassPt(NULL),
378 fHistoDoubleCountTrueEtaInvMassPt(NULL),
379 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
380 fHistoDoubleCountTrueConvGammaRPt(NULL),
381 fVectorDoubleCountTruePi0s(0),
382 fVectorDoubleCountTrueEtas(0),
383 fVectorDoubleCountTrueOmegas(0),
384 fVectorDoubleCountTrueConvGammas(0),
386 fHistoNGoodESDTracks(NULL),
387 fProfileEtaShift(NULL),
388 fHistoSPDClusterTrackletBackground(NULL),
392 fNumberOfESDTracks(0),
393 fMoveParticleAccordingToVertex(kFALSE),
395 fDoMesonAnalysis(kTRUE),
397 fIsFromMBHeader(kTRUE),
399 fDoLightOutput(kFALSE),
403 DefineOutput(1, TList::Class());
412 cout<<
"Destructor"<<endl;
467 TString cutstringConvGamma =
"";
469 TString cutstringCaloGamma =
"";
475 if (
fNeutralPionMode == 0) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
476 else if (
fNeutralPionMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
477 else if (
fNeutralPionMode == 2) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
483 if(collisionSystem == 1 || collisionSystem == 2 ||
484 collisionSystem == 5 || collisionSystem == 8 ||
485 collisionSystem == 9){
486 centMin = centMin*10;
487 centMax = centMax*10;
489 else if(collisionSystem == 3 || collisionSystem == 6){
493 else if(collisionSystem == 4 || collisionSystem == 7){
494 centMin = ((centMin*5)+45);
495 centMax = ((centMax*5)+45);
518 Double_t HistoMassRange[2] = {0.4,1.0};
519 Double_t HistoMassRangeSub[2] = {0.4,1.0};
520 Double_t HistoPtRange[2] = {0.,25.};
627 TString cutstringConvGamma =
"";
630 TString cutstringCaloGamma =
"";
638 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
640 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
642 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
643 TString nameCutFolder = Form(
"Cut Number %s", fullCutString.Data());
644 TString nameESDList = Form(
"%s ESD histograms", fullCutString.Data());
647 fCutFolder[iCut]->SetName(nameCutFolder.Data());
648 fCutFolder[iCut]->SetOwner(kTRUE);
652 fESDList[iCut]->SetName(nameESDList.Data());
657 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
658 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
661 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
665 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
666 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
667 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
668 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
687 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",250,0,25);
691 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",600,-1.5,1.5);
706 fHistoNegPionPt[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Pt",
"ESD_PrimaryNegPions_Pt",1000,0,25);
710 fHistoPosPionPt[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Pt",
"ESD_PrimaryPosPions_Pt",1000,0,25);
714 fHistoNegPionPhi[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Phi",
"ESD_PrimaryNegPions_Phi",360,0,2*TMath::Pi());
718 fHistoPosPionPhi[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Phi",
"ESD_PrimaryPosPions_Phi",360,0,2*TMath::Pi());
728 fHistoNegPionEta[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Eta",
"ESD_PrimaryNegPions_Eta",600,-1.5,1.5);
732 fHistoPosPionEta[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Eta",
"ESD_PrimaryPosPions_Eta",600,-1.5,1.5);
736 fHistoNegPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryNegPions_ClsTPC",
"ESD_PrimaryNegPions_ClsTPC",100,0,1,400,0.,10.);
740 fHistoPosPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryPosPions_ClsTPC",
"ESD_PrimaryPosPions_ClsTPC",100,0,1,400,0.,10.);
744 fHistoPionDCAxy[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAxy",
"ESD_PrimaryPions_DCAxy",800,-4.0,4.0,400,0.,10.);
748 fHistoPionDCAz[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAz",
"ESD_PrimaryPions_DCAz",800,-4.0,4.0,400,0.,10.);
756 fHistoPionTPCdEdx[iCut] =
new TH2F(
"ESD_PrimaryPions_TPCdEdxSignal",
"ESD_PrimaryPions_TPCdEdxSignal" ,150,0.05,20.0,800,0.0,200);
766 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
770 fHistoMotherInvMassPtRejectedKinematic[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt_KinematicRejected",
"ESD_Mother_InvMass_Pt_KinematicRejected",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
775 fHistoBackInvMassPtGroup1[iCut] =
new TH2F(
"ESD_Background_1_InvMass_Pt",
"ESD_Background_1_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
776 fHistoBackInvMassPtGroup2[iCut] =
new TH2F(
"ESD_Background_2_InvMass_Pt",
"ESD_Background_2_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
777 fHistoBackInvMassPtGroup3[iCut] =
new TH2F(
"ESD_Background_3_InvMass_Pt",
"ESD_Background_3_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
778 fHistoBackInvMassPtGroup4[iCut] =
new TH2F(
"ESD_Background_4_InvMass_Pt",
"ESD_Background_4_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
794 fHistoMotherLikeSignBackInvMassPt[iCut] =
new TH2F(
"ESD_Background_LikeSign_InvMass_Pt",
"ESD_Background_LikeSign_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
800 fHistoMotherInvMassSubPi0[iCut] =
new TH2F(
"ESD_InvMass_Mother_Sub_InvMass(NeutralPion)_Pt",
"ESD_Mother_InvMass_Sub_InvMass(NeutralPion)_Pt",HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
801 fHistoMotherInvMassSubPi0[iCut]->GetXaxis()->SetTitle(
"M_{#pi^{+} #pi^{-} #pi^{0}} - (M_{#pi^{0}}-M_{#pi^{0},PDG}) (GeV/c^{2})");
806 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
808 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
810 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
812 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
829 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
835 fHistoMotherInvMassFixedPzPi0[iCut] =
new TH2F(
"ESD_InvMass_Mother_FixedPz(NeutralPion)_Pt",
"ESD_Mother_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
840 fHistoBackInvMassPtGroup1FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_1_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_1_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
841 fHistoBackInvMassPtGroup2FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_2_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_2_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
842 fHistoBackInvMassPtGroup3FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_3_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_3_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
843 fHistoBackInvMassPtGroup4FixedPzPi0[iCut] =
new TH2F(
"ESD_Background_4_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_4_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
858 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt[iCut] =
new TH2F(
"ESD_Background_LikeSign_InvMass_FixedPz(NeutralPion)_Pt",
"ESD_Background_LikeSign_InvMass_FixedPz(NeutralPion)_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
865 fHistoAngleOmegaPiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
869 fHistoAngleOmegaPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPions_Pt",
"ESD_Mother_AngleOmegaNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
873 fHistoAngleOmegaPiPl[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaPosPions_Pt",
"ESD_Mother_AngleOmegaPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
877 fHistoAngleOmegaPiZero[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNeutralPion_Pt",
"ESD_Mother_AngleOmegaNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
881 fHistoAnglePiPlPiZero[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNeutralPion_Pt",
"ESD_Mother_AnglePosPionsNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
885 fHistoAnglePiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNegPions_Pt",
"ESD_Mother_AnglePosPionsNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
889 fHistoAnglePiZeroPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleNeutralPionNegPions_Pt",
"ESD_Mother_AngleNeutralPionNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
893 fHistoAngleSum[iCut] =
new TH2F(
"ESD_Mother_AngleSum_Pt",
"ESD_Mother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
900 Int_t bins = AxisAfter->GetNbins();
901 Double_t from = AxisAfter->GetXmin();
905 Double_t factor = TMath::Power(to/from, 1./bins);
906 for(
Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
908 AxisAfter->Set(bins, newBins);
910 AxisAfter->Set(bins, newBins);
914 fCutFolder[iCut]->Add(
fESDList[iCut]);
1003 TString cutstringConvGamma =
"";
1006 TString cutstringCaloGamma =
"";
1014 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),
1015 cutstringMeson.Data());
1017 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringNeutralPion.Data(),
1018 cutstringPion.Data(), cutstringMeson.Data());
1020 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringNeutralPion.Data(), cutstringPion.Data(),
1021 cutstringMeson.Data());
1022 TString nameMCList = Form(
"%s MC histograms", fullCutString.Data());
1023 TString nameTrueRecList = Form(
"%s True histograms", fullCutString.Data());
1024 TString nameTrueRecTTreeList = Form(
"%s True TTrees", fullCutString.Data());
1027 fMCList[iCut]->SetName(nameMCList.Data());
1028 fMCList[iCut]->SetOwner(kTRUE);
1032 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1037 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1043 fHistoMCAllPosPionsPt[iCut] =
new TH1F(
"MC_AllPosPions_Pt",
"MC_AllPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1047 fHistoMCAllNegPionsPt[iCut] =
new TH1F(
"MC_AllNegPions_Pt",
"MC_AllNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1051 fHistoMCGammaFromNeutralMesonPt[iCut] =
new TH1F(
"MC_GammaFromNeutralMeson_Pt",
"MC_GammaFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1089 fTrueList[iCut]->SetName(nameTrueRecList.Data());
1095 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1109 fHistoTrueClusterGammaPt[iCut] =
new TH1F(
"ESD_TrueClusterGamma_Pt",
"ESD_TrueClusterGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1118 fHistoTruePosPionPt[iCut] =
new TH1F(
"ESD_TruePosPion_Pt",
"ESD_TruePosPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1122 fHistoTrueNegPionPt[iCut] =
new TH1F(
"ESD_TrueNegPion_Pt",
"ESD_TrueNegPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1127 fHistoTrueNegPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TrueNegPionFromNeutralMeson_Pt",
"ESD_TrueNegPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1131 fHistoTruePosPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TruePosPionFromNeutralMeson_Pt",
"ESD_TruePosPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1149 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1155 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1156 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1179 fHistoTrueAngleSum[iCut] =
new TH2F(
"ESD_TrueMother_AngleSum_Pt",
"ESD_TrueMother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
1215 2000,0.,2.,200,0.,20.);
1315 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1332 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1338 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1396 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1399 if(InputEvent()->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1400 if(eventQuality == 2 || eventQuality == 3){
1408 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1422 Bool_t isRunningEMCALrelAna = kFALSE;
1429 if(eventNotAccepted){
1435 if(eventQuality != 0){
1444 fHistoSPDClusterTrackletBackground[iCut]->Fill(fInputEvent->GetMultiplicity()->GetNumberOfTracklets(),(fInputEvent->GetNumberOfITSClusters(0)+fInputEvent->GetNumberOfITSClusters(1)));
1521 printf(
" Eta t PiPlusPiMinus Gamma Task %s :: Eta Shift Manually Set to %f \n\n",
1544 nclus = fInputEvent->GetNumberOfCaloClusters();
1548 if(nclus == 0)
return;
1552 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1555 for(Long_t i = 0; i < nclus; i++){
1557 AliVCluster* clus = NULL;
1558 if(fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)fInputEvent->GetCaloCluster(i));
1559 else if(fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)fInputEvent->GetCaloCluster(i));
1561 if (!clus)
continue;
1564 TLorentzVector clusterVector;
1565 clus->GetMomentum(clusterVector,vertex);
1567 TLorentzVector* tmpvec =
new TLorentzVector();
1568 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
1572 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
1579 Int_t* mclabelsCluster = clus->GetLabels();
1582 if (clus->GetNLabels()>0){
1583 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
1618 TParticle *Photon = NULL;
1619 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1623 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1624 Double_t mcProdVtxX = primVtxMC->GetX();
1625 Double_t mcProdVtxY = primVtxMC->GetY();
1626 Double_t mcProdVtxZ = primVtxMC->GetZ();
1671 if(!PhotonCandidate)
continue;
1676 Int_t isPosFromMBHeader
1679 Int_t isNegFromMBHeader
1682 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1703 GoodGammasStepOne->Add(PhotonCandidate);
1706 GoodGammasStepTwo->Add(PhotonCandidate);
1712 for(
Int_t i = 0;i<GoodGammasStepOne->GetEntries();i++){
1714 if(!PhotonCandidate)
continue;
1717 Int_t isPosFromMBHeader
1719 Int_t isNegFromMBHeader
1721 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1734 else GoodGammasStepTwo->Add(PhotonCandidate);
1738 for(
Int_t i = 0;i<GoodGammasStepTwo->GetEntries();i++){
1740 if(!PhotonCandidate)
continue;
1743 Int_t isPosFromMBHeader
1745 Int_t isNegFromMBHeader
1747 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1764 delete GoodGammasStepOne;
1765 GoodGammasStepOne = 0x0;
1766 delete GoodGammasStepTwo;
1767 GoodGammasStepTwo = 0x0;
1777 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1778 Double_t mcProdVtxX = primVtxMC->GetX();
1779 Double_t mcProdVtxY = primVtxMC->GetY();
1780 Double_t mcProdVtxZ = primVtxMC->GetZ();
1783 if(posDaughter == NULL || negDaughter == NULL)
return;
1784 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
1788 else if (posDaughter->GetMother(0) == -1){
1792 if(TMath::Abs(posDaughter->GetPdgCode())!=11 || TMath::Abs(negDaughter->GetPdgCode())!=11)
return;
1793 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
1794 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
1797 if(Photon->GetPdgCode() != 22)
return;
1805 if( gammaIsPrimary ){
1819 for(
Int_t firstGammaIndex=0;firstGammaIndex<
fGoodConvGammas->GetEntries()-1;firstGammaIndex++){
1821 if (gamma0==NULL)
continue;
1822 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGoodConvGammas->GetEntries();secondGammaIndex++){
1825 if (gamma1==NULL)
continue;
1832 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1840 if(fInputEvent->IsA()==AliESDEvent::Class())
1842 if(fInputEvent->IsA()==AliAODEvent::Class())
1878 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1882 if (gamma0==NULL)
continue;
1885 if (firstGammaIndex == secondGammaIndex)
continue;
1887 if (gamma1==NULL)
continue;
1890 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1931 Bool_t isTruePi0 = kFALSE;
1933 Int_t gamma0MotherLabel = -1;
1934 Int_t motherRealLabel = -1;
1936 if(gamma0MCLabel != -1){
1937 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
1941 gamma0MotherLabel=gammaMC0->GetMother(0);
1942 motherRealLabel=gammaMC0->GetFirstMother();
1944 if (TrueGammaCandidate0->
IsConversion() && gammaMC0->GetMother(0)>-1){
1945 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1946 motherRealLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1948 gamma0MotherLabel=gammaMC0->GetMother(0);
1949 motherRealLabel=gammaMC0->GetMother(0);
1955 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
1958 Int_t gamma1MotherLabel = -1;
1960 if(gamma1MCLabel != -1){
1962 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
1966 gamma1MotherLabel=gammaMC1->GetMother(0);
1968 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
1969 else gamma1MotherLabel=gammaMC1->GetMother(0);
1974 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
1975 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2002 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2003 Bool_t isTruePi0 = kFALSE;
2004 Bool_t isTruePi0Dalitz = kFALSE;
2005 Bool_t gamma0DalitzCand = kFALSE;
2006 Bool_t gamma1DalitzCand = kFALSE;
2008 Int_t gamma0MotherLabel = -1;
2009 Int_t motherRealLabel = -1;
2010 if(gamma0MCLabel != -1){
2014 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2015 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2016 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2017 if(gammaMC0->GetPdgCode() == 22){
2018 gamma0MotherLabel=gammaMC0->GetFirstMother();
2019 motherRealLabel=gammaMC0->GetFirstMother();
2022 if(gammaMC0->GetPdgCode() ==111){
2023 gamma0DalitzCand = kTRUE;
2024 gamma0MotherLabel=-111;
2025 motherRealLabel=gamma0MCLabel;
2029 if(TrueGammaCandidate1->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2031 Int_t gamma1MotherLabel = -1;
2032 if(gamma1MCLabel != -1){
2036 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2037 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2038 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2039 if(gammaMC1->GetPdgCode() == 22){
2040 gamma1MotherLabel=gammaMC1->GetFirstMother();
2043 if(gammaMC1->GetPdgCode() ==111 ){
2044 gamma1DalitzCand = kTRUE;
2045 gamma1MotherLabel=-111;
2049 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2050 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2057 if (gamma1DalitzCand || gamma0DalitzCand){
2058 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2059 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2061 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
2062 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2067 if(isTruePi0 || isTruePi0Dalitz){
2089 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2090 Bool_t isTruePi0 = kFALSE;
2091 Bool_t isTruePi0Dalitz = kFALSE;
2092 Bool_t gamma0DalitzCand = kFALSE;
2093 Bool_t gamma1DalitzCand = kFALSE;
2094 Int_t motherRealLabel = -1;
2096 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
2097 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
2098 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
2100 Int_t gamma0MCLabel = -1;
2101 Int_t gamma0MotherLabel = -1;
2102 if(!positiveMC||!negativeMC)
2105 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
2106 gamma0MCLabel = positiveMC->GetMother();
2109 if(gamma0MCLabel != -1){
2111 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
2112 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2113 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
2114 if(gammaMC0->GetPdgCode() == 22){
2115 gamma0MotherLabel=gammaMC0->GetMother();
2116 motherRealLabel=gammaMC0->GetMother();
2119 if(gammaMC0->GetPdgCode() ==111){
2120 gamma0DalitzCand = kTRUE;
2121 gamma0MotherLabel=-111;
2122 motherRealLabel=gamma0MCLabel;
2126 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
2127 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
2129 Int_t gamma1MCLabel = -1;
2130 Int_t gamma1MotherLabel = -1;
2131 if(!positiveMC||!negativeMC)
2134 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
2135 gamma1MCLabel = positiveMC->GetMother();
2137 if(gamma1MCLabel != -1){
2139 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
2140 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2141 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
2142 if(gammaMC1->GetPdgCode() == 22){
2143 gamma1MotherLabel=gammaMC1->GetMother();
2146 if(gammaMC1->GetPdgCode() ==111 ){
2147 gamma1DalitzCand = kTRUE;
2148 gamma1MotherLabel=-111;
2152 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2153 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
2160 if (gamma1DalitzCand || gamma0DalitzCand){
2161 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2162 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2164 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
2165 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2169 if(isTruePi0 || isTruePi0Dalitz){
2194 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2198 if (gamma0==NULL)
continue;
2203 if (gamma1==NULL)
continue;
2206 AliVCluster* cluster = fInputEvent->GetCaloCluster(gamma1->
GetCaloClusterRef());
2211 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
2255 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2256 Bool_t isTruePi0 = kFALSE;
2257 Bool_t isTruePi0Dalitz = kFALSE;
2258 Bool_t gamma0DalitzCand = kFALSE;
2261 Int_t gamma0MotherLabel = -1;
2262 Int_t motherRealLabel = -1;
2263 if(gamma0MCLabel != -1){
2267 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2268 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2269 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2270 if(gammaMC0->GetPdgCode() == 22){
2271 gamma0MotherLabel=gammaMC0->GetFirstMother();
2272 motherRealLabel=gammaMC0->GetFirstMother();
2275 if(gammaMC0->GetPdgCode() ==111){
2276 gamma0DalitzCand = kTRUE;
2277 gamma0MotherLabel=-111;
2278 motherRealLabel=gamma0MCLabel;
2284 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2287 Int_t gamma1MotherLabel = -1;
2290 if(gamma1MCLabel != -1){
2292 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2296 gamma1MotherLabel=gammaMC1->GetMother(0);
2298 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2299 else gamma1MotherLabel=gammaMC1->GetMother(0);
2304 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2305 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2311 if (gamma0DalitzCand ){
2312 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2313 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2317 if(isTruePi0 || isTruePi0Dalitz ){
2338 Double_t magField = fInputEvent->GetMagneticField();
2339 if( magField < 0.0 ){
2345 vector<Int_t> lGoodNegPionIndexPrev(0);
2346 vector<Int_t> lGoodPosPionIndexPrev(0);
2353 TLorentzVector *negPionforHandler =
new TLorentzVector();
2354 negPionforHandler->SetPxPyPzE(negPionCandidate->Px(), negPionCandidate->Py(), negPionCandidate->Pz(), negPionCandidate->E());
2357 delete negPionforHandler;
2366 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2367 Double_t mcProdVtxX = primVtxMC->GetX();
2368 Double_t mcProdVtxY = primVtxMC->GetY();
2369 Double_t mcProdVtxZ = primVtxMC->GetZ();
2371 Int_t labelNegPion = TMath::Abs( negPionCandidate->GetLabel() );
2373 if( labelNegPion>-1 && labelNegPion < fMCEvent->GetNumberOfTracks() ){
2374 TParticle* negPion =
fMCEvent->Particle(labelNegPion);
2375 if( negPion->GetPdgCode() == -211 ){
2378 if( negPionIsPrimary ){
2382 if( negPionIsPrimary ) {
2397 TLorentzVector *posPionforHandler =
new TLorentzVector();
2398 posPionforHandler->SetPxPyPzE(posPionCandidate->Px(), posPionCandidate->Py(), posPionCandidate->Pz(), posPionCandidate->E());
2401 delete posPionforHandler;
2409 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2410 Double_t mcProdVtxX = primVtxMC->GetX();
2411 Double_t mcProdVtxY = primVtxMC->GetY();
2412 Double_t mcProdVtxZ = primVtxMC->GetZ();
2414 Int_t labelPosPion = TMath::Abs( posPionCandidate->GetLabel() );
2416 if( labelPosPion>-1 && labelPosPion < fMCEvent->GetNumberOfTracks() ) {
2417 TParticle* posPion =
fMCEvent->Particle(labelPosPion);
2418 if( posPion->GetPdgCode() == 211 ){
2420 if( posPionIsPrimary ){
2424 if(posPionIsPrimary){
2435 for(
UInt_t i = 0; i < lGoodNegPionIndexPrev.size(); i++){
2436 AliESDtrack *negPionCandidate =
fESDEvent->GetTrack(lGoodNegPionIndexPrev[i]);
2437 AliKFParticle negPionCandidateKF( *negPionCandidate->GetConstrainedParam(), 211 );
2439 for(
UInt_t j = 0; j < lGoodPosPionIndexPrev.size(); j++){
2440 AliESDtrack *posPionCandidate =
fESDEvent->GetTrack(lGoodPosPionIndexPrev[j]);
2441 AliKFParticle posPionCandidateKF( *posPionCandidate->GetConstrainedParam(), 211 );
2445 AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex());
2447 virtualPhoton->SetProductionVertex(primaryVertexImproved);
2448 virtualPhoton->SetTrackLabels( lGoodPosPionIndexPrev[j], lGoodNegPionIndexPrev[i]);
2452 Int_t motherlabelp = 0;
2453 Int_t motherlabeln = 0;
2454 TParticle *fNegativeMCParticle =NULL;
2455 TParticle *fPositiveMCParticle =NULL;
2457 labeln=TMath::Abs(negPionCandidate->GetLabel());
2458 labelp=TMath::Abs(posPionCandidate->GetLabel());
2459 if(labeln>-1) fNegativeMCParticle =
fMCEvent->Particle(labeln);
2460 if(labelp>-1) fPositiveMCParticle =
fMCEvent->Particle(labelp);
2462 if (fNegativeMCParticle == NULL || fPositiveMCParticle == NULL)
return;
2464 motherlabeln = fNegativeMCParticle->GetMother(0);
2465 motherlabelp = fPositiveMCParticle->GetMother(0);
2466 virtualPhoton->SetMCLabelPositive(labelp);
2467 virtualPhoton->SetMCLabelNegative(labeln);
2474 if (fPositiveMCParticle && fNegativeMCParticle ) {
2477 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2479 if (motherlabeln == motherlabelp){
2491 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2493 if (motherlabeln == motherlabelp){
2528 Float_t dcaToVertexXYPos = -1.0;
2529 Float_t dcaToVertexZPos = -1.0;
2530 Float_t dcaToVertexXYNeg = -1.0;
2531 Float_t dcaToVertexZNeg = -1.0;
2539 posPionCandidate->GetImpactParameters(bPos,bCovPos);
2540 if (bCovPos[0]<=0 || bCovPos[2]<=0) {
2541 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2542 bCovPos[0]=0; bCovPos[2]=0;
2547 posPionCandidate->GetImpactParameters(bNeg,bCovNeg);
2548 if (bCovNeg[0]<=0 || bCovNeg[2]<=0) {
2549 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2550 bCovNeg[0]=0; bCovNeg[2]=0;
2553 dcaToVertexXYPos = bPos[0];
2554 dcaToVertexZPos = bPos[1];
2555 dcaToVertexXYNeg = bNeg[0];
2556 dcaToVertexZNeg = bNeg[1];
2578 delete virtualPhoton;
2588 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2589 Double_t mcProdVtxX = primVtxMC->GetX();
2590 Double_t mcProdVtxY = primVtxMC->GetY();
2591 Double_t mcProdVtxZ = primVtxMC->GetZ();
2596 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2597 if (!particle)
continue;
2599 Int_t isMCFromMBHeader = -1;
2612 if(particle->GetMother(0) >-1){
2613 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2614 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2615 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2616 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2617 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2627 if(particle->GetMother(0) >-1){
2628 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2629 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2630 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2631 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2632 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2646 if( particle->GetPdgCode() == 211){
2648 if(particle->GetMother(0) >-1){
2649 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223)
2653 if( particle->GetPdgCode() == -211){
2655 if(particle->GetMother(0) >-1){
2656 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223 )
2664 Int_t labelNeutPion = -1;
2665 Int_t labelNegPion = -1;
2666 Int_t labelPosPion = -1;
2672 if (particle->Pt()>0.005){
2680 if(labelNeutPion>-1){
2681 TParticle *neutPion =
fMCEvent->Particle(labelNeutPion);
2682 if(neutPion->GetDaughter(0)>-1 && neutPion->GetDaughter(1)>-1){
2683 TParticle *gamma1 =
fMCEvent->Particle(neutPion->GetDaughter(0));
2684 TParticle *gamma2 =
fMCEvent->Particle(neutPion->GetDaughter(1));
2691 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2701 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2727 if (neutralPion==NULL)
continue;
2732 if (vParticle==NULL)
continue;
2736 mesoncand->
SetLabels(mesonIndex,virtualParticleIndex);
2740 if(negPionCandidatetmp==NULL){
delete mesoncand;
continue;}
2742 NegPiontmp->SetPxPyPzE(negPionCandidatetmp->Px(), negPionCandidatetmp->Py(), negPionCandidatetmp->Pz(), negPionCandidatetmp->E());
2745 if(posPionCandidatetmp==NULL){
delete NegPiontmp;
delete mesoncand;
continue;}
2747 PosPiontmp->SetPxPyPzE(posPionCandidatetmp->Px(), posPionCandidatetmp->Py(), posPionCandidatetmp->Pz(), posPionCandidatetmp->E());
2749 if(
KinematicCut(NegPiontmp, PosPiontmp, neutralPion, mesoncand)){
2758 fHistoAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(neutralPion->Vect()))));
2769 Pi0tmp->SetPxPyPzE(neutralPion->Px(), neutralPion->Py(), neutralPion->Pz(), neutralPion->Energy());
2822 Int_t NPi0Candidates = 0;
2829 for(
Int_t iCurrentPi0=0; iCurrentPi0<NPi0Candidates; iCurrentPi0++){
2849 if((EventPiMiMeson && EventPiPlMeson) == kFALSE)
continue;
2857 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2868 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
2880 delete backPiPlPiMiCandidate;
2881 backPiPlPiMiCandidate = 0x0;
2884 delete backPiPlPiMiCandidate;
2885 backPiPlPiMiCandidate = 0x0;
2895 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson,EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2898 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2903 if (nEventsInBGMi != nEventsInBGPl){
2910 }
else if(nEventsInBGMi==nEventsInBGPl){
2918 delete PiMiPiZerotmp;
2919 delete PiPlPiMiPiZerotmp;
2921 delete PiPlPiMiPiZeroBackgroundCandidate;
2922 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2925 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2926 delete PiPlPiMiPiZeroBackgroundCandidate;
2927 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2930 if(PiPlPiZeroBackgroundCandidate!=0x0){
2931 delete PiPlPiZeroBackgroundCandidate;
2932 PiPlPiZeroBackgroundCandidate = 0x0;
2948 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2965 delete backPiPlPiMiCandidate;
2966 backPiPlPiMiCandidate = 0x0;
2969 delete backPiPlPiMiCandidate;
2970 backPiPlPiMiCandidate = 0x0;
2980 if(
KinematicCut(&EventPiNegGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2984 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2995 delete PiMiPiZerotmp;
2996 delete PiPlPiMiPiZerotmp;
2998 delete PiPlPiMiPiZeroBackgroundCandidate;
2999 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3002 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
3003 delete PiPlPiMiPiZeroBackgroundCandidate;
3004 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3007 if(PiPlPiZeroBackgroundCandidate!=0x0){
3008 delete PiPlPiZeroBackgroundCandidate;
3009 PiPlPiZeroBackgroundCandidate = 0x0;
3025 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
3045 delete backPiPlPiMiCandidate;
3046 backPiPlPiMiCandidate = 0x0;
3049 delete backPiPlPiMiCandidate;
3050 backPiPlPiMiCandidate = 0x0;
3060 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
3064 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3075 delete PiMiPiZerotmp;
3076 delete PiPlPiMiPiZerotmp;
3078 delete PiPlPiMiPiZeroBackgroundCandidate;
3079 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3082 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
3083 delete PiPlPiMiPiZeroBackgroundCandidate;
3084 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3087 if(PiMiPiZeroBackgroundCandidate!=0x0){
3088 delete PiMiPiZeroBackgroundCandidate;
3089 PiMiPiZeroBackgroundCandidate = 0x0;
3104 if(iCurrentPiPl!=iCurrentPiPl2){
3114 delete backPiPlPiPlCandidate;
3115 backPiPlPiPlCandidate = 0x0;
3118 delete backPiPlPiPlCandidate;
3119 backPiPlPiPlCandidate = 0x0;
3129 if(
KinematicCut(&EventPiPlGoodMeson, &EventPiPlGoodMeson2, EventPiZeroGoodMeson,PiPlPiPlPiZeroBackgroundCandidate)){
3133 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3144 delete PiPlPiZerotmp;
3145 delete PiPlPiPlPiZerotmp;
3147 delete PiPlPiPlPiZeroBackgroundCandidate;
3148 PiPlPiPlPiZeroBackgroundCandidate = 0x0;
3164 if(iCurrentPiMi!=iCurrentPiMi2){
3174 delete backPiMiPiMiCandidate;
3175 backPiMiPiMiCandidate = 0x0;
3178 delete backPiMiPiMiCandidate;
3179 backPiMiPiMiCandidate = 0x0;
3189 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiMiGoodMeson2, EventPiZeroGoodMeson,PiMiPiMiPiZeroBackgroundCandidate)){
3193 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3204 delete PiMiPiZerotmp;
3205 delete PiMiPiMiPiZerotmp;
3207 delete PiMiPiMiPiZeroBackgroundCandidate;
3208 PiMiPiMiPiZeroBackgroundCandidate = 0x0;
3224 if((omega->Pt())<=5.){
3225 if( (omega->Angle(pospion->Vect())) < ((2.78715*(TMath::Exp(-0.589934*(omega->Pt()))+0.0519574))*
fTolerance) &&
3226 (omega->Angle(negpion->Vect())) < ((5.94216*(TMath::Exp(-0.444428*(omega->Pt()))-0.0574076))*
fTolerance) &&
3227 (omega->Angle(neutpion->Vect())) < ((2.79529*(TMath::Exp(-0.565999*(omega->Pt()))+0.0413576))*
fTolerance) &&
3228 (pospion->Angle(negpion->Vect())) < ((3.14446*(TMath::Exp(-0.666433*(omega->Pt()))+0.0964309))*
fTolerance) &&
3229 (pospion->Angle(neutpion->Vect())) < ((3.08241*(TMath::Exp(-0.650657*(omega->Pt()))+0.0997539))*
fTolerance) &&
3230 (negpion->Angle(neutpion->Vect())) < ((3.18536*(TMath::Exp(-0.752847*(omega->Pt()))+0.1262780))*
fTolerance)
3235 if( (omega->Angle(pospion->Vect())) < ((0.459270*(TMath::Exp(-0.126007*(omega->Pt()))+0.100475))*
fTolerance) &&
3236 (omega->Angle(negpion->Vect())) < ((0.521250*(TMath::Exp(-0.152532*(omega->Pt()))+0.114617))*
fTolerance) &&
3237 (omega->Angle(neutpion->Vect())) < ((0.409766*(TMath::Exp(-0.108566*(omega->Pt()))+0.103594))*
fTolerance) &&
3238 (pospion->Angle(negpion->Vect())) < ((0.709206*(TMath::Exp(-0.149072*(omega->Pt()))+0.111345))*
fTolerance) &&
3239 (pospion->Angle(neutpion->Vect())) < ((0.662184*(TMath::Exp(-0.123397*(omega->Pt()))+0.104675))*
fTolerance) &&
3240 (negpion->Angle(neutpion->Vect())) < ((0.730228*(TMath::Exp(-0.120859*(omega->Pt()))+0.105522))*
fTolerance)
3255 Bool_t isSameMotherPiPlPiMiPiZero = kFALSE;
3256 Bool_t isSameMotherPiPlPiMi = kFALSE;
3257 Bool_t isSameMotherPiPlPiZero = kFALSE;
3258 Bool_t isSameMotherPiMiPiZero = kFALSE;
3259 Bool_t isNoSameMother = kFALSE;
3260 Bool_t isNoPiPiPi = kFALSE;
3264 Int_t virtualParticleMotherLabel = -1;
3270 if ( !(trueMesonFlag == 1 && pi0MCLabel != -1)){
3276 Int_t pi0MotherLabel =
fMCEvent->Particle(pi0MCLabel)->GetMother(0);
3281 Int_t posMotherLabelMC = positiveMC->GetMother(0);
3282 Int_t negMotherLabelMC = negativeMC->GetMother(0);
3285 if((TMath::Abs(negativeMC->GetPdgCode())==211) && (TMath::Abs(positiveMC->GetPdgCode())==211) && (
fMCEvent->Particle(pi0MCLabel)->GetPdgCode()==111)){
3287 if(virtualParticleMCLabel!=-1){
3289 virtualParticleMotherLabel = virtualParticleMCLabel;
3290 if(virtualParticleMotherLabel==pi0MotherLabel){
3292 if(
fMCEvent->Particle(pi0MotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMiPiZero = kTRUE;
3295 if(
fMCEvent->Particle(virtualParticleMotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMi = kTRUE;
3298 if(pi0MotherLabel==negMotherLabelMC && negMotherLabelMC != -1){
3300 if(
fMCEvent->Particle(negMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiMiPiZero = kTRUE;
3301 }
else if(pi0MotherLabel==posMotherLabelMC && posMotherLabelMC != -1){
3303 if(
fMCEvent->Particle(posMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiPlPiZero = kTRUE;
3306 isNoSameMother = kTRUE;
3315 if(isSameMotherPiPlPiMiPiZero){
3316 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3321 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3323 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3324 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3326 delete PosPiontmp; PosPiontmp = 0x0;
3327 delete NegPiontmp; NegPiontmp = 0x0;
3334 fPtEta = mesoncand->Pt();
3339 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3345 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3347 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3348 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3372 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3375 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3378 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 113){
3381 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 331){
3384 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 310){
3387 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130){
3403 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3406 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3409 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() ==-213){
3412 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 130){
3428 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3431 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3434 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 213) {
3437 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130) {
3500 Double_t dx = vertex->
fX - fInputEvent->GetPrimaryVertex()->GetX();
3501 Double_t dy = vertex->
fY - fInputEvent->GetPrimaryVertex()->GetY();
3502 Double_t dz = vertex->
fZ - fInputEvent->GetPrimaryVertex()->GetZ();
3513 Int_t signPz = particle->Pz()<0?-1:1;
3515 Double_t pz = signPz*TMath::Sqrt(TMath::Abs(pow(
fPDGMassPi0,2)-pow(energy,2)+pow(px,2)+pow(py,2)));
3516 particle->SetPxPyPzE(px,py,pz,energy);
3526 if(label<0)
return kFALSE;
3527 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3528 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3530 TParticle* mother =
fMCEvent->Particle( motherLabel );
3532 if( mother->GetPdgCode() != 221 )
return kFALSE;
3543 if(label<0)
return kFALSE;
3544 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3545 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3547 TParticle* mother =
fMCEvent->Particle( motherLabel );
3549 if( mother->GetPdgCode() != 223 )
return kFALSE;
3560 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
3562 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
3565 TParticle *posPion = 0x0;
3566 TParticle *negPion = 0x0;
3567 TParticle *neutPion = 0x0;
3569 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
3570 if(index<0)
continue;
3571 TParticle* temp = (TParticle*)
fMCEvent->Particle( index );
3573 switch( temp->GetPdgCode() ) {
3585 if( posPion && negPion && neutPion)
return kTRUE;
3595 if(label<0)
return kFALSE;
3596 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3597 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3599 TParticle* mother =
fMCEvent->Particle( motherLabel );
3601 if( mother->GetPdgCode() != 111 )
return kFALSE;
3603 Int_t grandMotherLabel = mother->GetMother(0);
3604 if( grandMotherLabel < 0 || grandMotherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3605 TParticle* grandmother =
fMCEvent->Particle( grandMotherLabel );
3614 if(tobechecked > -1)
3616 vector<Int_t>::iterator it;
3617 it = find (vec.begin(), vec.end(), tobechecked);
3618 if (it != vec.end())
return true;
3620 vec.push_back(tobechecked);
TParticle * GetMCParticle(AliMCEvent *mcEvent)
Float_t fSamePiPiMotherID
Float_t fSamePiPiPiMotherID
TH2F ** fHistoTruePiPlPiMiPiZeroContaminationInvMassPt
TH1F ** fHistoTrueNegPionFromNeutralMesonPt
Int_t GetMCLabelPositive() const
void CalculateMesonCandidates()
vector< Int_t > GetReconstructedPosPionIndex()
void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Bool_t IsPiPlPiMiPiZeroDecay(TParticle *fMCMother) const
Float_t fSamePiPiMotherInvMass
void SetCaloClusterRef(Long_t ref)
void SetLabels(Int_t label1, Int_t label2, Int_t label3=0)
TList * fNeutralPionMesonCutArray
vector< Int_t > fVectorDoubleCountTruePi0s
array of histos with double counted photons, R, pT
GammaConversionVertex * GetBGEventVertex(Int_t zbin, Int_t mbin, Int_t event)
vector< Int_t > fSelectorNegPionIndex
TH2F ** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt
TH2F ** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt
Float_t fV0MultiplicityEtaEvent
void SetCaloPhotonMCFlags(AliMCEvent *mcEvent, Bool_t enableSort)
TH1F ** fHistoMCGammaFromNeutralMesonPt
TList * fNeutralPionCandidates
good calo gammas after selection
TH2F ** fHistoTrueMotherPiPlPiMiPiZeroInvMassPt
vector< Int_t > fVectorDoubleCountTrueOmegas
vector containing labels of validated eta
TH1F ** fHistoMCPosPionsFromNeutralMesonPt
TH2F ** fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt
TH2F ** fHistoGammaGammaInvMassPt
TH2F ** fHistoTrueMotherGammaGammaInvMassPt
TH2F ** fHistoTruePionPionFromSameMotherInvMassPt
TH2F ** fHistoTrueMotherGammaGammaFromEtaInvMassPt
TH2F ** fHistoBackInvMassPtGroup3
TH2F ** fHistoTrueAngleSum
TH2F ** fHistoAnglePiZeroPiMi
Int_t GetNumberOfPrimaryTracks()
virtual void UserExec(Option_t *)
TH1F ** fHistoTrueConvGammaPt
Float_t fSamePiPiMotherPt
TH1F ** fHistoConvGammaEta
TH2F ** fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt
TH2F ** fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt
TH1I ** fHistoNGoodESDTracks
void AddMesonEvent(TList *const eventMothers, Double_t xvalue, Double_t yvalue, Double_t zvalue, Int_t multiplicity, Double_t epvalue=-100)
TH2F ** fHistoBackInvMassPtGroup4SubPi0
TH1F ** fHistoTruePosPionPt
vector< Int_t > fVectorDoubleCountTrueEtas
vector containing labels of validated pi0
void SetProductionPoint(Double_t *point)
void SetTrueMesonValue(Int_t trueMeson)
TH2F ** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt
TH2F ** fHistoBackInvMassPtGroup1SubPi0
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate)
TParticle * GetPositiveMCDaughter(AliMCEvent *mcEvent)
Bool_t IsOmegaPiPlPiMiPiZeroDaughter(Int_t label) const
TH2F ** fHistoBackInvMassPtGroup2
void SetCaloPhotonMCLabel(Int_t i, Int_t labelCaloPhoton)
TH1F ** fHistoTruePosPionFromNeutralMesonPt
TH2F ** fHistoMotherInvMassPtRejectedKinematic
TH1F ** fHistoConvGammaPt
TList * fNeutralPionSidebandCandidates
TH2F ** fHistoBackInvMassPtGroup4FixedPzPi0
virtual void Terminate(const Option_t *)
TTree ** fTreePiPiPiSameMother
TH1F ** fHistoMCNegPionsFromNeutralMesonPt
TH1F ** fHistoMCAllGammaPt
Int_t GetTrueMesonValue() const
virtual void UserCreateOutputObjects()
Float_t fSamePiPiPiMotherPt
TList * fClusterCandidates
TParticle * GetNegativeMCDaughter(AliMCEvent *mcEvent)
Float_t fTrackMultiplicityOmegaEvent
TH2F ** fHistoAngleOmegaPiPlPiMi
Float_t fTrackMultiplicityEtaEvent
TH1F ** fHistoClusterGammaPt
TTree ** fTreePiPiSameMother
TH2F ** fHistoTruePionPionFromEtaInvMassPt
Class handling all kinds of selection cuts for Gamma Calo analysis.
TH2F ** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt
TH2F ** fHistoAngleOmegaPiPl
void ProcessTrueCaloPhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
TH2F ** fHistoBackInvMassPtGroup4
TH2F ** fHistoBackInvMassPtGroup2SubPi0
void FixPzToMatchPDGInvMassPi0(AliAODConversionMother *particle)
Int_t GetTrackLabelNegative() const
std::vector< AliAODConversionMother * > AliGammaConversionMotherAODVector
TH1F ** fHistoMCAllNegPionsPt
TH2F ** fHistoBackInvMassPtGroup3FixedPzPi0
TH2F ** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt
void UpdateEventByEventData()
TH1I ** fHistoNEvents
vector containing labels of validated photons
TH2F ** fHistoPionPionInvMassPt
Int_t GetTrackLabelPositive() const
void ProcessCaloPhotonCandidates()
AliConversionPhotonCuts * GetConversionCuts()
TH2F ** fHistoTruePionPionFromOmegaInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt
Int_t GetTrackLabel(Int_t i) const
TH1F ** fHistoMCAllPosPionsPt
TH1F ** fHistoMCOmegaPiPlPiMiPiZeroPt
TH2F ** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt
TH2F ** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt
TH2F ** fHistoMotherLikeSignBackInvMassPt
TH2F ** fHistoAnglePiPlPiZero
TH2F ** fHistoMotherLikeSignBackInvMassFixedPzPi0Pt
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TProfile ** fProfileEtaShift
void ProcessNeutralPionCandidatesPureCalo()
TList * fPosPionCandidates
TH2F ** fHistoPosPionClsTPC
TTree ** fTreeEventInfoOmega
virtual ~AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero()
TH2F ** fHistoBackInvMassPtGroup2FixedPzPi0
TH2F ** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt
Int_t GetMCParticleLabel(AliMCEvent *mcEvent)
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted omegas, invMass, pT
TH2F ** fHistoPionTPCdEdxNSigma
Bool_t IsLargestComponentElectron()
TH2F ** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt
Bool_t GammaIsNeutralMesonPiPlPiMiPiZeroDaughter(Int_t label) const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Int_t GetCaloPhotonMCLabel(Int_t i)
TH2F ** fHistoBackInvMassPtGroup3SubPi0
void ProcessConversionPhotonCandidates()
TH2F ** fHistoPionTPCdEdx
Float_t fV0MultiplicityOmegaEvent
TH2F ** fHistoMotherInvMassPt
TH1F ** fHistoMCConvGammaPt
void ProcessMCParticles()
Int_t GetMCLabelNegative() const
Float_t fZVertexOmegaEvent
void ProcessTrueNeutralPionCandidatesPureConversions(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Int_t GetNBGEvents() const
Bool_t fMoveParticleAccordingToVertex
TH2F ** fHistoBackInvMassPtGroup1
Int_t GetNCaloPhotonMCLabels()
TH2F ** fHistoMotherInvMassFixedPzPi0
Int_t GetZBinIndex(Double_t z) const
TH2F ** fHistoTrueMotherGammaGammaFromOmegaInvMassPt
TH1F ** fHistoClusterGammaEta
TList * GetCaloTrackMatcherHistograms()
TH2F ** fHistoBackInvMassPtGroup1FixedPzPi0
Double_t GetProductionZ() const
Double_t GetProductionX() const
TH2F ** fHistoTruePionPionInvMassPt
void ProcessNeutralPionCandidatesPureConversions()
AliGammaConversionMotherAODVector * GetBGGoodMesons(Int_t zbin, Int_t mbin, Int_t event)
void ProcessPionCandidates()
TH2F ** fHistoAngleOmegaPiZero
void ProcessNeutralPionCandidatesMixedConvCalo()
TH1F ** fHistoMCEtaPiPlPiMiPiZeroInAccPt