29 #include "THnSparse.h" 32 #include "AliAnalysisTask.h" 33 #include "AliAnalysisManager.h" 34 #include "AliESDEvent.h" 35 #include "AliESDInputHandler.h" 36 #include "AliMCEventHandler.h" 37 #include "AliMCEvent.h" 38 #include "AliMCParticle.h" 39 #include "AliCentrality.h" 40 #include "AliESDVZERO.h" 41 #include "AliESDpid.h" 43 #include "AliVParticle.h" 44 #include "AliESDtrack.h" 45 #include "AliESDtrackCuts.h" 46 #include "AliKFVertex.h" 47 #include "AliGenCocktailEventHeader.h" 49 #include "AliAODMCParticle.h" 50 #include "AliAODMCHeader.h" 51 #include "AliEventplane.h" 53 #include "AliAODEvent.h" 54 #include "AliAODInputHandler.h" 55 #include "AliESDEvent.h" 56 #include "AliESDInputHandler.h" 57 #include "AliInputEventHandler.h" 71 fBGClusHandlerRP(NULL),
75 fConversionCuts(NULL),
76 fCaloPhotonCuts(NULL),
84 fOutputContainer(NULL),
85 fGammaCandidates(NULL),
86 fClusterCandidates(NULL),
89 fClusterCutArray(NULL),
92 fV0ReaderName("V0ReaderV1"),
94 fFileNameBroken(NULL),
95 fSparseMotherInvMassPtZM(NULL),
96 fSparseMotherBackInvMassPtZM(NULL),
97 fTreeBrokenFiles(NULL),
98 fProfileTruePrimaryMesonWeightsInvMassPt(NULL),
99 fHistoMotherInvMassPt(NULL),
100 fHistoMotherMatchedInvMassPt(NULL),
101 fHistoMotherBackInvMassPt(NULL),
102 fHistoMotherMesonPtY(NULL),
103 fHistoMotherMesonPtAlpha(NULL),
104 fHistoMotherMesonPtOpenAngle(NULL),
105 fHistoMotherMesonConvPhotonEtaPhi(NULL),
106 fHistoTrueMesonInvMassPt(NULL),
107 fHistoTrueMesonMatchedInvMassPt(NULL),
108 fHistoTrueMesonCaloPhotonInvMassPt(NULL),
109 fHistoTrueMesonCaloConvertedPhotonInvMassPt(NULL),
110 fHistoTrueMesonCaloMixedPhotonConvPhotonInvMassPt(NULL),
111 fHistoTrueMesonCaloConvertedPhotonMatchedInvMassPt(NULL),
112 fHistoTrueMesonCaloElectronInvMassPt(NULL),
113 fHistoTrueMesonCaloMergedClusterInvMassPt(NULL),
114 fHistoTrueMesonCaloMergedClusterPartConvInvMassPt(NULL),
115 fHistoTruePrimaryMesonInvMassPt(NULL),
116 fHistoTruePrimaryMesonW0WeightingInvMassPt(NULL),
117 fHistoTruePrimaryMesonMCPtResolPt(NULL),
118 fHistoTrueMotherMesonConvPhotonEtaPhi(NULL),
119 fHistoTrueBckGGInvMassPt(NULL),
120 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
121 fHistoTrueBckAsymEClustersInvMassPt(NULL),
122 fHistoTrueBckContInvMassPt(NULL),
123 fHistoTrueMesonPtY(NULL),
124 fHistoTrueMesonPtAlpha(NULL),
125 fHistoTrueMesonPtOpenAngle(NULL),
126 fHistoMCMesonPtY(NULL),
127 fHistoMCMesonPtAlpha(NULL),
128 fHistoMCMesonPtJetPt(NULL),
129 fHistoTrueNLabelsInClusPt(NULL),
130 fHistoDoubleCountTrueMesonInvMassPt(NULL),
131 fHistoDoubleCountTrueConvGammaRPt(NULL),
132 fHistoDoubleCountTrueClusterGammaPt(NULL),
133 fHistoSPDClusterTrackletBackground(NULL),
134 fProfileEtaShift(NULL),
135 fProfileJetJetXSection(NULL),
136 fHistoMCHeaders(NULL),
137 fHistoConvGammaPt(NULL),
138 fHistoClusGammaPt(NULL),
139 fHistoClusGammaE(NULL),
140 fHistoClusOverlapHeadersGammaPt(NULL),
141 fHistoClusAllHeadersGammaPt(NULL),
142 fHistoClusRejectedHeadersGammaPt(NULL),
143 fHistoMotherInvMassRejected(NULL),
144 fHistoMCMesonPt(NULL),
145 fHistoMCMesonWOWeightPt(NULL),
146 fHistoMCMesonWOEvtWeightPt(NULL),
147 fHistoMCMesonInAccPt(NULL),
148 fHistoMCMesonWOWeightInAccPt(NULL),
149 fHistoMCMesonWOEvtWeightInAccPt(NULL),
150 fHistoTrueConvGammaPt(NULL),
151 fHistoTruePrimaryConvGammaPt(NULL),
152 fHistoTrueClusGammaPt(NULL),
153 fHistoTrueClusConvGammaPt(NULL),
154 fHistoTrueClusConvGammaFullyPt(NULL),
155 fHistoTruePrimaryClusGammaPt(NULL),
156 fHistoTruePrimaryClusConvGammaPt(NULL),
157 fHistoMultipleCountTrueMeson(NULL),
158 fHistoMultipleCountTrueConvGamma(NULL),
159 fHistoMultipleCountTrueClusterGamma(NULL),
161 fHistoNEventsWOWeight(NULL),
162 fHistoNGoodESDTracks(NULL),
166 fHistoNGammaConvCandidates(NULL),
167 fHistoNGammaCaloCandidates(NULL),
168 fHistoNV0Tracks(NULL),
169 fHistoJetJetNTrials(NULL),
170 fMapMultipleCountTrueMesons(),
171 fMapMultipleCountTrueConvGammas(),
172 fMapMultipleCountTrueClusterGammas(),
173 fVectorRecTrueMesons(0),
174 fVectorDoubleCountTrueMesons(0),
175 fVectorDoubleCountTrueConvGammas(0),
176 fVectorDoubleCountTrueClusterGammas(0),
181 fMesonInvMassWindow(NULL),
186 fEventPlaneAngle(-100),
189 fMesonInvMassNBins(0),
191 fNGammaCandidates(0),
202 fMoveParticleAccordingToVertex(kTRUE),
203 fDoLightOutput(kFALSE),
204 fIsFromDesiredHeader(kTRUE),
205 fIsOverlappingWithOtherHeader(kFALSE),
207 fSetPlotHistsExtQA(kFALSE),
208 fDoConvGammaShowerShapeTree(kFALSE),
209 fEnableSortForClusMC(kFALSE),
210 fDoPrimaryTrackMatching(kFALSE),
211 fDoInvMassShowerShapeTree(kFALSE),
212 fAllowOverlapHeaders(kTRUE),
213 fEnableClusterCutsForTrigger(kFALSE)
225 fBGClusHandler(NULL),
226 fBGClusHandlerRP(NULL),
230 fConversionCuts(NULL),
231 fCaloPhotonCuts(NULL),
239 fOutputContainer(NULL),
240 fGammaCandidates(NULL),
241 fClusterCandidates(NULL),
242 fEventCutArray(NULL),
244 fClusterCutArray(NULL),
245 fMesonCutArray(NULL),
247 fV0ReaderName(
"V0ReaderV1"),
248 fCorrTaskSetting(
""),
249 fFileNameBroken(NULL),
250 fSparseMotherInvMassPtZM(NULL),
251 fSparseMotherBackInvMassPtZM(NULL),
252 fTreeBrokenFiles(NULL),
253 fProfileTruePrimaryMesonWeightsInvMassPt(NULL),
254 fHistoMotherInvMassPt(NULL),
255 fHistoMotherMatchedInvMassPt(NULL),
256 fHistoMotherBackInvMassPt(NULL),
257 fHistoMotherMesonPtY(NULL),
258 fHistoMotherMesonPtAlpha(NULL),
259 fHistoMotherMesonPtOpenAngle(NULL),
260 fHistoMotherMesonConvPhotonEtaPhi(NULL),
261 fHistoTrueMesonInvMassPt(NULL),
262 fHistoTrueMesonMatchedInvMassPt(NULL),
263 fHistoTrueMesonCaloPhotonInvMassPt(NULL),
264 fHistoTrueMesonCaloConvertedPhotonInvMassPt(NULL),
265 fHistoTrueMesonCaloMixedPhotonConvPhotonInvMassPt(NULL),
266 fHistoTrueMesonCaloConvertedPhotonMatchedInvMassPt(NULL),
267 fHistoTrueMesonCaloElectronInvMassPt(NULL),
268 fHistoTrueMesonCaloMergedClusterInvMassPt(NULL),
269 fHistoTrueMesonCaloMergedClusterPartConvInvMassPt(NULL),
270 fHistoTruePrimaryMesonInvMassPt(NULL),
271 fHistoTruePrimaryMesonW0WeightingInvMassPt(NULL),
272 fHistoTruePrimaryMesonMCPtResolPt(NULL),
273 fHistoTrueMotherMesonConvPhotonEtaPhi(NULL),
274 fHistoTrueBckGGInvMassPt(NULL),
275 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
276 fHistoTrueBckAsymEClustersInvMassPt(NULL),
277 fHistoTrueBckContInvMassPt(NULL),
278 fHistoTrueMesonPtY(NULL),
279 fHistoTrueMesonPtAlpha(NULL),
280 fHistoTrueMesonPtOpenAngle(NULL),
281 fHistoMCMesonPtY(NULL),
282 fHistoMCMesonPtAlpha(NULL),
283 fHistoMCMesonPtJetPt(NULL),
284 fHistoTrueNLabelsInClusPt(NULL),
285 fHistoDoubleCountTrueMesonInvMassPt(NULL),
286 fHistoDoubleCountTrueConvGammaRPt(NULL),
287 fHistoDoubleCountTrueClusterGammaPt(NULL),
288 fHistoSPDClusterTrackletBackground(NULL),
289 fProfileEtaShift(NULL),
290 fProfileJetJetXSection(NULL),
291 fHistoMCHeaders(NULL),
292 fHistoConvGammaPt(NULL),
293 fHistoClusGammaPt(NULL),
294 fHistoClusGammaE(NULL),
295 fHistoClusOverlapHeadersGammaPt(NULL),
296 fHistoClusAllHeadersGammaPt(NULL),
297 fHistoClusRejectedHeadersGammaPt(NULL),
298 fHistoMotherInvMassRejected(NULL),
299 fHistoMCMesonPt(NULL),
300 fHistoMCMesonWOWeightPt(NULL),
301 fHistoMCMesonWOEvtWeightPt(NULL),
302 fHistoMCMesonInAccPt(NULL),
303 fHistoMCMesonWOWeightInAccPt(NULL),
304 fHistoMCMesonWOEvtWeightInAccPt(NULL),
305 fHistoTrueConvGammaPt(NULL),
306 fHistoTruePrimaryConvGammaPt(NULL),
307 fHistoTrueClusGammaPt(NULL),
308 fHistoTrueClusConvGammaPt(NULL),
309 fHistoTrueClusConvGammaFullyPt(NULL),
310 fHistoTruePrimaryClusGammaPt(NULL),
311 fHistoTruePrimaryClusConvGammaPt(NULL),
312 fHistoMultipleCountTrueMeson(NULL),
313 fHistoMultipleCountTrueConvGamma(NULL),
314 fHistoMultipleCountTrueClusterGamma(NULL),
316 fHistoNEventsWOWeight(NULL),
317 fHistoNGoodESDTracks(NULL),
321 fHistoNGammaConvCandidates(NULL),
322 fHistoNGammaCaloCandidates(NULL),
323 fHistoNV0Tracks(NULL),
324 fHistoJetJetNTrials(NULL),
325 fMapMultipleCountTrueMesons(),
326 fMapMultipleCountTrueConvGammas(),
327 fMapMultipleCountTrueClusterGammas(),
328 fVectorRecTrueMesons(0),
329 fVectorDoubleCountTrueMesons(0),
330 fVectorDoubleCountTrueConvGammas(0),
331 fVectorDoubleCountTrueClusterGammas(0),
336 fMesonInvMassWindow(NULL),
341 fEventPlaneAngle(-100),
344 fMesonInvMassNBins(0),
346 fNGammaCandidates(0),
357 fMoveParticleAccordingToVertex(kTRUE),
358 fDoLightOutput(kFALSE),
359 fIsFromDesiredHeader(kTRUE),
360 fIsOverlappingWithOtherHeader(kFALSE),
362 fSetPlotHistsExtQA(kFALSE),
363 fDoConvGammaShowerShapeTree(kFALSE),
364 fEnableSortForClusMC(kFALSE),
365 fDoPrimaryTrackMatching(kFALSE),
366 fDoInvMassShowerShapeTree(kFALSE),
367 fAllowOverlapHeaders(kTRUE),
368 fEnableClusterCutsForTrigger(kFALSE)
371 DefineOutput(1, TList::Class());
404 const Int_t nDim = 4;
405 Int_t nBins[nDim] = {800,300,7,4};
423 TString cutstringConvGamma =
"";
424 TString cutstringCaloGamma =
"";
430 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
431 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
432 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
438 if( collisionSystem == 1 || collisionSystem == 2 ||
439 collisionSystem == 5 || collisionSystem == 8 ||
440 collisionSystem == 9){
441 centMin = centMin*10;
442 centMax = centMax*10;
443 if(centMax ==0 && centMax!=centMin) centMax=100;
444 }
else if(collisionSystem == 3 || collisionSystem == 6){
447 }
else if(collisionSystem == 4 || collisionSystem == 7){
448 centMin = ((centMin*5)+45);
449 centMax = ((centMax*5)+45);
454 fBackList[iCut]->SetName(Form(
"%s Back histograms",fullCutString.Data()));
462 fMotherList[iCut]->SetName(Form(
"%s Mother histograms",fullCutString.Data()));
466 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
497 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
501 }
else if (
fIsMC == 3){
581 if (fMesonType < 0 || fMesonType > 2){
582 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
610 Int_t nBinsQAPt = 170;
612 Int_t nBinsClusterPt = 500;
622 for(
Int_t i=0; i<nBinsQAPt+1;i++){
623 if(i<60) arrQAPtBinning[i] = 0.05*i;
624 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
625 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
626 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
627 else arrQAPtBinning[i] = maxQAPt;
632 for(
Int_t i=0; i<nBinsPt+1;i++){
633 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
635 nBinsClusterPt = 800;
638 for(
Int_t i=0; i<nBinsPt+1;i++){
639 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
649 for(
Int_t i=0; i<nBinsPt+1;i++){
650 if (i < 1) arrPtBinning[i] = 0.3*i;
651 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
652 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
653 else if(i<165) arrPtBinning[i] = 10.+0.25*(i-125);
654 else if(i<205) arrPtBinning[i] = 20.+1.0*(i-165);
655 else arrPtBinning[i] = maxPt;
659 for(
Int_t i=0; i<nBinsQAPt+1;i++){
660 if(i<60) arrQAPtBinning[i] = 0.05*i;
661 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
662 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
663 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
664 else arrQAPtBinning[i] = maxQAPt;
666 nBinsClusterPt = 301;
669 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
670 if (i < 1) arrClusPtBinning[i] = 0.3*i;
671 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
672 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
673 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
674 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
675 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
676 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
677 else arrClusPtBinning[i] = maxClusterPt;
687 for(
Int_t i=0; i<nBinsPt+1;i++){
688 if (i < 1) arrPtBinning[i] = 0.3*i;
689 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
690 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
691 else if(i<185) arrPtBinning[i] = 10.+0.25*(i-125);
692 else if(i<235) arrPtBinning[i] = 25.+0.5*(i-185);
693 else if(i<285) arrPtBinning[i] = 50.+1.0*(i-235);
694 else arrPtBinning[i] = maxPt;
698 for(
Int_t i=0; i<nBinsQAPt+1;i++){
699 if(i<60) arrQAPtBinning[i] = 0.05*i;
700 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
701 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
702 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
703 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
704 else arrQAPtBinning[i] = maxQAPt;
706 nBinsClusterPt = 301;
709 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
710 if (i < 1) arrClusPtBinning[i] = 0.3*i;
711 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
712 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
713 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
714 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
715 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
716 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
717 else arrClusPtBinning[i] = maxClusterPt;
723 for(
Int_t i=0; i<nBinsPt+1;i++){
724 if (i < 1) arrPtBinning[i] = 0.3*i;
725 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
726 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
727 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
728 else arrPtBinning[i] = maxPt;
732 for(
Int_t i=0; i<nBinsQAPt+1;i++){
733 if(i<60) arrQAPtBinning[i] = 0.1*i;
734 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
735 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
736 else arrQAPtBinning[i] = maxQAPt;
738 nBinsClusterPt = 148;
741 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
742 if (i < 1) arrClusPtBinning[i] = 0.3*i;
743 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
744 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
745 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
746 else arrClusPtBinning[i] = maxClusterPt;
752 for(
Int_t i=0; i<nBinsPt+1;i++){
753 if (i < 1) arrPtBinning[i] = 0.3*i;
754 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
755 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
756 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
757 else arrPtBinning[i] = maxPt;
761 for(
Int_t i=0; i<nBinsQAPt+1;i++){
762 if(i<60) arrQAPtBinning[i] = 0.1*i;
763 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
764 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
765 else arrQAPtBinning[i] = maxQAPt;
767 nBinsClusterPt = 148;
770 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
771 if (i < 1) arrClusPtBinning[i] = 0.3*i;
772 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
773 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
774 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
775 else arrClusPtBinning[i] = maxClusterPt;
779 for(
Int_t i=0; i<nBinsPt+1;i++){
780 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
782 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
783 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
785 for(
Int_t i=0; i<nBinsQAPt+1;i++){
786 if(i<60) arrQAPtBinning[i] = 0.05*i;
787 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
788 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
789 else arrQAPtBinning[i] = maxQAPt;
795 TString cutstringConvGamma =
"";
796 TString cutstringCaloGamma =
"";
802 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
803 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
804 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
807 fCutFolder[iCut]->SetName(Form(
"Cut Number %s",fullCutString.Data()));
808 fCutFolder[iCut]->SetOwner(kTRUE);
811 fESDList[iCut]->SetName(Form(
"%s ESD histograms",fullCutString.Data()));
813 fCutFolder[iCut]->Add(
fESDList[iCut]);
815 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
817 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
818 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
820 TString TriggerNames =
"Not Trigger: ";
822 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
827 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
831 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
832 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
833 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
834 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
835 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
844 TString TriggerNames =
"Not Trigger: ";
872 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 4000, 0, 4000);
874 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 400, 0, 400);
876 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 200, 0, 200);
879 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
882 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX", 100, -5, 5);
884 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY", 100, -5, 5);
890 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 100, 0, 100);
892 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 50, 0, 50);
894 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 50, 0, 50);
899 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 100, 0, 100);
901 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 50, 0, 50);
903 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 50, 0, 50);
912 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 30000, 0, 30000);
914 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 2500, 0, 2500);
916 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 1500, 0, 1500);
920 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt; p_{T,conv}(GeV/c)", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
924 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt; p_{T,clus} (GeV/c)", nBinsClusterPt, arrClusPtBinning);
926 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E; E_{clus} (GeV)", nBinsClusterPt, arrClusPtBinning);
929 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt; p_{T,clus} (GeV/c), selected header w/ overlap",
930 nBinsClusterPt, arrClusPtBinning);
933 nBinsClusterPt, arrClusPtBinning);
936 nBinsClusterPt, arrClusPtBinning);
943 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
971 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt; M_{inv} (GeV/c^{2}); p_{T,pair} (GeV/c)",
980 fHistoMotherMatchedInvMassPt[iCut] =
new TH2F(
"ESD_MotherMatched_InvMass_Pt",
"ESD_MotherMatched_InvMass_Pt; M_{inv} (GeV/c^{2}) matched conv e^{+/-}to cluster; p_{T,pair} (GeV/c)",
986 fHistoMotherBackInvMassPt[iCut] =
new TH2F(
"ESD_Background_InvMass_Pt",
"ESD_Background_InvMass_Pt; M_{inv, mxed}(GeV/c^{2}); p_{T,BG pair} (GeV/c)",
997 fHistoMotherMesonPtY[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_Y",
"ESD_MotherMeson_Pt_Y; p_{T, meson cand} (GeV/c); y_{meson cand}",
998 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1000 fHistoMotherMesonPtAlpha[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_Alpha",
"ESD_MotherMeson_Pt_Alpha; p_{T, meson cand} (GeV/c); #alpha_{meson cand}",
1001 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1003 fHistoMotherMesonPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_OpenAngle",
"ESD_MotherMeson_Pt_OpenAngle; p_{T, meson cand} (GeV/c); #theta_{meson cand}",
1004 nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1007 600, 0, 2*TMath::Pi(), 200, -1, 1);
1103 TString cutstringConvGamma =
"";
1104 TString cutstringCaloGamma =
"";
1110 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
1111 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
1112 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
1115 fMCList[iCut]->SetName(Form(
"%s MC histograms",fullCutString.Data()));
1116 fMCList[iCut]->SetOwner(kTRUE);
1123 fHistoMCMesonPt[iCut] =
new TH1F(
"MC_Meson_Pt",
"MC_Meson_Pt; p_{T} (GeV/c)",
1124 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1128 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1132 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1136 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1143 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1146 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1151 nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1160 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1164 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1173 fTrueList[iCut]->SetName(Form(
"%s True histograms",fullCutString.Data()));
1179 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt; p_{T,conv} (GeV/c); counts",
1180 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1183 800, 0, 200, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1187 fHistoTruePrimaryConvGammaPt[iCut] =
new TH1F(
"ESD_TruePrimaryConvGamma_Pt",
"ESD_TruePrimaryConvGamma_Pt;p_{T,conv} (GeV/c); counts", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1191 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1193 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1195 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1197 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1200 nBinsClusterPt, arrClusPtBinning, 2, 0, 2);
1204 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt; p_{T,clus} (GeV/c); counts",
1205 nBinsClusterPt, arrClusPtBinning);
1208 100, -0.5, 99.5, nBinsClusterPt, arrClusPtBinning);
1243 fHistoMultipleCountTrueMeson[iCut] =
new TH1F(
"ESD_TrueMultipleCountMeson",
"ESD_TrueMultipleCountMeson;# number of multiple counts;#", 10, 1, 11);
1253 "ESD_TruePrimaryMesonW0Weights_InvMass_Pt;M_{inv}(GeV/c^{2});p_{T}(GeV/c)",
1258 "ESD_TruePrimaryMesonWeights_InvMass_Pt;M_{inv}(GeV/c^{2});p_{T}(GeV/c)",
1278 "ESD_TrueMesonCaloPhoton_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma #gamma;p_{T}(GeV/c) ",
1282 "ESD_TrueMesonCaloConvertedPhoton_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv};p_{T}(GeV/c)",
1286 "ESD_TrueMesonCaloElectron_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma e^{#pm}; ; p_{T}(GeV/c)",
1290 "ESD_TrueMesonCaloMergedCluster_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma merged cluster; p_{T}(GeV/c)",
1294 "ESD_TrueMesonCaloMergedClusterPartConv_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma merged cluster, part conv; p_{T}(GeV/c)",
1300 "ESD_TrueMesonCaloConvertedPhotonMatched_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv,matched};p_{T}(GeV/c)",
1304 600, 0, 2*TMath::Pi(), 200, -1, 1);
1309 "ESD_TrueMesonCaloMixedPhotonConvertedPhoton_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv,matched};p_{T}(GeV/c)",
1314 "ESD_TruePrimaryMeson_ResolPt_MCPt; p_{T,MC}(GeV/c); (p_{T,rec}-p_{T,MC})/p_{T,MC}()",
1315 500, 0.03, 25, 1000, -1., 1.);
1322 "ESD_TrueBckGG_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma no signal; #pair p_{T}(GeV/c)",
1326 "ESD_TrueBckFullMesonContained_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma, calo gamma with full pi0; #pair p_{T}(GeV/c)",
1330 "ESD_TrueBckAsymEClus_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma, calo gamma >70% of pi0 energy; #pair p_{T}(GeV/c)",
1334 "ESD_TrueBckCont_InvMass_Pt; M_{inv} (GeV/c^{2}) contamination; #pair p_{T}(GeV/c)",
1339 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1342 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1345 nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1387 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1450 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1470 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1472 if(eventQuality == 2 || eventQuality == 3){
1498 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1510 Bool_t isRunningEMCALrelAna = kFALSE;
1521 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1542 Bool_t triggered = kTRUE;
1544 if(eventNotAccepted!= 0){
1548 if (eventNotAccepted==3 &&
fIsMC > 0){
1555 if(eventQuality != 0){
1562 if (triggered==kTRUE){
1585 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1594 if (nameBin.CompareTo(
"")== 0){
1596 ->GetAcceptedHeader())->At(i))->GetString();
1597 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
1610 if (triggered==kFALSE)
continue;
1695 TClonesArray * arrClustersProcess = NULL;
1700 if(!arrClustersProcess)
1701 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskHeavyNeutralMesonToGG! Check the correction framework settings!",
fCorrTaskSetting.Data()));
1702 nclus = arrClustersProcess->GetEntries();
1707 if(nclus == 0)
return;
1717 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1720 for(
Int_t i = 0; i < nclus; i++){
1721 AliVCluster* clus = NULL;
1723 if(arrClustersProcess)
1724 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
1726 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
1727 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1728 if(arrClustersProcess)
1729 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
1731 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
1734 if (!clus)
continue;
1741 TLorentzVector clusterVector;
1742 clus->GetMomentum(clusterVector,vertex);
1744 TLorentzVector* tmpvec =
new TLorentzVector();
1745 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
1749 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
1759 Int_t* mclabelsCluster = clus->GetLabels();
1762 if (clus->GetNLabels()>0){
1763 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
1779 if (clus->GetNLabels()>1){
1780 Int_t* mclabelsCluster = clus->GetLabels();
1781 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
1807 delete PhotonCandidate;
1818 TParticle *Photon = NULL;
1819 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1833 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1834 Double_t mcProdVtxX = primVtxMC->GetX();
1835 Double_t mcProdVtxY = primVtxMC->GetY();
1836 Double_t mcProdVtxZ = primVtxMC->GetZ();
1873 Int_t motherLab = Photon->GetMother(0);
1874 if (motherLab > -1){
1881 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
1882 if (grandMotherLab > -1){
1898 AliAODMCParticle *Photon = NULL;
1899 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
1900 if (AODMCTrackArray){
1901 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1905 AliInfo(
"AODMCTrackArray could not be loaded");
1917 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1918 Double_t mcProdVtxX = primVtxMC->GetX();
1919 Double_t mcProdVtxY = primVtxMC->GetY();
1920 Double_t mcProdVtxZ = primVtxMC->GetZ();
1925 if (Photon->GetMother()> -1){
1926 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
1950 Int_t motherLab = Photon->GetMother();
1951 if (motherLab > -1){
1958 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
1959 if (grandMotherLab > -1){
1981 if(!PhotonCandidate)
continue;
2009 GammaCandidatesStepOne->Add(PhotonCandidate);
2012 GammaCandidatesStepTwo->Add(PhotonCandidate);
2017 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
2019 if(!PhotonCandidate)
continue;
2038 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
2043 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
2045 if(!PhotonCandidate)
continue;
2066 delete GammaCandidatesStepOne;
2067 GammaCandidatesStepOne = 0x0;
2068 delete GammaCandidatesStepTwo;
2069 GammaCandidatesStepTwo = 0x0;
2076 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2077 Double_t mcProdVtxX = primVtxMC->GetX();
2078 Double_t mcProdVtxY = primVtxMC->GetY();
2079 Double_t mcProdVtxZ = primVtxMC->GetZ();
2081 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2082 if (AODMCTrackArray == NULL)
return;
2083 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
2084 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
2086 if(posDaughter == NULL || negDaughter == NULL)
return;
2087 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2089 if(posDaughter->GetMother() != negDaughter->GetMother()){
2091 }
else if(posDaughter->GetMother() == -1){
2095 if(pdgCode[0]!=11 || pdgCode[1]!=11){
2099 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
2103 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2104 if(Photon->GetPdgCode() != 22){
2108 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
2139 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2140 Double_t mcProdVtxX = primVtxMC->GetX();
2141 Double_t mcProdVtxY = primVtxMC->GetY();
2142 Double_t mcProdVtxZ = primVtxMC->GetZ();
2148 if(posDaughter == NULL || negDaughter == NULL)
return;
2149 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2150 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
2153 else if(posDaughter->GetMother(0) == -1){
2157 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
2159 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
2163 if(Photon->GetPdgCode() != 22){
2167 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
2193 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2194 Double_t mcProdVtxX = primVtxMC->GetX();
2195 Double_t mcProdVtxY = primVtxMC->GetY();
2196 Double_t mcProdVtxZ = primVtxMC->GetZ();
2198 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2199 if (AODMCTrackArray == NULL)
return;
2202 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2204 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2205 if (!particle)
continue;
2210 Int_t isMCFromMBHeader = -1;
2222 if (particle->E() != TMath::Abs(particle->Pz())){
2223 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2225 if( !(ratio <= 0) ){
2231 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2232 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2235 if (particle->Pt()>0.005){
2241 if(particle->GetPdgCode() ==
fMesonPDG){
2242 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
2293 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2294 Double_t mcProdVtxX = primVtxMC->GetX();
2295 Double_t mcProdVtxY = primVtxMC->GetY();
2296 Double_t mcProdVtxZ = primVtxMC->GetZ();
2300 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2303 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2304 if (!particle)
continue;
2306 Int_t isMCFromMBHeader = -1;
2319 if (particle->Energy() != TMath::Abs(particle->Pz())){
2320 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2322 if( !(ratio <= 0) ){
2328 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
2329 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
2333 if (particle->Pt()>0.005){
2339 if(particle->GetPdgCode() ==
fMesonPDG){
2340 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
2353 if( kDaughter0IsPrim && kDaughter1IsPrim ){
2397 TClonesArray * arrClustersMesonCand = NULL;
2399 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
2405 if (gamma0==NULL)
continue;
2406 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
2409 if (gamma1==NULL)
continue;
2416 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2435 if (gamma0==NULL)
continue;
2440 if (gamma1==NULL)
continue;
2443 AliVCluster* cluster = NULL;
2445 if(arrClustersMesonCand)
2446 cluster =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2449 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2450 if(arrClustersMesonCand)
2451 cluster =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2457 if(arrClustersMesonCand)
delete cluster;
2461 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2481 if (gamma0==NULL)
continue;
2482 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
2484 if (gamma1==NULL)
continue;
2487 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2507 TClonesArray * arrClustersMesonCand = NULL;
2509 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
2515 if (gamma0==NULL)
continue;
2516 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
2519 if (gamma1==NULL)
continue;
2527 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2586 if (gamma0==NULL)
continue;
2591 if (gamma1==NULL)
continue;
2594 AliVCluster* cluster = NULL;
2596 if(arrClustersMesonCand)
2597 cluster =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2600 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2601 if(arrClustersMesonCand)
2602 cluster =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2608 if(arrClustersMesonCand)
delete cluster;
2612 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2677 if (gamma0==NULL)
continue;
2678 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
2680 if (gamma1==NULL)
continue;
2683 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2739 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2740 Double_t mcProdVtxX = primVtxMC->GetX();
2741 Double_t mcProdVtxY = primVtxMC->GetY();
2742 Double_t mcProdVtxZ = primVtxMC->GetZ();
2746 Bool_t isTrueMeson = kFALSE;
2747 Int_t gamma0MCLabel = -1;
2748 Int_t gamma0MotherLabel = -1;
2751 if(gamma0MCLabel>-1){
2752 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2753 gamma0MotherLabel=gammaMC0->GetFirstMother();
2756 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2759 Int_t gamma1MotherLabel = -1;
2762 TParticle * gammaMC1 = 0x0;
2763 if(gamma1MCLabel != -1){
2765 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2769 gamma1MotherLabel=gammaMC1->GetMother(0);
2771 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2772 else gamma1MotherLabel=gammaMC1->GetMother(0);
2777 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2778 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
2827 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
2849 }
else if(!isTrueMeson ){
2851 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
2854 ( ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 2858 }
else if( TrueGammaCandidate1->E()/mesonCand->E() > 0.7 ){
2866 if (isTrueMeson && !matched){
2878 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2879 Double_t mcProdVtxX = primVtxMC->GetX();
2880 Double_t mcProdVtxY = primVtxMC->GetY();
2881 Double_t mcProdVtxZ = primVtxMC->GetZ();
2884 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2885 if (AODMCTrackArray == NULL)
return;
2886 Bool_t isTrueMeson = kFALSE;
2888 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
2889 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
2891 Int_t gamma0MCLabel = -1;
2892 Int_t gamma0MotherLabel = -1;
2893 if(!positiveMC||!negativeMC)
2897 gamma0MCLabel = positiveMC->GetMother();
2898 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
2899 gamma0MotherLabel=gammaMC0->GetMother();
2902 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2904 Int_t gamma1MotherLabel = -1;
2907 AliAODMCParticle * gammaMC1 = 0x0;
2908 if(gamma1MCLabel != -1){
2910 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
2914 gamma1MotherLabel=gammaMC1->GetMother();
2917 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
2918 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
2919 }
else gamma1MotherLabel=gammaMC1->GetMother();
2924 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2925 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
2972 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
2989 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
2995 }
else if(!isTrueMeson ) {
2997 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3000 if( (((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 3004 }
else if( TrueGammaCandidate1->E()/mesonCand->E() > 0.7 ){
3012 if (isTrueMeson && !matched){
3024 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3025 Double_t mcProdVtxX = primVtxMC->GetX();
3026 Double_t mcProdVtxY = primVtxMC->GetY();
3027 Double_t mcProdVtxZ = primVtxMC->GetZ();
3029 Bool_t isTrueMeson = kFALSE;
3031 Int_t gamma0MotherLabel = -1;
3033 TParticle * gammaMC0 = 0x0;
3034 if(gamma0MCLabel != -1){
3035 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3039 gamma0MotherLabel=gammaMC0->GetMother(0);
3041 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
3042 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
3044 gamma0MotherLabel=gammaMC0->GetMother(0);
3049 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
3052 Int_t gamma1MotherLabel = -1;
3055 TParticle * gammaMC1 = 0x0;
3056 if(gamma1MCLabel != -1){
3058 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3062 gamma1MotherLabel = gammaMC1->GetMother(0);
3065 if(gammaMC1->GetMother(0) > -1) gamma1MotherLabel =
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
3067 gamma1MotherLabel=gammaMC1->GetMother(0);
3073 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3074 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3124 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3141 }
else if(!isTrueMeson ){
3143 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3146 if( (((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() ==
fMesonPDG 3153 }
else if( (TrueGammaCandidate0->E()/mesonCand->E() > 0.7) || (TrueGammaCandidate1->E()/mesonCand->E() > 0.7) ){
3168 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3169 Double_t mcProdVtxX = primVtxMC->GetX();
3170 Double_t mcProdVtxY = primVtxMC->GetY();
3171 Double_t mcProdVtxZ = primVtxMC->GetZ();
3174 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3175 if (AODMCTrackArray == NULL)
return;
3177 Bool_t isTrueMeson = kFALSE;
3179 Int_t gamma0MotherLabel = -1;
3182 AliAODMCParticle * gammaMC0 = 0x0;
3183 if(gamma0MCLabel != -1){
3185 gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3189 gamma0MotherLabel=gammaMC0->GetMother();
3192 AliAODMCParticle * gammaGrandMotherMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC0->GetMother()));
3193 gamma0MotherLabel=gammaGrandMotherMC0->GetMother();
3194 }
else gamma0MotherLabel=gammaMC0->GetMother();
3200 Int_t gamma1MotherLabel = -1;
3203 AliAODMCParticle *gammaMC1 = 0x0;
3204 if(gamma1MCLabel != -1){
3206 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3210 gamma1MotherLabel=gammaMC1->GetMother();
3213 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
3214 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
3215 }
else gamma1MotherLabel=gammaMC1->GetMother();
3220 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3221 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3270 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3281 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3284 }
else if(!isTrueMeson ) {
3286 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3289 if( (((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() ==
fMesonPDG 3292 (((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 3296 }
else if( (TrueGammaCandidate0->E()/mesonCand->E() > 0.7) || (TrueGammaCandidate1->E()/mesonCand->E() > 0.7) ){
3313 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3314 Double_t mcProdVtxX = primVtxMC->GetX();
3315 Double_t mcProdVtxY = primVtxMC->GetY();
3316 Double_t mcProdVtxZ = primVtxMC->GetZ();
3319 Bool_t isTrueMeson = kFALSE;
3320 Bool_t isTrueMesonDalitz = kFALSE;
3321 Bool_t gamma0DalitzCand = kFALSE;
3322 Bool_t gamma1DalitzCand = kFALSE;
3324 Int_t gamma0MotherLabel = -1;
3325 if(gamma0MCLabel != -1){
3329 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3330 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3331 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3332 if(gammaMC0->GetPdgCode() == 22){
3333 gamma0MotherLabel=gammaMC0->GetFirstMother();
3337 gamma0DalitzCand = kTRUE;
3344 Int_t gamma1MotherLabel = -1;
3345 if(gamma1MCLabel != -1){
3349 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3350 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3351 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3352 if(gammaMC1->GetPdgCode() == 22){
3353 gamma1MotherLabel=gammaMC1->GetFirstMother();
3356 if(gammaMC1->GetPdgCode() ==
fMesonPDG ){
3357 gamma1DalitzCand = kTRUE;
3362 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3363 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3373 if (gamma1DalitzCand || gamma0DalitzCand){
3374 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3375 if (gamma0MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3377 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3378 if (gamma1MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3398 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3411 }
else if(!isTrueMeson ){
3413 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3419 if (!isTrueMesonDalitz && (gamma0DalitzCand || gamma1DalitzCand)){
3432 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3433 Double_t mcProdVtxX = primVtxMC->GetX();
3434 Double_t mcProdVtxY = primVtxMC->GetY();
3435 Double_t mcProdVtxZ = primVtxMC->GetZ();
3438 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3439 Bool_t isTrueMeson = kFALSE;
3440 Bool_t isTrueMesonDalitz = kFALSE;
3441 Bool_t gamma0DalitzCand = kFALSE;
3442 Bool_t gamma1DalitzCand = kFALSE;
3444 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
3445 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
3446 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
3448 Int_t gamma0MCLabel = -1;
3449 Int_t gamma0MotherLabel = -1;
3450 if(!positiveMC||!negativeMC)
3453 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3454 gamma0MCLabel = positiveMC->GetMother();
3457 if(gamma0MCLabel != -1){
3459 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3460 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3461 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3462 if(gammaMC0->GetPdgCode() == 22){
3463 gamma0MotherLabel=gammaMC0->GetMother();
3467 gamma0DalitzCand = kTRUE;
3472 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
3473 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
3475 Int_t gamma1MCLabel = -1;
3476 Int_t gamma1MotherLabel = -1;
3477 if(!positiveMC||!negativeMC)
3480 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3481 gamma1MCLabel = positiveMC->GetMother();
3483 if(gamma1MCLabel != -1){
3485 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3486 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3487 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3488 if(gammaMC1->GetPdgCode() == 22){
3489 gamma1MotherLabel=gammaMC1->GetMother();
3492 if(gammaMC1->GetPdgCode() ==
fMesonPDG ){
3493 gamma1DalitzCand = kTRUE;
3498 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3499 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3509 if (gamma1DalitzCand || gamma0DalitzCand){
3510 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3511 if (gamma0MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3513 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3514 if (gamma1MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3535 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3546 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted);
3549 }
else if(!isTrueMeson ) {
3551 if(!(gamma0MotherLabel>-1 && gamma1MotherLabel>-1)){
3557 if (!isTrueMesonDalitz && (gamma0DalitzCand || gamma1DalitzCand)){
3571 TList* currPhotonList = NULL;
3593 for(
Int_t nEventsInBG=0;nEventsInBG<currBGHandler->
GetNBGEvents();nEventsInBG++){
3600 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3603 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3631 for(
Int_t nEventsInBG=0;nEventsInBG <currBGHandler->
GetNBGEvents();nEventsInBG++){
3633 if(previousEventV0s){
3639 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3642 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3666 delete backgroundCandidate;
3667 backgroundCandidate = 0x0;
3680 TList* currPhotonList = NULL;
3705 for(
Int_t firstGammaIndex=0;firstGammaIndex<currPhotonList->GetEntries();firstGammaIndex++){
3707 if (gamma0==NULL)
continue;
3709 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<currPhotonList->GetEntries();secondGammaIndex++){
3711 if (gamma1 == NULL)
continue;
3734 if(previousEventGammas){
3741 weight*=0.5*(
Double_t(currPhotonList->GetEntries()-1))/
Double_t(previousEventGammas->size());
3743 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3746 for(
UInt_t iPrevious=0;iPrevious<previousEventGammas->size();iPrevious++){
3768 Double_t nRadiansPM = fNDegreesPMBackground*TMath::Pi()/180;
3769 Double_t rotationValue =
fRandom.Rndm()*2*nRadiansPM + TMath::Pi()-nRadiansPM;
3770 gamma->RotateZ(rotationValue);
3775 previousEventEP=previousEventEP+TMath::Pi();
3776 thisEventEP=thisEventEP+TMath::Pi();
3777 Double_t rotationValue= thisEventEP-previousEventEP;
3778 gamma->RotateZ(rotationValue);