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),
110 fHistoConvGammaPt(NULL),
111 fHistoConvGammaEta(NULL),
112 fHistoClusterGammaPt(NULL),
113 fHistoClusterGammaEta(NULL),
114 fHistoNegPionPt(NULL),
115 fHistoPosPionPt(NULL),
116 fHistoNegPionPhi(NULL),
117 fHistoPosPionPhi(NULL),
118 fHistoNegPionEta(NULL),
119 fHistoPosPionEta(NULL),
120 fHistoNegPionClsTPC(NULL),
121 fHistoPosPionClsTPC(NULL),
122 fHistoPionDCAxy(NULL),
123 fHistoPionDCAz(NULL),
124 fHistoPionTPCdEdxNSigma(NULL),
125 fHistoPionTPCdEdx(NULL),
126 fHistoPionPionInvMassPt(NULL),
127 fHistoGammaGammaInvMassPt(NULL),
128 fHistoMotherInvMassPt(NULL),
129 fHistoMotherInvMassPtRejectedKinematic(NULL),
130 fHistoBackInvMassPtGroup1(NULL),
131 fHistoBackInvMassPtGroup2(NULL),
132 fHistoBackInvMassPtGroup3(NULL),
133 fHistoBackInvMassPtGroup4(NULL),
134 fHistoMotherLikeSignBackInvMassPt(NULL),
135 fHistoAngleOmegaPiPlPiMi(NULL),
136 fHistoAngleOmegaPiZero(NULL),
137 fHistoAngleOmegaPiPl(NULL),
138 fHistoAngleOmegaPiMi(NULL),
139 fHistoAnglePiPlPiMi(NULL),
140 fHistoAnglePiZeroPiMi(NULL),
141 fHistoAnglePiPlPiZero(NULL),
142 fHistoAngleSum(NULL),
143 fHistoTrueAngleSum(NULL),
144 fHistoMotherInvMassSubPi0(NULL),
145 fHistoBackInvMassPtGroup1SubPi0(NULL),
146 fHistoBackInvMassPtGroup2SubPi0(NULL),
147 fHistoBackInvMassPtGroup3SubPi0(NULL),
148 fHistoBackInvMassPtGroup4SubPi0(NULL),
149 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
150 fHistoMotherInvMassFixedPzPi0(NULL),
151 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
152 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
153 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
154 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
155 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
156 fHistoMCAllGammaPt(NULL),
157 fHistoMCConvGammaPt(NULL),
158 fHistoMCAllPosPionsPt(NULL),
159 fHistoMCAllNegPionsPt(NULL),
160 fHistoMCGammaFromNeutralMesonPt(NULL),
161 fHistoMCPosPionsFromNeutralMesonPt(NULL),
162 fHistoMCNegPionsFromNeutralMesonPt(NULL),
163 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
164 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
165 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
166 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
167 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
168 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
169 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
170 fHistoTrueMotherGammaGammaInvMassPt(NULL),
171 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
172 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
173 fHistoTrueConvGammaPt(NULL),
174 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
175 fHistoTrueClusterGammaPt(NULL),
176 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
177 fHistoTruePosPionPt(NULL),
178 fHistoTruePosPionFromNeutralMesonPt(NULL),
179 fHistoTrueNegPionPt(NULL),
180 fHistoTrueNegPionFromNeutralMesonPt(NULL),
181 fHistoTruePionPionInvMassPt(NULL),
182 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
183 fHistoTruePionPionFromEtaInvMassPt(NULL),
184 fHistoTruePionPionFromOmegaInvMassPt(NULL),
185 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
186 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
187 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
188 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
189 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
190 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
191 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
192 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
193 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
194 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
195 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
196 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
197 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
198 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
199 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
200 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
201 fHistoDoubleCountTruePi0InvMassPt(NULL),
202 fHistoDoubleCountTrueEtaInvMassPt(NULL),
203 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
204 fHistoDoubleCountTrueConvGammaRPt(NULL),
205 fVectorDoubleCountTruePi0s(0),
206 fVectorDoubleCountTrueEtas(0),
207 fVectorDoubleCountTrueOmegas(0),
208 fVectorDoubleCountTrueConvGammas(0),
210 fHistoNGoodESDTracks(NULL),
211 fProfileEtaShift(NULL),
212 fHistoSPDClusterTrackletBackground(NULL),
216 fNumberOfESDTracks(0),
217 fMoveParticleAccordingToVertex(kFALSE),
219 fDoMesonAnalysis(kTRUE),
221 fIsFromMBHeader(kTRUE),
223 fDoLightOutput(kFALSE),
234 fV0ReaderName(
"V0ReaderV1"),
236 fBGHandlerPiPl(NULL),
237 fBGHandlerPiMi(NULL),
247 fSelectorNegPionIndex(0),
248 fSelectorPosPionIndex(0),
249 fGoodConvGammas(NULL),
250 fClusterCandidates(NULL),
251 fNeutralPionCandidates(NULL),
252 fNeutralPionSidebandCandidates(NULL),
253 fPosPionCandidates(NULL),
254 fNegPionCandidates(NULL),
255 fGoodVirtualParticles(NULL),
256 fEventCutArray(NULL),
257 fGammaCutArray(NULL),
258 fClusterCutArray(NULL),
260 fNeutralPionMesonCutArray(NULL),
261 fMesonCutArray(NULL),
263 fConversionCuts(NULL),
265 fTreePiPiSameMother(NULL),
266 fTreePiPiPiSameMother(NULL),
267 fTreeEventInfoOmega(NULL),
268 fTreeEventInfoEta(NULL),
270 fSamePiPiMotherID(-1),
271 fSamePiPiMotherInvMass(-1),
272 fSamePiPiMotherPt(-1),
273 fSamePiPiPiMotherID(-1),
274 fSamePiPiPiMotherInvMass(-1),
275 fSamePiPiPiMotherPt(-1),
276 fV0MultiplicityOmegaEvent(-1),
277 fTrackMultiplicityOmegaEvent(-1),
278 fZVertexOmegaEvent(-1),
280 fV0MultiplicityEtaEvent(-1),
281 fTrackMultiplicityEtaEvent(-1),
282 fZVertexEtaEvent(-1),
284 fHistoConvGammaPt(NULL),
285 fHistoConvGammaEta(NULL),
286 fHistoClusterGammaPt(NULL),
287 fHistoClusterGammaEta(NULL),
288 fHistoNegPionPt(NULL),
289 fHistoPosPionPt(NULL),
290 fHistoNegPionPhi(NULL),
291 fHistoPosPionPhi(NULL),
292 fHistoNegPionEta(NULL),
293 fHistoPosPionEta(NULL),
294 fHistoNegPionClsTPC(NULL),
295 fHistoPosPionClsTPC(NULL),
296 fHistoPionDCAxy(NULL),
297 fHistoPionDCAz(NULL),
298 fHistoPionTPCdEdxNSigma(NULL),
299 fHistoPionTPCdEdx(NULL),
300 fHistoPionPionInvMassPt(NULL),
301 fHistoGammaGammaInvMassPt(NULL),
302 fHistoMotherInvMassPt(NULL),
303 fHistoMotherInvMassPtRejectedKinematic(NULL),
304 fHistoBackInvMassPtGroup1(NULL),
305 fHistoBackInvMassPtGroup2(NULL),
306 fHistoBackInvMassPtGroup3(NULL),
307 fHistoBackInvMassPtGroup4(NULL),
308 fHistoMotherLikeSignBackInvMassPt(NULL),
309 fHistoAngleOmegaPiPlPiMi(NULL),
310 fHistoAngleOmegaPiZero(NULL),
311 fHistoAngleOmegaPiPl(NULL),
312 fHistoAngleOmegaPiMi(NULL),
313 fHistoAnglePiPlPiMi(NULL),
314 fHistoAnglePiZeroPiMi(NULL),
315 fHistoAnglePiPlPiZero(NULL),
316 fHistoAngleSum(NULL),
317 fHistoTrueAngleSum(NULL),
318 fHistoMotherInvMassSubPi0(NULL),
319 fHistoBackInvMassPtGroup1SubPi0(NULL),
320 fHistoBackInvMassPtGroup2SubPi0(NULL),
321 fHistoBackInvMassPtGroup3SubPi0(NULL),
322 fHistoBackInvMassPtGroup4SubPi0(NULL),
323 fHistoMotherLikeSignBackInvMassSubPi0Pt(NULL),
324 fHistoMotherInvMassFixedPzPi0(NULL),
325 fHistoBackInvMassPtGroup1FixedPzPi0(NULL),
326 fHistoBackInvMassPtGroup2FixedPzPi0(NULL),
327 fHistoBackInvMassPtGroup3FixedPzPi0(NULL),
328 fHistoBackInvMassPtGroup4FixedPzPi0(NULL),
329 fHistoMotherLikeSignBackInvMassFixedPzPi0Pt(NULL),
330 fHistoMCAllGammaPt(NULL),
331 fHistoMCConvGammaPt(NULL),
332 fHistoMCAllPosPionsPt(NULL),
333 fHistoMCAllNegPionsPt(NULL),
334 fHistoMCGammaFromNeutralMesonPt(NULL),
335 fHistoMCPosPionsFromNeutralMesonPt(NULL),
336 fHistoMCNegPionsFromNeutralMesonPt(NULL),
337 fHistoMCEtaPiPlPiMiPiZeroPt(NULL),
338 fHistoMCEtaPiPlPiMiPiZeroInAccPt(NULL),
339 fHistoMCOmegaPiPlPiMiPiZeroPt(NULL),
340 fHistoMCOmegaPiPlPiMiPiZeroInAccPt(NULL),
341 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt(NULL),
342 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt(NULL),
343 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt(NULL),
344 fHistoTrueMotherGammaGammaInvMassPt(NULL),
345 fHistoTrueMotherGammaGammaFromEtaInvMassPt(NULL),
346 fHistoTrueMotherGammaGammaFromOmegaInvMassPt(NULL),
347 fHistoTrueConvGammaPt(NULL),
348 fHistoTrueConvGammaFromNeutralMesonPt(NULL),
349 fHistoTrueClusterGammaPt(NULL),
350 fHistoTrueClusterGammaFromNeutralMesonPt(NULL),
351 fHistoTruePosPionPt(NULL),
352 fHistoTruePosPionFromNeutralMesonPt(NULL),
353 fHistoTrueNegPionPt(NULL),
354 fHistoTrueNegPionFromNeutralMesonPt(NULL),
355 fHistoTruePionPionInvMassPt(NULL),
356 fHistoTruePionPionFromSameMotherInvMassPt(NULL),
357 fHistoTruePionPionFromEtaInvMassPt(NULL),
358 fHistoTruePionPionFromOmegaInvMassPt(NULL),
359 fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt(NULL),
360 fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt(NULL),
361 fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt(NULL),
362 fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt(NULL),
363 fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt(NULL),
364 fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt(NULL),
365 fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt(NULL),
366 fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt(NULL),
367 fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt(NULL),
368 fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt(NULL),
369 fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt(NULL),
370 fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt(NULL),
371 fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt(NULL),
372 fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt(NULL),
373 fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt(NULL),
374 fHistoTruePiPlPiMiPiZeroContaminationInvMassPt(NULL),
375 fHistoDoubleCountTruePi0InvMassPt(NULL),
376 fHistoDoubleCountTrueEtaInvMassPt(NULL),
377 fHistoDoubleCountTrueOmegaInvMassPt(NULL),
378 fHistoDoubleCountTrueConvGammaRPt(NULL),
379 fVectorDoubleCountTruePi0s(0),
380 fVectorDoubleCountTrueEtas(0),
381 fVectorDoubleCountTrueOmegas(0),
382 fVectorDoubleCountTrueConvGammas(0),
384 fHistoNGoodESDTracks(NULL),
385 fProfileEtaShift(NULL),
386 fHistoSPDClusterTrackletBackground(NULL),
390 fNumberOfESDTracks(0),
391 fMoveParticleAccordingToVertex(kFALSE),
393 fDoMesonAnalysis(kTRUE),
395 fIsFromMBHeader(kTRUE),
397 fDoLightOutput(kFALSE),
401 DefineOutput(1, TList::Class());
410 cout<<
"Destructor"<<endl;
465 TString cutstringConvGamma =
"";
467 TString cutstringCaloGamma =
"";
473 if (
fNeutralPionMode == 0) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
474 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());
475 else if (
fNeutralPionMode == 2) fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
481 if(collisionSystem == 1 || collisionSystem == 2 ||
482 collisionSystem == 5 || collisionSystem == 8 ||
483 collisionSystem == 9){
484 centMin = centMin*10;
485 centMax = centMax*10;
487 else if(collisionSystem == 3 || collisionSystem == 6){
491 else if(collisionSystem == 4 || collisionSystem == 7){
492 centMin = ((centMin*5)+45);
493 centMax = ((centMax*5)+45);
516 Double_t HistoMassRange[2] = {0.4,1.0};
517 Double_t HistoMassRangeSub[2] = {0.1,1.0};
518 Double_t HistoPtRange[2] = {0.,25.};
623 TString cutstringConvGamma =
"";
626 TString cutstringCaloGamma =
"";
634 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
636 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
638 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringCaloGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),cutstringMeson.Data());
639 TString nameCutFolder = Form(
"Cut Number %s", fullCutString.Data());
640 TString nameESDList = Form(
"%s ESD histograms", fullCutString.Data());
643 fCutFolder[iCut]->SetName(nameCutFolder.Data());
644 fCutFolder[iCut]->SetOwner(kTRUE);
648 fESDList[iCut]->SetName(nameESDList.Data());
653 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
654 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
657 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
661 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
662 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
663 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
664 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
683 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt",250,0,25);
687 fHistoConvGammaEta[iCut] =
new TH1F(
"ESD_ConvGamma_Eta",
"ESD_ConvGamma_Eta",600,-1.5,1.5);
702 fHistoNegPionPt[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Pt",
"ESD_PrimaryNegPions_Pt",1000,0,25);
706 fHistoPosPionPt[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Pt",
"ESD_PrimaryPosPions_Pt",1000,0,25);
710 fHistoNegPionPhi[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Phi",
"ESD_PrimaryNegPions_Phi",360,0,2*TMath::Pi());
714 fHistoPosPionPhi[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Phi",
"ESD_PrimaryPosPions_Phi",360,0,2*TMath::Pi());
724 fHistoNegPionEta[iCut] =
new TH1F(
"ESD_PrimaryNegPions_Eta",
"ESD_PrimaryNegPions_Eta",600,-1.5,1.5);
728 fHistoPosPionEta[iCut] =
new TH1F(
"ESD_PrimaryPosPions_Eta",
"ESD_PrimaryPosPions_Eta",600,-1.5,1.5);
732 fHistoNegPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryNegPions_ClsTPC",
"ESD_PrimaryNegPions_ClsTPC",100,0,1,400,0.,10.);
736 fHistoPosPionClsTPC[iCut] =
new TH2F(
"ESD_PrimaryPosPions_ClsTPC",
"ESD_PrimaryPosPions_ClsTPC",100,0,1,400,0.,10.);
740 fHistoPionDCAxy[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAxy",
"ESD_PrimaryPions_DCAxy",800,-4.0,4.0,400,0.,10.);
744 fHistoPionDCAz[iCut] =
new TH2F(
"ESD_PrimaryPions_DCAz",
"ESD_PrimaryPions_DCAz",800,-4.0,4.0,400,0.,10.);
752 fHistoPionTPCdEdx[iCut] =
new TH2F(
"ESD_PrimaryPions_TPCdEdxSignal",
"ESD_PrimaryPions_TPCdEdxSignal" ,150,0.05,20.0,800,0.0,200);
762 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
766 fHistoMotherInvMassPtRejectedKinematic[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt_KinematicRejected",
"ESD_Mother_InvMass_Pt_KinematicRejected",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
771 fHistoBackInvMassPtGroup1[iCut] =
new TH2F(
"ESD_Background_1_InvMass_Pt",
"ESD_Background_1_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
772 fHistoBackInvMassPtGroup2[iCut] =
new TH2F(
"ESD_Background_2_InvMass_Pt",
"ESD_Background_2_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
773 fHistoBackInvMassPtGroup3[iCut] =
new TH2F(
"ESD_Background_3_InvMass_Pt",
"ESD_Background_3_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
774 fHistoBackInvMassPtGroup4[iCut] =
new TH2F(
"ESD_Background_4_InvMass_Pt",
"ESD_Background_4_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
790 fHistoMotherLikeSignBackInvMassPt[iCut] =
new TH2F(
"ESD_Background_LikeSign_InvMass_Pt",
"ESD_Background_LikeSign_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
796 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]);
802 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
804 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
806 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
808 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
825 HistoNMassBinsSub,HistoMassRangeSub[0],HistoMassRangeSub[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
831 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]);
836 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]);
837 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]);
838 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]);
839 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]);
854 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]);
861 fHistoAngleOmegaPiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",
"ESD_Mother_AngleOmegaNegPionsPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
865 fHistoAngleOmegaPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNegPions_Pt",
"ESD_Mother_AngleOmegaNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
869 fHistoAngleOmegaPiPl[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaPosPions_Pt",
"ESD_Mother_AngleOmegaPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
873 fHistoAngleOmegaPiZero[iCut] =
new TH2F(
"ESD_Mother_AngleOmegaNeutralPion_Pt",
"ESD_Mother_AngleOmegaNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
877 fHistoAnglePiPlPiZero[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNeutralPion_Pt",
"ESD_Mother_AnglePosPionsNeutralPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
881 fHistoAnglePiPlPiMi[iCut] =
new TH2F(
"ESD_Mother_AnglePosPionsNegPions_Pt",
"ESD_Mother_AnglePosPionsNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
885 fHistoAnglePiZeroPiMi[iCut] =
new TH2F(
"ESD_Mother_AngleNeutralPionNegPions_Pt",
"ESD_Mother_AngleNeutralPionNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],360,0,TMath::Pi());
889 fHistoAngleSum[iCut] =
new TH2F(
"ESD_Mother_AngleSum_Pt",
"ESD_Mother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
896 Int_t bins = AxisAfter->GetNbins();
897 Double_t from = AxisAfter->GetXmin();
901 Double_t factor = TMath::Power(to/from, 1./bins);
902 for(
Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1];
904 AxisAfter->Set(bins, newBins);
906 AxisAfter->Set(bins, newBins);
910 fCutFolder[iCut]->Add(
fESDList[iCut]);
999 TString cutstringConvGamma =
"";
1002 TString cutstringCaloGamma =
"";
1010 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringNeutralPion.Data(), cutstringPion.Data(),
1011 cutstringMeson.Data());
1013 fullCutString = Form(
"%i_%s_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringNeutralPion.Data(),
1014 cutstringPion.Data(), cutstringMeson.Data());
1016 fullCutString = Form(
"%i_%s_%s_%s_%s_%s",
fNeutralPionMode,cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringNeutralPion.Data(), cutstringPion.Data(),
1017 cutstringMeson.Data());
1018 TString nameMCList = Form(
"%s MC histograms", fullCutString.Data());
1019 TString nameTrueRecList = Form(
"%s True histograms", fullCutString.Data());
1020 TString nameTrueRecTTreeList = Form(
"%s True TTrees", fullCutString.Data());
1023 fMCList[iCut]->SetName(nameMCList.Data());
1024 fMCList[iCut]->SetOwner(kTRUE);
1028 fHistoMCAllGammaPt[iCut] =
new TH1F(
"MC_AllGamma_Pt",
"MC_AllGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1033 fHistoMCConvGammaPt[iCut] =
new TH1F(
"MC_ConvGamma_Pt",
"MC_ConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1039 fHistoMCAllPosPionsPt[iCut] =
new TH1F(
"MC_AllPosPions_Pt",
"MC_AllPosPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1043 fHistoMCAllNegPionsPt[iCut] =
new TH1F(
"MC_AllNegPions_Pt",
"MC_AllNegPions_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1047 fHistoMCGammaFromNeutralMesonPt[iCut] =
new TH1F(
"MC_GammaFromNeutralMeson_Pt",
"MC_GammaFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1085 fTrueList[iCut]->SetName(nameTrueRecList.Data());
1091 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1105 fHistoTrueClusterGammaPt[iCut] =
new TH1F(
"ESD_TrueClusterGamma_Pt",
"ESD_TrueClusterGamma_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1114 fHistoTruePosPionPt[iCut] =
new TH1F(
"ESD_TruePosPion_Pt",
"ESD_TruePosPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1118 fHistoTrueNegPionPt[iCut] =
new TH1F(
"ESD_TrueNegPion_Pt",
"ESD_TrueNegPion_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1123 fHistoTrueNegPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TrueNegPionFromNeutralMeson_Pt",
"ESD_TrueNegPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1127 fHistoTruePosPionFromNeutralMesonPt[iCut] =
new TH1F(
"ESD_TruePosPionFromNeutralMeson_Pt",
"ESD_TruePosPionFromNeutralMeson_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1145 fHistoTrueMotherPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1151 fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherOmegaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1152 fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt[iCut] =
new TH2F(
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",
"ESD_TrueMotherEtaPiPlPiMiPiZero_InvMass_Pt",HistoNMassBins,HistoMassRange[0],HistoMassRange[1],HistoNPtBins,HistoPtRange[0],HistoPtRange[1]);
1175 fHistoTrueAngleSum[iCut] =
new TH2F(
"ESD_TrueMother_AngleSum_Pt",
"ESD_TrueMother_AngleSum_Pt",HistoNPtBins,HistoPtRange[0],HistoPtRange[1],720,0,2*TMath::Pi());
1211 2000,0.,2.,200,0.,20.);
1311 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1328 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1334 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1392 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
1395 if(InputEvent()->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1396 if(eventQuality == 2 || eventQuality == 3){
1404 if(!
fPionSelector){printf(
"Error: No PionSelector");
return;}
1418 Bool_t isRunningEMCALrelAna = kFALSE;
1425 if(eventNotAccepted){
1431 if(eventQuality != 0){
1440 fHistoSPDClusterTrackletBackground[iCut]->Fill(fInputEvent->GetMultiplicity()->GetNumberOfTracklets(),(fInputEvent->GetNumberOfITSClusters(0)+fInputEvent->GetNumberOfITSClusters(1)));
1517 printf(
" Eta t PiPlusPiMinus Gamma Task %s :: Eta Shift Manually Set to %f \n\n",
1540 nclus = fInputEvent->GetNumberOfCaloClusters();
1544 if(nclus == 0)
return;
1548 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1551 for(Long_t i = 0; i < nclus; i++){
1553 AliVCluster* clus = NULL;
1554 if(fInputEvent->IsA()==AliESDEvent::Class()) clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)fInputEvent->GetCaloCluster(i));
1555 else if(fInputEvent->IsA()==AliAODEvent::Class()) clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)fInputEvent->GetCaloCluster(i));
1557 if (!clus)
continue;
1560 TLorentzVector clusterVector;
1561 clus->GetMomentum(clusterVector,vertex);
1563 TLorentzVector* tmpvec =
new TLorentzVector();
1564 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
1568 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
1575 Int_t* mclabelsCluster = clus->GetLabels();
1578 if (clus->GetNLabels()>0){
1579 for (
Int_t k =0; k< (
Int_t)clus->GetNLabels(); k++){
1614 TParticle *Photon = NULL;
1615 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1619 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1620 Double_t mcProdVtxX = primVtxMC->GetX();
1621 Double_t mcProdVtxY = primVtxMC->GetY();
1622 Double_t mcProdVtxZ = primVtxMC->GetZ();
1667 if(!PhotonCandidate)
continue;
1672 Int_t isPosFromMBHeader
1675 Int_t isNegFromMBHeader
1678 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1699 GoodGammasStepOne->Add(PhotonCandidate);
1702 GoodGammasStepTwo->Add(PhotonCandidate);
1708 for(
Int_t i = 0;i<GoodGammasStepOne->GetEntries();i++){
1710 if(!PhotonCandidate)
continue;
1713 Int_t isPosFromMBHeader
1715 Int_t isNegFromMBHeader
1717 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1730 else GoodGammasStepTwo->Add(PhotonCandidate);
1734 for(
Int_t i = 0;i<GoodGammasStepTwo->GetEntries();i++){
1736 if(!PhotonCandidate)
continue;
1739 Int_t isPosFromMBHeader
1741 Int_t isNegFromMBHeader
1743 if( (isNegFromMBHeader+isPosFromMBHeader) != 4)
fIsFromMBHeader = kFALSE;
1760 delete GoodGammasStepOne;
1761 GoodGammasStepOne = 0x0;
1762 delete GoodGammasStepTwo;
1763 GoodGammasStepTwo = 0x0;
1773 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1774 Double_t mcProdVtxX = primVtxMC->GetX();
1775 Double_t mcProdVtxY = primVtxMC->GetY();
1776 Double_t mcProdVtxZ = primVtxMC->GetZ();
1779 if(posDaughter == NULL || negDaughter == NULL)
return;
1780 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
1784 else if (posDaughter->GetMother(0) == -1){
1788 if(TMath::Abs(posDaughter->GetPdgCode())!=11 || TMath::Abs(negDaughter->GetPdgCode())!=11)
return;
1789 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
1790 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
1793 if(Photon->GetPdgCode() != 22)
return;
1801 if( gammaIsPrimary ){
1815 for(
Int_t firstGammaIndex=0;firstGammaIndex<
fGoodConvGammas->GetEntries()-1;firstGammaIndex++){
1817 if (gamma0==NULL)
continue;
1818 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGoodConvGammas->GetEntries();secondGammaIndex++){
1821 if (gamma1==NULL)
continue;
1828 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1836 if(fInputEvent->IsA()==AliESDEvent::Class())
1838 if(fInputEvent->IsA()==AliAODEvent::Class())
1874 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1878 if (gamma0==NULL)
continue;
1881 if (firstGammaIndex == secondGammaIndex)
continue;
1883 if (gamma1==NULL)
continue;
1886 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
1927 Bool_t isTruePi0 = kFALSE;
1929 Int_t gamma0MotherLabel = -1;
1930 Int_t motherRealLabel = -1;
1932 if(gamma0MCLabel != -1){
1933 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
1937 gamma0MotherLabel=gammaMC0->GetMother(0);
1938 motherRealLabel=gammaMC0->GetFirstMother();
1940 if (TrueGammaCandidate0->
IsConversion() && gammaMC0->GetMother(0)>-1){
1941 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1942 motherRealLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
1944 gamma0MotherLabel=gammaMC0->GetMother(0);
1945 motherRealLabel=gammaMC0->GetMother(0);
1951 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
1954 Int_t gamma1MotherLabel = -1;
1956 if(gamma1MCLabel != -1){
1958 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
1962 gamma1MotherLabel=gammaMC1->GetMother(0);
1964 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
1965 else gamma1MotherLabel=gammaMC1->GetMother(0);
1970 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
1971 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
1998 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
1999 Bool_t isTruePi0 = kFALSE;
2000 Bool_t isTruePi0Dalitz = kFALSE;
2001 Bool_t gamma0DalitzCand = kFALSE;
2002 Bool_t gamma1DalitzCand = kFALSE;
2004 Int_t gamma0MotherLabel = -1;
2005 Int_t motherRealLabel = -1;
2006 if(gamma0MCLabel != -1){
2010 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2011 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2012 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2013 if(gammaMC0->GetPdgCode() == 22){
2014 gamma0MotherLabel=gammaMC0->GetFirstMother();
2015 motherRealLabel=gammaMC0->GetFirstMother();
2018 if(gammaMC0->GetPdgCode() ==111){
2019 gamma0DalitzCand = kTRUE;
2020 gamma0MotherLabel=-111;
2021 motherRealLabel=gamma0MCLabel;
2025 if(TrueGammaCandidate1->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2027 Int_t gamma1MotherLabel = -1;
2028 if(gamma1MCLabel != -1){
2032 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2033 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2034 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2035 if(gammaMC1->GetPdgCode() == 22){
2036 gamma1MotherLabel=gammaMC1->GetFirstMother();
2039 if(gammaMC1->GetPdgCode() ==111 ){
2040 gamma1DalitzCand = kTRUE;
2041 gamma1MotherLabel=-111;
2045 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2046 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2053 if (gamma1DalitzCand || gamma0DalitzCand){
2054 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2055 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2057 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
2058 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2063 if(isTruePi0 || isTruePi0Dalitz){
2085 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2086 Bool_t isTruePi0 = kFALSE;
2087 Bool_t isTruePi0Dalitz = kFALSE;
2088 Bool_t gamma0DalitzCand = kFALSE;
2089 Bool_t gamma1DalitzCand = kFALSE;
2090 Int_t motherRealLabel = -1;
2092 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
2093 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
2094 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
2096 Int_t gamma0MCLabel = -1;
2097 Int_t gamma0MotherLabel = -1;
2098 if(!positiveMC||!negativeMC)
2101 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
2102 gamma0MCLabel = positiveMC->GetMother();
2105 if(gamma0MCLabel != -1){
2107 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
2108 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2109 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
2110 if(gammaMC0->GetPdgCode() == 22){
2111 gamma0MotherLabel=gammaMC0->GetMother();
2112 motherRealLabel=gammaMC0->GetMother();
2115 if(gammaMC0->GetPdgCode() ==111){
2116 gamma0DalitzCand = kTRUE;
2117 gamma0MotherLabel=-111;
2118 motherRealLabel=gamma0MCLabel;
2122 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
2123 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
2125 Int_t gamma1MCLabel = -1;
2126 Int_t gamma1MotherLabel = -1;
2127 if(!positiveMC||!negativeMC)
2130 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
2131 gamma1MCLabel = positiveMC->GetMother();
2133 if(gamma1MCLabel != -1){
2135 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
2136 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2137 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
2138 if(gammaMC1->GetPdgCode() == 22){
2139 gamma1MotherLabel=gammaMC1->GetMother();
2142 if(gammaMC1->GetPdgCode() ==111 ){
2143 gamma1DalitzCand = kTRUE;
2144 gamma1MotherLabel=-111;
2148 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2149 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() == 111){
2156 if (gamma1DalitzCand || gamma0DalitzCand){
2157 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2158 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2160 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
2161 if (gamma1MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2165 if(isTruePi0 || isTruePi0Dalitz){
2190 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
2194 if (gamma0==NULL)
continue;
2199 if (gamma1==NULL)
continue;
2202 AliVCluster* cluster = fInputEvent->GetCaloCluster(gamma1->
GetCaloClusterRef());
2207 pi0cand->
SetLabels(firstGammaIndex,secondGammaIndex);
2251 if(TrueGammaCandidate0->
GetV0Index()<fInputEvent->GetNumberOfV0s()){
2252 Bool_t isTruePi0 = kFALSE;
2253 Bool_t isTruePi0Dalitz = kFALSE;
2254 Bool_t gamma0DalitzCand = kFALSE;
2257 Int_t gamma0MotherLabel = -1;
2258 Int_t motherRealLabel = -1;
2259 if(gamma0MCLabel != -1){
2263 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2264 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
2265 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
2266 if(gammaMC0->GetPdgCode() == 22){
2267 gamma0MotherLabel=gammaMC0->GetFirstMother();
2268 motherRealLabel=gammaMC0->GetFirstMother();
2271 if(gammaMC0->GetPdgCode() ==111){
2272 gamma0DalitzCand = kTRUE;
2273 gamma0MotherLabel=-111;
2274 motherRealLabel=gamma0MCLabel;
2280 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2283 Int_t gamma1MotherLabel = -1;
2286 if(gamma1MCLabel != -1){
2288 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2292 gamma1MotherLabel=gammaMC1->GetMother(0);
2294 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2295 else gamma1MotherLabel=gammaMC1->GetMother(0);
2300 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2301 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
2307 if (gamma0DalitzCand ){
2308 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
2309 if (gamma0MotherLabel == -111) isTruePi0Dalitz = kTRUE;
2313 if(isTruePi0 || isTruePi0Dalitz ){
2334 Double_t magField = fInputEvent->GetMagneticField();
2335 if( magField < 0.0 ){
2341 vector<Int_t> lGoodNegPionIndexPrev(0);
2342 vector<Int_t> lGoodPosPionIndexPrev(0);
2349 TLorentzVector *negPionforHandler =
new TLorentzVector();
2350 negPionforHandler->SetPxPyPzE(negPionCandidate->Px(), negPionCandidate->Py(), negPionCandidate->Pz(), negPionCandidate->E());
2353 delete negPionforHandler;
2362 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2363 Double_t mcProdVtxX = primVtxMC->GetX();
2364 Double_t mcProdVtxY = primVtxMC->GetY();
2365 Double_t mcProdVtxZ = primVtxMC->GetZ();
2367 Int_t labelNegPion = TMath::Abs( negPionCandidate->GetLabel() );
2369 if( labelNegPion>-1 && labelNegPion < fMCEvent->GetNumberOfTracks() ){
2370 TParticle* negPion =
fMCEvent->Particle(labelNegPion);
2371 if( negPion->GetPdgCode() == -211 ){
2374 if( negPionIsPrimary ){
2378 if( negPionIsPrimary ) {
2393 TLorentzVector *posPionforHandler =
new TLorentzVector();
2394 posPionforHandler->SetPxPyPzE(posPionCandidate->Px(), posPionCandidate->Py(), posPionCandidate->Pz(), posPionCandidate->E());
2397 delete posPionforHandler;
2405 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2406 Double_t mcProdVtxX = primVtxMC->GetX();
2407 Double_t mcProdVtxY = primVtxMC->GetY();
2408 Double_t mcProdVtxZ = primVtxMC->GetZ();
2410 Int_t labelPosPion = TMath::Abs( posPionCandidate->GetLabel() );
2412 if( labelPosPion>-1 && labelPosPion < fMCEvent->GetNumberOfTracks() ) {
2413 TParticle* posPion =
fMCEvent->Particle(labelPosPion);
2414 if( posPion->GetPdgCode() == 211 ){
2416 if( posPionIsPrimary ){
2420 if(posPionIsPrimary){
2431 for(
UInt_t i = 0; i < lGoodNegPionIndexPrev.size(); i++){
2432 AliESDtrack *negPionCandidate =
fESDEvent->GetTrack(lGoodNegPionIndexPrev[i]);
2433 AliKFParticle negPionCandidateKF( *negPionCandidate->GetConstrainedParam(), 211 );
2435 for(
UInt_t j = 0; j < lGoodPosPionIndexPrev.size(); j++){
2436 AliESDtrack *posPionCandidate =
fESDEvent->GetTrack(lGoodPosPionIndexPrev[j]);
2437 AliKFParticle posPionCandidateKF( *posPionCandidate->GetConstrainedParam(), 211 );
2441 AliKFVertex primaryVertexImproved(*fInputEvent->GetPrimaryVertex());
2443 virtualPhoton->SetProductionVertex(primaryVertexImproved);
2444 virtualPhoton->SetTrackLabels( lGoodPosPionIndexPrev[j], lGoodNegPionIndexPrev[i]);
2448 Int_t motherlabelp = 0;
2449 Int_t motherlabeln = 0;
2450 TParticle *fNegativeMCParticle =NULL;
2451 TParticle *fPositiveMCParticle =NULL;
2453 labeln=TMath::Abs(negPionCandidate->GetLabel());
2454 labelp=TMath::Abs(posPionCandidate->GetLabel());
2455 if(labeln>-1) fNegativeMCParticle =
fMCEvent->Particle(labeln);
2456 if(labelp>-1) fPositiveMCParticle =
fMCEvent->Particle(labelp);
2458 if (fNegativeMCParticle == NULL || fPositiveMCParticle == NULL)
return;
2460 motherlabeln = fNegativeMCParticle->GetMother(0);
2461 motherlabelp = fPositiveMCParticle->GetMother(0);
2462 virtualPhoton->SetMCLabelPositive(labelp);
2463 virtualPhoton->SetMCLabelNegative(labeln);
2470 if (fPositiveMCParticle && fNegativeMCParticle ) {
2473 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2475 if (motherlabeln == motherlabelp){
2487 if(TMath::Abs(fNegativeMCParticle->GetPdgCode())==211 && TMath::Abs(fPositiveMCParticle->GetPdgCode())==211){
2489 if (motherlabeln == motherlabelp){
2524 Float_t dcaToVertexXYPos = -1.0;
2525 Float_t dcaToVertexZPos = -1.0;
2526 Float_t dcaToVertexXYNeg = -1.0;
2527 Float_t dcaToVertexZNeg = -1.0;
2535 posPionCandidate->GetImpactParameters(bPos,bCovPos);
2536 if (bCovPos[0]<=0 || bCovPos[2]<=0) {
2537 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2538 bCovPos[0]=0; bCovPos[2]=0;
2543 posPionCandidate->GetImpactParameters(bNeg,bCovNeg);
2544 if (bCovNeg[0]<=0 || bCovNeg[2]<=0) {
2545 AliDebug(1,
"Estimated b resolution lower or equal zero!");
2546 bCovNeg[0]=0; bCovNeg[2]=0;
2549 dcaToVertexXYPos = bPos[0];
2550 dcaToVertexZPos = bPos[1];
2551 dcaToVertexXYNeg = bNeg[0];
2552 dcaToVertexZNeg = bNeg[1];
2574 delete virtualPhoton;
2584 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2585 Double_t mcProdVtxX = primVtxMC->GetX();
2586 Double_t mcProdVtxY = primVtxMC->GetY();
2587 Double_t mcProdVtxZ = primVtxMC->GetZ();
2592 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2593 if (!particle)
continue;
2595 Int_t isMCFromMBHeader = -1;
2608 if(particle->GetMother(0) >-1){
2609 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2610 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2611 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2612 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2613 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2623 if(particle->GetMother(0) >-1){
2624 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==111){
2625 if (
fMCEvent->Particle(particle->GetMother(0))->GetMother(0) > -1){
2626 if (
fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 221 ||
2627 fMCEvent->Particle((
fMCEvent->Particle(particle->GetMother(0)))->GetMother(0))->GetPdgCode() == 223 ){
2628 if (
fMCEvent->Particle(particle->GetMother(0))->GetNDaughters()==3 )
2642 if( particle->GetPdgCode() == 211){
2644 if(particle->GetMother(0) >-1){
2645 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223)
2649 if( particle->GetPdgCode() == -211){
2651 if(particle->GetMother(0) >-1){
2652 if (
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==221 ||
fMCEvent->Particle(particle->GetMother(0))->GetPdgCode() ==223 )
2660 Int_t labelNeutPion = -1;
2661 Int_t labelNegPion = -1;
2662 Int_t labelPosPion = -1;
2668 if (particle->Pt()>0.005){
2676 if(labelNeutPion>-1){
2677 TParticle *neutPion =
fMCEvent->Particle(labelNeutPion);
2678 if(neutPion->GetDaughter(0)>-1 && neutPion->GetDaughter(1)>-1){
2679 TParticle *gamma1 =
fMCEvent->Particle(neutPion->GetDaughter(0));
2680 TParticle *gamma2 =
fMCEvent->Particle(neutPion->GetDaughter(1));
2687 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2697 if( kDaughter0IsPrim && kDaughter1IsPrim && kNegPionIsPrim && kPosPionIsPrim &&
2723 if (neutralPion==NULL)
continue;
2728 if (vParticle==NULL)
continue;
2732 mesoncand->
SetLabels(mesonIndex,virtualParticleIndex);
2736 if(negPionCandidatetmp==NULL){
delete mesoncand;
continue;}
2738 NegPiontmp->SetPxPyPzE(negPionCandidatetmp->Px(), negPionCandidatetmp->Py(), negPionCandidatetmp->Pz(), negPionCandidatetmp->E());
2741 if(posPionCandidatetmp==NULL){
delete NegPiontmp;
delete mesoncand;
continue;}
2743 PosPiontmp->SetPxPyPzE(posPionCandidatetmp->Px(), posPionCandidatetmp->Py(), posPionCandidatetmp->Pz(), posPionCandidatetmp->E());
2745 if(
KinematicCut(NegPiontmp, PosPiontmp, neutralPion, mesoncand)){
2754 fHistoAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(neutralPion->Vect()))));
2761 Pi0tmp->SetPxPyPzE(neutralPion->Px(), neutralPion->Py(), neutralPion->Pz(), neutralPion->Energy());
2814 Int_t NPi0Candidates = 0;
2821 for(
Int_t iCurrentPi0=0; iCurrentPi0<NPi0Candidates; iCurrentPi0++){
2841 if((EventPiMiMeson && EventPiPlMeson) == kFALSE)
continue;
2849 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2860 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
2872 delete backPiPlPiMiCandidate;
2873 backPiPlPiMiCandidate = 0x0;
2876 delete backPiPlPiMiCandidate;
2877 backPiPlPiMiCandidate = 0x0;
2887 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson,EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2890 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2895 if (nEventsInBGMi != nEventsInBGPl){
2902 }
else if(nEventsInBGMi==nEventsInBGPl){
2910 delete PiMiPiZerotmp;
2911 delete PiPlPiMiPiZerotmp;
2913 delete PiPlPiMiPiZeroBackgroundCandidate;
2914 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2917 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2918 delete PiPlPiMiPiZeroBackgroundCandidate;
2919 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2922 if(PiPlPiZeroBackgroundCandidate!=0x0){
2923 delete PiPlPiZeroBackgroundCandidate;
2924 PiPlPiZeroBackgroundCandidate = 0x0;
2940 for(
UInt_t iCurrentPiPl = 0; iCurrentPiPl<EventPiPlMeson->size();iCurrentPiPl++){
2957 delete backPiPlPiMiCandidate;
2958 backPiPlPiMiCandidate = 0x0;
2961 delete backPiPlPiMiCandidate;
2962 backPiPlPiMiCandidate = 0x0;
2972 if(
KinematicCut(&EventPiNegGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
2976 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
2987 delete PiMiPiZerotmp;
2988 delete PiPlPiMiPiZerotmp;
2990 delete PiPlPiMiPiZeroBackgroundCandidate;
2991 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2994 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
2995 delete PiPlPiMiPiZeroBackgroundCandidate;
2996 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
2999 if(PiPlPiZeroBackgroundCandidate!=0x0){
3000 delete PiPlPiZeroBackgroundCandidate;
3001 PiPlPiZeroBackgroundCandidate = 0x0;
3017 for(
UInt_t iCurrentPiMi = 0; iCurrentPiMi<EventPiMiMeson->size();iCurrentPiMi++){
3037 delete backPiPlPiMiCandidate;
3038 backPiPlPiMiCandidate = 0x0;
3041 delete backPiPlPiMiCandidate;
3042 backPiPlPiMiCandidate = 0x0;
3052 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiPlGoodMeson, EventPiZeroGoodMeson,PiPlPiMiPiZeroBackgroundCandidate)){
3056 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3067 delete PiMiPiZerotmp;
3068 delete PiPlPiMiPiZerotmp;
3070 delete PiPlPiMiPiZeroBackgroundCandidate;
3071 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3074 if(PiPlPiMiPiZeroBackgroundCandidate!=0x0){
3075 delete PiPlPiMiPiZeroBackgroundCandidate;
3076 PiPlPiMiPiZeroBackgroundCandidate = 0x0;
3079 if(PiMiPiZeroBackgroundCandidate!=0x0){
3080 delete PiMiPiZeroBackgroundCandidate;
3081 PiMiPiZeroBackgroundCandidate = 0x0;
3096 if(iCurrentPiPl!=iCurrentPiPl2){
3106 delete backPiPlPiPlCandidate;
3107 backPiPlPiPlCandidate = 0x0;
3110 delete backPiPlPiPlCandidate;
3111 backPiPlPiPlCandidate = 0x0;
3121 if(
KinematicCut(&EventPiPlGoodMeson, &EventPiPlGoodMeson2, EventPiZeroGoodMeson,PiPlPiPlPiZeroBackgroundCandidate)){
3125 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3136 delete PiPlPiZerotmp;
3137 delete PiPlPiPlPiZerotmp;
3139 delete PiPlPiPlPiZeroBackgroundCandidate;
3140 PiPlPiPlPiZeroBackgroundCandidate = 0x0;
3156 if(iCurrentPiMi!=iCurrentPiMi2){
3166 delete backPiMiPiMiCandidate;
3167 backPiMiPiMiCandidate = 0x0;
3170 delete backPiMiPiMiCandidate;
3171 backPiMiPiMiCandidate = 0x0;
3181 if(
KinematicCut(&EventPiMiGoodMeson, &EventPiMiGoodMeson2, EventPiZeroGoodMeson,PiMiPiMiPiZeroBackgroundCandidate)){
3185 Pi0tmp->SetPxPyPzE(EventPiZeroGoodMeson->Px(), EventPiZeroGoodMeson->Py(), EventPiZeroGoodMeson->Pz(), EventPiZeroGoodMeson->Energy());
3196 delete PiMiPiZerotmp;
3197 delete PiMiPiMiPiZerotmp;
3199 delete PiMiPiMiPiZeroBackgroundCandidate;
3200 PiMiPiMiPiZeroBackgroundCandidate = 0x0;
3216 if((omega->Pt())<=5.){
3217 if( (omega->Angle(pospion->Vect())) < ((2.78715*(TMath::Exp(-0.589934*(omega->Pt()))+0.0519574))*
fTolerance) &&
3218 (omega->Angle(negpion->Vect())) < ((5.94216*(TMath::Exp(-0.444428*(omega->Pt()))-0.0574076))*
fTolerance) &&
3219 (omega->Angle(neutpion->Vect())) < ((2.79529*(TMath::Exp(-0.565999*(omega->Pt()))+0.0413576))*
fTolerance) &&
3220 (pospion->Angle(negpion->Vect())) < ((3.14446*(TMath::Exp(-0.666433*(omega->Pt()))+0.0964309))*
fTolerance) &&
3221 (pospion->Angle(neutpion->Vect())) < ((3.08241*(TMath::Exp(-0.650657*(omega->Pt()))+0.0997539))*
fTolerance) &&
3222 (negpion->Angle(neutpion->Vect())) < ((3.18536*(TMath::Exp(-0.752847*(omega->Pt()))+0.1262780))*
fTolerance)
3227 if( (omega->Angle(pospion->Vect())) < ((0.459270*(TMath::Exp(-0.126007*(omega->Pt()))+0.100475))*
fTolerance) &&
3228 (omega->Angle(negpion->Vect())) < ((0.521250*(TMath::Exp(-0.152532*(omega->Pt()))+0.114617))*
fTolerance) &&
3229 (omega->Angle(neutpion->Vect())) < ((0.409766*(TMath::Exp(-0.108566*(omega->Pt()))+0.103594))*
fTolerance) &&
3230 (pospion->Angle(negpion->Vect())) < ((0.709206*(TMath::Exp(-0.149072*(omega->Pt()))+0.111345))*
fTolerance) &&
3231 (pospion->Angle(neutpion->Vect())) < ((0.662184*(TMath::Exp(-0.123397*(omega->Pt()))+0.104675))*
fTolerance) &&
3232 (negpion->Angle(neutpion->Vect())) < ((0.730228*(TMath::Exp(-0.120859*(omega->Pt()))+0.105522))*
fTolerance)
3247 Bool_t isSameMotherPiPlPiMiPiZero = kFALSE;
3248 Bool_t isSameMotherPiPlPiMi = kFALSE;
3249 Bool_t isSameMotherPiPlPiZero = kFALSE;
3250 Bool_t isSameMotherPiMiPiZero = kFALSE;
3251 Bool_t isNoSameMother = kFALSE;
3252 Bool_t isNoPiPiPi = kFALSE;
3256 Int_t virtualParticleMotherLabel = -1;
3262 if ( !(trueMesonFlag == 1 && pi0MCLabel != -1)){
3268 Int_t pi0MotherLabel =
fMCEvent->Particle(pi0MCLabel)->GetMother(0);
3273 Int_t posMotherLabelMC = positiveMC->GetMother(0);
3274 Int_t negMotherLabelMC = negativeMC->GetMother(0);
3277 if((TMath::Abs(negativeMC->GetPdgCode())==211) && (TMath::Abs(positiveMC->GetPdgCode())==211) && (
fMCEvent->Particle(pi0MCLabel)->GetPdgCode()==111)){
3279 if(virtualParticleMCLabel!=-1){
3281 virtualParticleMotherLabel = virtualParticleMCLabel;
3282 if(virtualParticleMotherLabel==pi0MotherLabel){
3284 if(
fMCEvent->Particle(pi0MotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMiPiZero = kTRUE;
3287 if(
fMCEvent->Particle(virtualParticleMotherLabel)->GetStatusCode()!=21) isSameMotherPiPlPiMi = kTRUE;
3290 if(pi0MotherLabel==negMotherLabelMC && negMotherLabelMC != -1){
3292 if(
fMCEvent->Particle(negMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiMiPiZero = kTRUE;
3293 }
else if(pi0MotherLabel==posMotherLabelMC && posMotherLabelMC != -1){
3295 if(
fMCEvent->Particle(posMotherLabelMC)->GetStatusCode()!=21) isSameMotherPiPlPiZero = kTRUE;
3298 isNoSameMother = kTRUE;
3307 if(isSameMotherPiPlPiMiPiZero){
3308 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3313 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3315 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3316 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3318 delete PosPiontmp; PosPiontmp = 0x0;
3319 delete NegPiontmp; NegPiontmp = 0x0;
3326 fPtEta = mesoncand->Pt();
3331 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3337 PosPiontmp->SetPxPyPzE(positiveMC->Px(), positiveMC->Py(), positiveMC->Pz(), positiveMC->Energy());
3339 NegPiontmp->SetPxPyPzE(negativeMC->Px(), negativeMC->Py(), negativeMC->Pz(), negativeMC->Energy());
3340 if(!
fDoLightOutput)
fHistoTrueAngleSum[
fiCut]->Fill(mesoncand->Pt(),((PosPiontmp->Angle(mesoncand->Vect()))+(NegPiontmp->Angle(PosPiontmp->Vect()))+(PosPiontmp->Angle(TrueNeutralPionCandidate->Vect()))));
3364 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3367 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3370 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 113){
3373 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 331){
3376 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 310){
3379 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130){
3395 if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 221){
3398 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 223){
3401 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() ==-213){
3404 }
else if(
fMCEvent->Particle(pi0MotherLabel)->GetPdgCode() == 130){
3420 if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 221){
3423 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 223){
3426 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 213) {
3429 }
else if(
fMCEvent->Particle(posMotherLabelMC)->GetPdgCode() == 130) {
3492 Double_t dx = vertex->
fX - fInputEvent->GetPrimaryVertex()->GetX();
3493 Double_t dy = vertex->
fY - fInputEvent->GetPrimaryVertex()->GetY();
3494 Double_t dz = vertex->
fZ - fInputEvent->GetPrimaryVertex()->GetZ();
3504 pi0.SetPdgCode(111);
3509 Int_t signPz = particle->Pz()<0?-1:1;
3511 Double_t pz = signPz*TMath::Sqrt(TMath::Abs(pow(PdgMass,2)-pow(energy,2)+pow(px,2)+pow(py,2)));
3512 particle->SetPxPyPzE(px,py,pz,energy);
3522 if(label<0)
return kFALSE;
3523 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3524 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3526 TParticle* mother =
fMCEvent->Particle( motherLabel );
3528 if( mother->GetPdgCode() != 221 )
return kFALSE;
3539 if(label<0)
return kFALSE;
3540 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3541 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3543 TParticle* mother =
fMCEvent->Particle( motherLabel );
3545 if( mother->GetPdgCode() != 223 )
return kFALSE;
3556 if( fMCMother->GetNDaughters() != 3 )
return kFALSE;
3558 if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) )
return kFALSE;
3561 TParticle *posPion = 0x0;
3562 TParticle *negPion = 0x0;
3563 TParticle *neutPion = 0x0;
3565 for(
Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
3566 if(index<0)
continue;
3567 TParticle* temp = (TParticle*)
fMCEvent->Particle( index );
3569 switch( temp->GetPdgCode() ) {
3581 if( posPion && negPion && neutPion)
return kTRUE;
3591 if(label<0)
return kFALSE;
3592 Int_t motherLabel =
fMCEvent->Particle( label )->GetMother(0);
3593 if( motherLabel < 0 || motherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3595 TParticle* mother =
fMCEvent->Particle( motherLabel );
3597 if( mother->GetPdgCode() != 111 )
return kFALSE;
3599 Int_t grandMotherLabel = mother->GetMother(0);
3600 if( grandMotherLabel < 0 || grandMotherLabel >=
fMCEvent->GetNumberOfTracks() )
return kFALSE;
3601 TParticle* grandmother =
fMCEvent->Particle( grandMotherLabel );
3610 if(tobechecked > -1)
3612 vector<Int_t>::iterator it;
3613 it = find (vec.begin(), vec.end(), tobechecked);
3614 if (it != vec.end())
return true;
3616 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
vector< Int_t > fVectorDoubleCountTrueConvGammas
vector containing labels of validated omega
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoDoubleCountTrueEtaInvMassPt
array of histos with double counted pi0s, invMass, pT