29 #include "THnSparse.h" 32 #include "AliAnalysisTask.h" 33 #include "AliAnalysisManager.h" 34 #include "AliESDEvent.h" 35 #include "AliESDInputHandler.h" 36 #include "AliMCEventHandler.h" 37 #include "AliMCEvent.h" 38 #include "AliMCParticle.h" 39 #include "AliCentrality.h" 40 #include "AliESDVZERO.h" 41 #include "AliESDpid.h" 43 #include "AliVParticle.h" 44 #include "AliESDtrack.h" 45 #include "AliESDtrackCuts.h" 46 #include "AliKFVertex.h" 47 #include "AliGenCocktailEventHeader.h" 49 #include "AliAODMCParticle.h" 50 #include "AliAODMCHeader.h" 51 #include "AliEventplane.h" 53 #include "AliAODEvent.h" 54 #include "AliAODInputHandler.h" 55 #include "AliESDEvent.h" 56 #include "AliESDInputHandler.h" 57 #include "AliInputEventHandler.h" 67 fV0ReaderName("V0ReaderV1"),
72 fBGClusHandlerRP(NULL),
81 fOutputContainer(NULL),
83 fGammaCandidates(NULL),
84 fClusterCandidates(NULL),
88 fConversionCuts(NULL),
89 fClusterCutArray(NULL),
90 fCaloPhotonCuts(NULL),
93 fHistoConvGammaPt(NULL),
94 fHistoMotherInvMassPt(NULL),
95 fHistoMotherMatchedInvMassPt(NULL),
96 fSparseMotherInvMassPtZM(NULL),
97 fHistoMotherBackInvMassPt(NULL),
98 fSparseMotherBackInvMassPtZM(NULL),
99 fHistoMotherMesonPtY(NULL),
100 fHistoMotherMesonPtAlpha(NULL),
101 fHistoMotherMesonPtOpenAngle(NULL),
102 fHistoMotherMesonConvPhotonEtaPhi(NULL),
103 fHistoClusGammaPt(NULL),
104 fHistoClusGammaE(NULL),
105 fHistoClusOverlapHeadersGammaPt(NULL),
106 fHistoClusAllHeadersGammaPt(NULL),
107 fHistoClusRejectedHeadersGammaPt(NULL),
108 fHistoMCHeaders(NULL),
109 fHistoMCMesonPt(NULL),
110 fHistoMCMesonWOWeightPt(NULL),
111 fHistoMCMesonWOEvtWeightPt(NULL),
112 fHistoMCMesonInAccPt(NULL),
113 fHistoMCMesonWOWeightInAccPt(NULL),
114 fHistoMCMesonWOEvtWeightInAccPt(NULL),
115 fHistoMCMesonPtY(NULL),
116 fHistoMCMesonPtAlpha(NULL),
117 fHistoMCMesonPtJetPt(NULL),
118 fHistoTrueMesonInvMassPt(NULL),
119 fHistoTrueMesonMatchedInvMassPt(NULL),
120 fHistoTrueMesonCaloPhotonInvMassPt(NULL),
121 fHistoTrueMesonCaloConvertedPhotonInvMassPt(NULL),
122 fHistoTrueMesonCaloMixedPhotonConvPhotonInvMassPt(NULL),
123 fHistoTrueMesonCaloConvertedPhotonMatchedInvMassPt(NULL),
124 fHistoTrueMesonCaloElectronInvMassPt(NULL),
125 fHistoTrueMesonCaloMergedClusterInvMassPt(NULL),
126 fHistoTrueMesonCaloMergedClusterPartConvInvMassPt(NULL),
127 fHistoTruePrimaryMesonInvMassPt(NULL),
128 fHistoTruePrimaryMesonW0WeightingInvMassPt(NULL),
129 fProfileTruePrimaryMesonWeightsInvMassPt(NULL),
130 fHistoTruePrimaryMesonMCPtResolPt(NULL),
131 fHistoTrueMotherMesonConvPhotonEtaPhi(NULL),
132 fHistoTrueBckGGInvMassPt(NULL),
133 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
134 fHistoTrueBckAsymEClustersInvMassPt(NULL),
135 fHistoTrueBckContInvMassPt(NULL),
136 fHistoTrueMesonPtY(NULL),
137 fHistoTrueMesonPtAlpha(NULL),
138 fHistoTrueMesonPtOpenAngle(NULL),
139 fHistoTrueConvGammaPt(NULL),
140 fHistoTruePrimaryConvGammaPt(NULL),
141 fHistoTrueClusGammaPt(NULL),
142 fHistoTrueClusConvGammaPt(NULL),
143 fHistoTrueClusConvGammaFullyPt(NULL),
144 fHistoTrueNLabelsInClusPt(NULL),
145 fHistoTruePrimaryClusGammaPt(NULL),
146 fHistoTruePrimaryClusConvGammaPt(NULL),
147 fVectorRecTrueMesons(0),
148 fHistoDoubleCountTrueMesonInvMassPt(NULL),
149 fHistoDoubleCountTrueConvGammaRPt(NULL),
150 fHistoDoubleCountTrueClusterGammaPt(NULL),
151 fVectorDoubleCountTrueMesons(0),
152 fVectorDoubleCountTrueConvGammas(0),
153 fVectorDoubleCountTrueClusterGammas(0),
154 fHistoMultipleCountTrueMeson(NULL),
155 fHistoMultipleCountTrueConvGamma(NULL),
156 fHistoMultipleCountTrueClusterGamma(NULL),
157 fMapMultipleCountTrueMesons(),
158 fMapMultipleCountTrueConvGammas(),
159 fMapMultipleCountTrueClusterGammas(),
161 fHistoNEventsWOWeight(NULL),
162 fHistoNGoodESDTracks(NULL),
166 fHistoNGammaConvCandidates(NULL),
167 fHistoNGammaCaloCandidates(NULL),
168 fHistoSPDClusterTrackletBackground(NULL),
169 fHistoNV0Tracks(NULL),
170 fProfileEtaShift(NULL),
171 fProfileJetJetXSection(NULL),
172 fHistoJetJetNTrials(NULL),
173 fEventPlaneAngle(-100),
175 fNGammaCandidates(0),
186 fMoveParticleAccordingToVertex(kTRUE),
188 fDoLightOutput(kFALSE),
194 fMesonInvMassNBins(0),
195 fMesonInvMassWindow(NULL),
199 fIsFromDesiredHeader(kTRUE),
200 fIsOverlappingWithOtherHeader(kFALSE),
203 fSetPlotHistsExtQA(kFALSE),
205 fDoConvGammaShowerShapeTree(kFALSE),
206 fEnableSortForClusMC(kFALSE),
207 fDoPrimaryTrackMatching(kFALSE),
208 fDoInvMassShowerShapeTree(kFALSE),
210 fFileNameBroken(NULL),
211 fAllowOverlapHeaders(kTRUE)
220 fV0ReaderName(
"V0ReaderV1"),
221 fCorrTaskSetting(
""),
224 fBGClusHandler(NULL),
225 fBGClusHandlerRP(NULL),
236 fGammaCandidates(NULL),
237 fClusterCandidates(NULL),
238 fEventCutArray(NULL),
241 fConversionCuts(NULL),
242 fClusterCutArray(NULL),
243 fCaloPhotonCuts(NULL),
244 fMesonCutArray(NULL),
246 fHistoConvGammaPt(NULL),
247 fHistoMotherInvMassPt(NULL),
248 fHistoMotherMatchedInvMassPt(NULL),
249 fSparseMotherInvMassPtZM(NULL),
250 fHistoMotherBackInvMassPt(NULL),
251 fSparseMotherBackInvMassPtZM(NULL),
252 fHistoMotherMesonPtY(NULL),
253 fHistoMotherMesonPtAlpha(NULL),
254 fHistoMotherMesonPtOpenAngle(NULL),
255 fHistoMotherMesonConvPhotonEtaPhi(NULL),
256 fHistoClusGammaPt(NULL),
257 fHistoClusGammaE(NULL),
258 fHistoClusOverlapHeadersGammaPt(NULL),
259 fHistoClusAllHeadersGammaPt(NULL),
260 fHistoClusRejectedHeadersGammaPt(NULL),
261 fHistoMCHeaders(NULL),
262 fHistoMCMesonPt(NULL),
263 fHistoMCMesonWOWeightPt(NULL),
264 fHistoMCMesonWOEvtWeightPt(NULL),
265 fHistoMCMesonInAccPt(NULL),
266 fHistoMCMesonWOWeightInAccPt(NULL),
267 fHistoMCMesonWOEvtWeightInAccPt(NULL),
268 fHistoMCMesonPtY(NULL),
269 fHistoMCMesonPtAlpha(NULL),
270 fHistoMCMesonPtJetPt(NULL),
271 fHistoTrueMesonInvMassPt(NULL),
272 fHistoTrueMesonMatchedInvMassPt(NULL),
273 fHistoTrueMesonCaloPhotonInvMassPt(NULL),
274 fHistoTrueMesonCaloConvertedPhotonInvMassPt(NULL),
275 fHistoTrueMesonCaloMixedPhotonConvPhotonInvMassPt(NULL),
276 fHistoTrueMesonCaloConvertedPhotonMatchedInvMassPt(NULL),
277 fHistoTrueMesonCaloElectronInvMassPt(NULL),
278 fHistoTrueMesonCaloMergedClusterInvMassPt(NULL),
279 fHistoTrueMesonCaloMergedClusterPartConvInvMassPt(NULL),
280 fHistoTruePrimaryMesonInvMassPt(NULL),
281 fHistoTruePrimaryMesonW0WeightingInvMassPt(NULL),
282 fProfileTruePrimaryMesonWeightsInvMassPt(NULL),
283 fHistoTruePrimaryMesonMCPtResolPt(NULL),
284 fHistoTrueMotherMesonConvPhotonEtaPhi(NULL),
285 fHistoTrueBckGGInvMassPt(NULL),
286 fHistoTrueBckFullMesonContainedInOneClusterInvMassPt(NULL),
287 fHistoTrueBckAsymEClustersInvMassPt(NULL),
288 fHistoTrueBckContInvMassPt(NULL),
289 fHistoTrueMesonPtY(NULL),
290 fHistoTrueMesonPtAlpha(NULL),
291 fHistoTrueMesonPtOpenAngle(NULL),
292 fHistoTrueConvGammaPt(NULL),
293 fHistoTruePrimaryConvGammaPt(NULL),
294 fHistoTrueClusGammaPt(NULL),
295 fHistoTrueClusConvGammaPt(NULL),
296 fHistoTrueClusConvGammaFullyPt(NULL),
297 fHistoTrueNLabelsInClusPt(NULL),
298 fHistoTruePrimaryClusGammaPt(NULL),
299 fHistoTruePrimaryClusConvGammaPt(NULL),
300 fVectorRecTrueMesons(0),
301 fHistoDoubleCountTrueMesonInvMassPt(NULL),
302 fHistoDoubleCountTrueConvGammaRPt(NULL),
303 fHistoDoubleCountTrueClusterGammaPt(NULL),
304 fVectorDoubleCountTrueMesons(0),
305 fVectorDoubleCountTrueConvGammas(0),
306 fVectorDoubleCountTrueClusterGammas(0),
307 fHistoMultipleCountTrueMeson(NULL),
308 fHistoMultipleCountTrueConvGamma(NULL),
309 fHistoMultipleCountTrueClusterGamma(NULL),
310 fMapMultipleCountTrueMesons(),
311 fMapMultipleCountTrueConvGammas(),
312 fMapMultipleCountTrueClusterGammas(),
314 fHistoNEventsWOWeight(NULL),
315 fHistoNGoodESDTracks(NULL),
319 fHistoNGammaConvCandidates(NULL),
320 fHistoNGammaCaloCandidates(NULL),
321 fHistoSPDClusterTrackletBackground(NULL),
322 fHistoNV0Tracks(NULL),
323 fProfileEtaShift(NULL),
324 fProfileJetJetXSection(NULL),
325 fHistoJetJetNTrials(NULL),
326 fEventPlaneAngle(-100),
328 fNGammaCandidates(0),
339 fMoveParticleAccordingToVertex(kTRUE),
341 fDoLightOutput(kFALSE),
347 fMesonInvMassNBins(0),
348 fMesonInvMassWindow(NULL),
352 fIsFromDesiredHeader(kTRUE),
353 fIsOverlappingWithOtherHeader(kFALSE),
356 fSetPlotHistsExtQA(kFALSE),
358 fDoConvGammaShowerShapeTree(kFALSE),
359 fEnableSortForClusMC(kFALSE),
360 fDoPrimaryTrackMatching(kFALSE),
361 fDoInvMassShowerShapeTree(kFALSE),
363 fFileNameBroken(NULL),
364 fAllowOverlapHeaders(kTRUE)
367 DefineOutput(1, TList::Class());
400 const Int_t nDim = 4;
401 Int_t nBins[nDim] = {800,300,7,4};
419 TString cutstringConvGamma =
"";
420 TString cutstringCaloGamma =
"";
426 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
427 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
428 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
434 if( collisionSystem == 1 || collisionSystem == 2 ||
435 collisionSystem == 5 || collisionSystem == 8 ||
436 collisionSystem == 9){
437 centMin = centMin*10;
438 centMax = centMax*10;
439 if(centMax ==0 && centMax!=centMin) centMax=100;
440 }
else if(collisionSystem == 3 || collisionSystem == 6){
443 }
else if(collisionSystem == 4 || collisionSystem == 7){
444 centMin = ((centMin*5)+45);
445 centMax = ((centMax*5)+45);
450 fBackList[iCut]->SetName(Form(
"%s Back histograms",fullCutString.Data()));
458 fMotherList[iCut]->SetName(Form(
"%s Mother histograms",fullCutString.Data()));
462 fSparseMotherInvMassPtZM[iCut] =
new THnSparseF(
"Back_Mother_InvMass_Pt_z_m",
"Back_Mother_InvMass_Pt_z_m",nDim,nBins,xMin,xMax);
493 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
497 }
else if (
fIsMC == 3){
572 if (fMesonType < 0 || fMesonType > 2){
573 if(!
fV0Reader){printf(
"Error: No V0 Reader");
return;}
601 Int_t nBinsQAPt = 170;
603 Int_t nBinsClusterPt = 500;
613 for(
Int_t i=0; i<nBinsQAPt+1;i++){
614 if(i<60) arrQAPtBinning[i] = 0.05*i;
615 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
616 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
617 else if(i<190) arrQAPtBinning[i] = 20.+1.0*(i-170);
618 else arrQAPtBinning[i] = maxQAPt;
623 for(
Int_t i=0; i<nBinsPt+1;i++){
624 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
626 nBinsClusterPt = 800;
629 for(
Int_t i=0; i<nBinsPt+1;i++){
630 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
640 for(
Int_t i=0; i<nBinsPt+1;i++){
641 if (i < 1) arrPtBinning[i] = 0.3*i;
642 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
643 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
644 else if(i<165) arrPtBinning[i] = 10.+0.25*(i-125);
645 else if(i<205) arrPtBinning[i] = 20.+1.0*(i-165);
646 else arrPtBinning[i] = maxPt;
650 for(
Int_t i=0; i<nBinsQAPt+1;i++){
651 if(i<60) arrQAPtBinning[i] = 0.05*i;
652 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
653 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
654 else if(i<210) arrQAPtBinning[i] = 20.+1.0*(i-170);
655 else arrQAPtBinning[i] = maxQAPt;
657 nBinsClusterPt = 301;
660 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
661 if (i < 1) arrClusPtBinning[i] = 0.3*i;
662 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
663 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
664 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
665 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
666 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
667 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
668 else arrClusPtBinning[i] = maxClusterPt;
678 for(
Int_t i=0; i<nBinsPt+1;i++){
679 if (i < 1) arrPtBinning[i] = 0.3*i;
680 else if(i<55) arrPtBinning[i] = 0.3+0.05*(i-1);
681 else if(i<125) arrPtBinning[i] = 3.+0.1*(i-55);
682 else if(i<185) arrPtBinning[i] = 10.+0.25*(i-125);
683 else if(i<235) arrPtBinning[i] = 25.+0.5*(i-185);
684 else if(i<285) arrPtBinning[i] = 50.+1.0*(i-235);
685 else arrPtBinning[i] = maxPt;
689 for(
Int_t i=0; i<nBinsQAPt+1;i++){
690 if(i<60) arrQAPtBinning[i] = 0.05*i;
691 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
692 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
693 else if(i<210) arrQAPtBinning[i] = 20.+0.5*(i-170);
694 else if(i<270) arrQAPtBinning[i] = 40.+1.0*(i-210);
695 else arrQAPtBinning[i] = maxQAPt;
697 nBinsClusterPt = 301;
700 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
701 if (i < 1) arrClusPtBinning[i] = 0.3*i;
702 else if(i<55) arrClusPtBinning[i] = 0.3+0.05*(i-1);
703 else if(i<125) arrClusPtBinning[i] = 3.+0.1*(i-55);
704 else if(i<155) arrClusPtBinning[i] = 10.+0.2*(i-125);
705 else if(i<211) arrClusPtBinning[i] = 16.+0.25*(i-155);
706 else if(i<251) arrClusPtBinning[i] = 30.+0.5*(i-211);
707 else if(i<301) arrClusPtBinning[i] = 50.+1.0*(i-251);
708 else arrClusPtBinning[i] = maxClusterPt;
714 for(
Int_t i=0; i<nBinsPt+1;i++){
715 if (i < 1) arrPtBinning[i] = 0.3*i;
716 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
717 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
718 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
719 else arrPtBinning[i] = maxPt;
723 for(
Int_t i=0; i<nBinsQAPt+1;i++){
724 if(i<60) arrQAPtBinning[i] = 0.1*i;
725 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
726 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
727 else arrQAPtBinning[i] = maxQAPt;
729 nBinsClusterPt = 148;
732 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
733 if (i < 1) arrClusPtBinning[i] = 0.3*i;
734 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
735 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
736 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
737 else arrClusPtBinning[i] = maxClusterPt;
743 for(
Int_t i=0; i<nBinsPt+1;i++){
744 if (i < 1) arrPtBinning[i] = 0.3*i;
745 else if(i<58) arrPtBinning[i] = 0.3+0.1*(i-1);
746 else if(i<82) arrPtBinning[i] = 6.+0.25*(i-58);
747 else if(i<90) arrPtBinning[i] = 12.+1.0*(i-82);
748 else arrPtBinning[i] = maxPt;
752 for(
Int_t i=0; i<nBinsQAPt+1;i++){
753 if(i<60) arrQAPtBinning[i] = 0.1*i;
754 else if(i<84) arrQAPtBinning[i] = 6.+0.25*(i-60);
755 else if(i<92) arrQAPtBinning[i] = 12.+1.0*(i-84);
756 else arrQAPtBinning[i] = maxQAPt;
758 nBinsClusterPt = 148;
761 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
762 if (i < 1) arrClusPtBinning[i] = 0.3*i;
763 else if(i<98) arrClusPtBinning[i] = 0.3+0.1*(i-1);
764 else if(i<123) arrClusPtBinning[i] = 10.+0.2*(i-98);
765 else if(i<148) arrClusPtBinning[i] = 15.+1.0*(i-123);
766 else arrClusPtBinning[i] = maxClusterPt;
770 for(
Int_t i=0; i<nBinsPt+1;i++){
771 arrPtBinning[i] = ((maxPt-minPt)/nBinsPt)*i;
773 for(
Int_t i=0; i<nBinsClusterPt+1;i++){
774 arrClusPtBinning[i] = ((maxClusterPt-minClusterPt)/nBinsClusterPt)*i;
776 for(
Int_t i=0; i<nBinsQAPt+1;i++){
777 if(i<60) arrQAPtBinning[i] = 0.05*i;
778 else if(i<130) arrQAPtBinning[i] = 3.+0.1*(i-60);
779 else if(i<170) arrQAPtBinning[i] = 10.+0.25*(i-130);
780 else arrQAPtBinning[i] = maxQAPt;
786 TString cutstringConvGamma =
"";
787 TString cutstringCaloGamma =
"";
793 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
794 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
795 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
798 fCutFolder[iCut]->SetName(Form(
"Cut Number %s",fullCutString.Data()));
799 fCutFolder[iCut]->SetOwner(kTRUE);
802 fESDList[iCut]->SetName(Form(
"%s ESD histograms",fullCutString.Data()));
804 fCutFolder[iCut]->Add(
fESDList[iCut]);
806 fHistoNEvents[iCut] =
new TH1F(
"NEvents",
"NEvents", 14, -0.5, 13.5);
808 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(2,
"Centrality");
809 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(3,
"Miss. MC or inc. ev.");
811 TString TriggerNames =
"Not Trigger: ";
813 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(4,TriggerNames.Data());
818 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(6,
"Cont. Vertex");
822 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(10,
"EMCAL problem");
823 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(11,
"rejectedForJetJetMC");
824 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(12,
"SPD hits vs tracklet");
825 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(13,
"Out-of-Bunch pileup Past-Future");
826 fHistoNEvents[iCut]->GetXaxis()->SetBinLabel(14,
"Pileup V0M-TPCout Tracks");
835 TString TriggerNames =
"Not Trigger: ";
863 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 4000, 0, 4000);
865 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 400, 0, 400);
867 fHistoNGoodESDTracks[iCut] =
new TH1F(
"GoodESDTracks",
"GoodESDTracks; # TPC tracks", 200, 0, 200);
870 fHistoVertexZ[iCut] =
new TH1F(
"VertexZ",
"VertexZ", 200, -10, 10);
873 fHistoVertexX[iCut] =
new TH1F(
"VertexX",
"VertexX", 100, -5, 5);
875 fHistoVertexY[iCut] =
new TH1F(
"VertexY",
"VertexY", 100, -5, 5);
881 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 100, 0, 100);
883 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 50, 0, 50);
885 fHistoNGammaConvCandidates[iCut] =
new TH1F(
"GammaConvCandidates",
"GammaConvCandidates; # accepted #gamma_{conv}", 50, 0, 50);
890 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 100, 0, 100);
892 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 50, 0, 50);
894 fHistoNGammaCaloCandidates[iCut] =
new TH1F(
"GammaCaloCandidates",
"GammaCaloCandidates; # accepted #gamma_{conv}", 50, 0, 50);
903 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 30000, 0, 30000);
905 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 2500, 0, 2500);
907 fHistoNV0Tracks[iCut] =
new TH1F(
"V0 Multiplicity",
"V0 Multiplicity; VZERO amp [arb. units]", 1500, 0, 1500);
911 fHistoConvGammaPt[iCut] =
new TH1F(
"ESD_ConvGamma_Pt",
"ESD_ConvGamma_Pt; p_{T,conv}(GeV/c)", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
915 fHistoClusGammaPt[iCut] =
new TH1F(
"ClusGamma_Pt",
"ClusGamma_Pt; p_{T,clus} (GeV/c)", nBinsClusterPt, arrClusPtBinning);
917 fHistoClusGammaE[iCut] =
new TH1F(
"ClusGamma_E",
"ClusGamma_E; E_{clus} (GeV)", nBinsClusterPt, arrClusPtBinning);
920 fHistoClusOverlapHeadersGammaPt[iCut] =
new TH1F(
"ClusGammaOverlapHeaders_Pt",
"ClusGammaOverlapHeaders_Pt; p_{T,clus} (GeV/c), selected header w/ overlap",
921 nBinsClusterPt, arrClusPtBinning);
924 nBinsClusterPt, arrClusPtBinning);
927 nBinsClusterPt, arrClusPtBinning);
934 fProfileEtaShift[iCut] =
new TProfile(
"Eta Shift",
"Eta Shift", 1, -0.5, 0.5);
959 fHistoMotherInvMassPt[iCut] =
new TH2F(
"ESD_Mother_InvMass_Pt",
"ESD_Mother_InvMass_Pt; M_{inv} (GeV/c^{2}); p_{T,pair} (GeV/c)",
965 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)",
971 fHistoMotherBackInvMassPt[iCut] =
new TH2F(
"ESD_Background_InvMass_Pt",
"ESD_Background_InvMass_Pt; M_{inv, mxed}(GeV/c^{2}); p_{T,BG pair} (GeV/c)",
982 fHistoMotherMesonPtY[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_Y",
"ESD_MotherMeson_Pt_Y; p_{T, meson cand} (GeV/c); y_{meson cand}",
983 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
985 fHistoMotherMesonPtAlpha[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_Alpha",
"ESD_MotherMeson_Pt_Alpha; p_{T, meson cand} (GeV/c); #alpha_{meson cand}",
986 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
988 fHistoMotherMesonPtOpenAngle[iCut] =
new TH2F(
"ESD_MotherMeson_Pt_OpenAngle",
"ESD_MotherMeson_Pt_OpenAngle; p_{T, meson cand} (GeV/c); #theta_{meson cand}",
989 nBinsQAPt, arrQAPtBinning, 100, 0, 1);
992 600, 0, 2*TMath::Pi(), 200, -1, 1);
1088 TString cutstringConvGamma =
"";
1089 TString cutstringCaloGamma =
"";
1095 if (
fMesonRecoMode == 0) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringConvGamma.Data(), cutstringMeson.Data());
1096 else if (
fMesonRecoMode == 1) fullCutString = Form(
"%i_%s_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(),cutstringConvGamma.Data(),cutstringCaloGamma.Data(), cutstringMeson.Data());
1097 else if (
fMesonRecoMode == 2) fullCutString = Form(
"%i_%s_%s_%s",
fMesonRecoMode, cutstringEvent.Data(), cutstringCaloGamma.Data(), cutstringMeson.Data());
1100 fMCList[iCut]->SetName(Form(
"%s MC histograms",fullCutString.Data()));
1101 fMCList[iCut]->SetOwner(kTRUE);
1108 fHistoMCMesonPt[iCut] =
new TH1F(
"MC_Meson_Pt",
"MC_Meson_Pt; p_{T} (GeV/c)",
1109 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1113 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1117 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1121 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1128 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1131 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1136 nBinsQAPt, arrQAPtBinning, 200, 0, 200);
1145 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1149 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1158 fTrueList[iCut]->SetName(Form(
"%s True histograms",fullCutString.Data()));
1164 fHistoTrueConvGammaPt[iCut] =
new TH1F(
"ESD_TrueConvGamma_Pt",
"ESD_TrueConvGamma_Pt; p_{T,clus} (GeV/c); counts",
1165 (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1168 800, 0, 200, (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1172 fHistoTruePrimaryConvGammaPt[iCut] =
new TH1F(
"ESD_TruePrimaryConvGamma_Pt",
"ESD_TruePrimaryConvGamma_Pt;p_{T,clus} (GeV/c); counts", (
Int_t)((maxPt-minPt)/binWidthPt), minPt, maxPt);
1176 fHistoTrueClusGammaPt[iCut] =
new TH1F(
"TrueClusGamma_Pt",
"ESD_TrueClusGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1178 fHistoTruePrimaryClusGammaPt[iCut] =
new TH1F(
"TruePrimaryClusGamma_Pt",
"ESD_TruePrimaryClusGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1180 fHistoTrueClusConvGammaPt[iCut] =
new TH1F(
"TrueClusConvGamma_Pt",
"TrueClusConvGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1182 fHistoTruePrimaryClusConvGammaPt[iCut] =
new TH1F(
"TruePrimaryClusConvGamma_Pt",
"ESD_TruePrimaryClusConvGamma_Pt; p_{T,clus} (GeV/c); counts", nBinsClusterPt, arrClusPtBinning);
1185 nBinsClusterPt, arrClusPtBinning, 2, 0, 2);
1189 fHistoTrueClusConvGammaFullyPt[iCut] =
new TH1F(
"TrueClusConvGammaFullyContained_Pt",
"TrueClusConvGammaFullyContained_Pt; p_{T,clus} (GeV/c); counts",
1190 nBinsClusterPt, arrClusPtBinning);
1193 100, -0.5, 99.5, nBinsClusterPt, arrClusPtBinning);
1228 fHistoMultipleCountTrueMeson[iCut] =
new TH1F(
"ESD_TrueMultipleCountMeson",
"ESD_TrueMultipleCountMeson;# number of multiple counts;#", 10, 1, 11);
1238 "ESD_TruePrimaryMesonW0Weights_InvMass_Pt;M_{inv}(GeV/c^{2});p_{T}(GeV/c)",
1243 "ESD_TruePrimaryMesonWeights_InvMass_Pt;M_{inv}(GeV/c^{2});p_{T}(GeV/c)",
1263 "ESD_TrueMesonCaloPhoton_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma #gamma;p_{T}(GeV/c) ",
1267 "ESD_TrueMesonCaloConvertedPhoton_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv};p_{T}(GeV/c)",
1271 "ESD_TrueMesonCaloElectron_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma e^{#pm}; ; p_{T}(GeV/c)",
1275 "ESD_TrueMesonCaloMergedCluster_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma merged cluster; p_{T}(GeV/c)",
1279 "ESD_TrueMesonCaloMergedClusterPartConv_InvMass_Pt; M_{inv}(GeV/c^{2}) #gamma merged cluster, part conv; p_{T}(GeV/c)",
1285 "ESD_TrueMesonCaloConvertedPhotonMatched_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv,matched};p_{T}(GeV/c)",
1289 600, 0, 2*TMath::Pi(), 200, -1, 1);
1294 "ESD_TrueMesonCaloMixedPhotonConvertedPhoton_InvMass_Pt;M_{inv}(GeV/c^{2}) #gamma #gamma_{conv,matched};p_{T}(GeV/c)",
1299 "ESD_TruePrimaryMeson_ResolPt_MCPt; p_{T,MC}(GeV/c); (p_{T,rec}-p_{T,MC})/p_{T,MC}()",
1300 500, 0.03, 25, 1000, -1., 1.);
1307 "ESD_TrueBckGG_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma no signal; #pair p_{T}(GeV/c)",
1311 "ESD_TrueBckFullMesonContained_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma, calo gamma with full pi0; #pair p_{T}(GeV/c)",
1315 "ESD_TrueBckAsymEClus_InvMass_Pt; M_{inv} (GeV/c^{2}) #gamma #gamma, calo gamma >70% of pi0 energy; #pair p_{T}(GeV/c)",
1319 "ESD_TrueBckCont_InvMass_Pt; M_{inv} (GeV/c^{2}) contamination; #pair p_{T}(GeV/c)",
1324 nBinsQAPt, arrQAPtBinning, 150, -1.5, 1.5);
1327 nBinsQAPt, arrQAPtBinning, 200, -1, 1);
1330 nBinsQAPt, arrQAPtBinning, 100, 0, 1);
1372 for(
Int_t iMatcherTask = 0; iMatcherTask < 3; iMatcherTask++){
1435 printf(
" Gamma Conversion Task %s :: Eta Shift Manually Set to %f \n\n",
1455 if(
fInputEvent->IsIncompleteDAQ()==kTRUE) eventQuality = 2;
1457 if(eventQuality == 2 || eventQuality == 3){
1483 AliEventplane *EventPlane =
fInputEvent->GetEventplane();
1495 Bool_t isRunningEMCALrelAna = kFALSE;
1506 if((xsection==-1.) || (ntrials==-1.)) AliFatal(Form(
"ERROR: GetXSectionAndNTrials returned invalid xsection/ntrials, periodName from V0Reader: '%s'",
fV0Reader->
GetPeriodName().Data()));
1527 Bool_t triggered = kTRUE;
1529 if(eventNotAccepted!= 0){
1533 if (eventNotAccepted==3 &&
fIsMC > 0){
1540 if(eventQuality != 0){
1547 if (triggered==kTRUE){
1570 else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1579 if (nameBin.CompareTo(
"")== 0){
1581 ->GetAcceptedHeader())->At(i))->GetString();
1582 fHistoMCHeaders[iCut]->GetXaxis()->SetBinLabel(i+1,nameHeader.Data());
1595 if (triggered==kFALSE)
continue;
1676 TClonesArray * arrClustersProcess = NULL;
1681 if(!arrClustersProcess)
1682 AliFatal(Form(
"%sClustersBranch was not found in AliAnalysisTaskHeavyNeutralMesonToGG! Check the correction framework settings!",
fCorrTaskSetting.Data()));
1683 nclus = arrClustersProcess->GetEntries();
1688 if(nclus == 0)
return;
1698 InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
1701 for(
Int_t i = 0; i < nclus; i++){
1702 AliVCluster* clus = NULL;
1704 if(arrClustersProcess)
1705 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersProcess->At(i));
1707 clus =
new AliESDCaloCluster(*(AliESDCaloCluster*)
fInputEvent->GetCaloCluster(i));
1708 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
1709 if(arrClustersProcess)
1710 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersProcess->At(i));
1712 clus =
new AliAODCaloCluster(*(AliAODCaloCluster*)
fInputEvent->GetCaloCluster(i));
1715 if (!clus)
continue;
1722 TLorentzVector clusterVector;
1723 clus->GetMomentum(clusterVector,vertex);
1725 TLorentzVector* tmpvec =
new TLorentzVector();
1726 tmpvec->SetPxPyPzE(clusterVector.Px(),clusterVector.Py(),clusterVector.Pz(),clusterVector.E());
1730 if(!PhotonCandidate){
delete clus;
delete tmpvec;
continue;}
1738 Int_t* mclabelsCluster = clus->GetLabels();
1741 if (clus->GetNLabels()>0){
1742 for (
Int_t k =0; k<(
Int_t)clus->GetNLabels(); k++){
1758 if (clus->GetNLabels()>1){
1759 Int_t* mclabelsCluster = clus->GetLabels();
1760 for (
Int_t l = 1; l < (
Int_t)clus->GetNLabels(); l++ ){
1786 delete PhotonCandidate;
1797 TParticle *Photon = NULL;
1798 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1812 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1813 Double_t mcProdVtxX = primVtxMC->GetX();
1814 Double_t mcProdVtxY = primVtxMC->GetY();
1815 Double_t mcProdVtxZ = primVtxMC->GetZ();
1852 Int_t motherLab = Photon->GetMother(0);
1853 if (motherLab > -1){
1860 Int_t grandMotherLab =
fMCEvent->Particle(motherLab)->GetMother(0);
1861 if (grandMotherLab > -1){
1877 AliAODMCParticle *Photon = NULL;
1878 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
1879 if (AODMCTrackArray){
1880 if (!TruePhotonCandidate->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set task will abort");
1884 AliInfo(
"AODMCTrackArray could not be loaded");
1896 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
1897 Double_t mcProdVtxX = primVtxMC->GetX();
1898 Double_t mcProdVtxY = primVtxMC->GetY();
1899 Double_t mcProdVtxZ = primVtxMC->GetZ();
1904 if (Photon->GetMother()> -1){
1905 AliAODMCParticle *Mother = (AliAODMCParticle*) AODMCTrackArray->At(Photon->GetMother());
1929 Int_t motherLab = Photon->GetMother();
1930 if (motherLab > -1){
1937 Int_t grandMotherLab = ((AliAODMCParticle*) AODMCTrackArray->At(motherLab))->GetMother();
1938 if (grandMotherLab > -1){
1960 if(!PhotonCandidate)
continue;
1988 GammaCandidatesStepOne->Add(PhotonCandidate);
1991 GammaCandidatesStepTwo->Add(PhotonCandidate);
1996 for(
Int_t i = 0;i<GammaCandidatesStepOne->GetEntries();i++){
1998 if(!PhotonCandidate)
continue;
2017 }
else GammaCandidatesStepTwo->Add(PhotonCandidate);
2022 for(
Int_t i = 0;i<GammaCandidatesStepTwo->GetEntries();i++){
2024 if(!PhotonCandidate)
continue;
2045 delete GammaCandidatesStepOne;
2046 GammaCandidatesStepOne = 0x0;
2047 delete GammaCandidatesStepTwo;
2048 GammaCandidatesStepTwo = 0x0;
2055 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2056 Double_t mcProdVtxX = primVtxMC->GetX();
2057 Double_t mcProdVtxY = primVtxMC->GetY();
2058 Double_t mcProdVtxZ = primVtxMC->GetZ();
2060 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2061 if (AODMCTrackArray == NULL)
return;
2062 AliAODMCParticle *posDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelPositive());
2063 AliAODMCParticle *negDaughter = (AliAODMCParticle*) AODMCTrackArray->At(TruePhotonCandidate->
GetMCLabelNegative());
2065 if(posDaughter == NULL || negDaughter == NULL)
return;
2066 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2068 if(posDaughter->GetMother() != negDaughter->GetMother()){
2070 }
else if(posDaughter->GetMother() == -1){
2074 if(pdgCode[0]!=11 || pdgCode[1]!=11){
2078 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode()){
2082 AliAODMCParticle *Photon = (AliAODMCParticle*) AODMCTrackArray->At(posDaughter->GetMother());
2083 if(Photon->GetPdgCode() != 22){
2087 if(((posDaughter->GetMCProcessCode())) != 5 || ((negDaughter->GetMCProcessCode())) != 5){
2118 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2119 Double_t mcProdVtxX = primVtxMC->GetX();
2120 Double_t mcProdVtxY = primVtxMC->GetY();
2121 Double_t mcProdVtxZ = primVtxMC->GetZ();
2127 if(posDaughter == NULL || negDaughter == NULL)
return;
2128 Int_t pdgCode[2] = {TMath::Abs(posDaughter->GetPdgCode()),TMath::Abs(negDaughter->GetPdgCode())};
2129 if(posDaughter->GetMother(0) != negDaughter->GetMother(0)){
2132 else if(posDaughter->GetMother(0) == -1){
2136 if(pdgCode[0]!=11 || pdgCode[1]!=11)
return;
2138 if(posDaughter->GetPdgCode()==negDaughter->GetPdgCode())
return;
2142 if(Photon->GetPdgCode() != 22){
2146 if(posDaughter->GetUniqueID() != 5 || negDaughter->GetUniqueID() !=5)
return;
2172 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2173 Double_t mcProdVtxX = primVtxMC->GetX();
2174 Double_t mcProdVtxY = primVtxMC->GetY();
2175 Double_t mcProdVtxZ = primVtxMC->GetZ();
2177 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2178 if (AODMCTrackArray == NULL)
return;
2181 for(Long_t i = 0; i < AODMCTrackArray->GetEntriesFast(); i++) {
2183 AliAODMCParticle* particle =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(i));
2184 if (!particle)
continue;
2189 Int_t isMCFromMBHeader = -1;
2201 if (particle->E() != TMath::Abs(particle->Pz())){
2202 ratio = (particle->E()+particle->Pz()) / (particle->E()-particle->Pz());
2204 if( !(ratio <= 0) ){
2210 AliAODMCParticle* daughter0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(0)));
2211 AliAODMCParticle* daughter1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(particle->GetDaughter(1)));
2214 if (particle->Pt()>0.005){
2220 if(particle->GetPdgCode() ==
fMesonPDG){
2221 alpha = (daughter0->E() - daughter1->E())/(daughter0->E() + daughter1->E());
2272 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2273 Double_t mcProdVtxX = primVtxMC->GetX();
2274 Double_t mcProdVtxY = primVtxMC->GetY();
2275 Double_t mcProdVtxZ = primVtxMC->GetZ();
2279 for(Long_t i = 0; i <
fMCEvent->GetNumberOfTracks(); i++) {
2282 TParticle* particle = (TParticle *)
fMCEvent->Particle(i);
2283 if (!particle)
continue;
2285 Int_t isMCFromMBHeader = -1;
2298 if (particle->Energy() != TMath::Abs(particle->Pz())){
2299 ratio = (particle->Energy()+particle->Pz()) / (particle->Energy()-particle->Pz());
2301 if( !(ratio <= 0) ){
2307 TParticle* daughter0 = (TParticle*)
fMCEvent->Particle(particle->GetFirstDaughter());
2308 TParticle* daughter1 = (TParticle*)
fMCEvent->Particle(particle->GetLastDaughter());
2312 if (particle->Pt()>0.005){
2318 if(particle->GetPdgCode() ==
fMesonPDG){
2319 alpha = (daughter0->Energy() - daughter1->Energy())/(daughter0->Energy() + daughter1->Energy());
2332 if( kDaughter0IsPrim && kDaughter1IsPrim ){
2373 TClonesArray * arrClustersMesonCand = NULL;
2375 arrClustersMesonCand = dynamic_cast<TClonesArray*>(
fInputEvent->FindListObject(Form(
"%sClustersBranch",
fCorrTaskSetting.Data())));
2381 if (gamma0==NULL)
continue;
2382 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fGammaCandidates->GetEntries();secondGammaIndex++){
2385 if (gamma1==NULL)
continue;
2392 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2445 if (gamma0==NULL)
continue;
2450 if (gamma1==NULL)
continue;
2453 AliVCluster* cluster = NULL;
2455 if(arrClustersMesonCand)
2456 cluster =
new AliESDCaloCluster(*(AliESDCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2459 }
else if(
fInputEvent->IsA()==AliAODEvent::Class()){
2460 if(arrClustersMesonCand)
2461 cluster =
new AliAODCaloCluster(*(AliAODCaloCluster*)arrClustersMesonCand->At(gamma1->
GetCaloClusterRef()));
2467 if(arrClustersMesonCand)
delete cluster;
2471 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2531 if (gamma0==NULL)
continue;
2532 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<
fClusterCandidates->GetEntries();secondGammaIndex++){
2534 if (gamma1==NULL)
continue;
2537 mesonCand->
SetLabels(firstGammaIndex,secondGammaIndex);
2587 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2588 Double_t mcProdVtxX = primVtxMC->GetX();
2589 Double_t mcProdVtxY = primVtxMC->GetY();
2590 Double_t mcProdVtxZ = primVtxMC->GetZ();
2594 Bool_t isTrueMeson = kFALSE;
2595 Int_t gamma0MCLabel = -1;
2596 Int_t gamma0MotherLabel = -1;
2599 if(gamma0MCLabel>-1){
2600 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2601 gamma0MotherLabel=gammaMC0->GetFirstMother();
2604 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2607 Int_t gamma1MotherLabel = -1;
2610 TParticle * gammaMC1 = 0x0;
2611 if(gamma1MCLabel != -1){
2613 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2617 gamma1MotherLabel=gammaMC1->GetMother(0);
2619 if (TrueGammaCandidate1->
IsConversion() && gammaMC1->GetMother(0)>-1) gamma1MotherLabel=
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2620 else gamma1MotherLabel=gammaMC1->GetMother(0);
2625 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2626 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
2675 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
2697 }
else if(!isTrueMeson ){
2699 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
2702 ( ((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 2706 }
else if( TrueGammaCandidate1->E()/mesonCand->E() > 0.7 ){
2714 if (isTrueMeson && !matched){
2726 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2727 Double_t mcProdVtxX = primVtxMC->GetX();
2728 Double_t mcProdVtxY = primVtxMC->GetY();
2729 Double_t mcProdVtxZ = primVtxMC->GetZ();
2732 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
2733 if (AODMCTrackArray == NULL)
return;
2734 Bool_t isTrueMeson = kFALSE;
2736 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
2737 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
2739 Int_t gamma0MCLabel = -1;
2740 Int_t gamma0MotherLabel = -1;
2741 if(!positiveMC||!negativeMC)
2745 gamma0MCLabel = positiveMC->GetMother();
2746 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
2747 gamma0MotherLabel=gammaMC0->GetMother();
2750 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2752 Int_t gamma1MotherLabel = -1;
2755 AliAODMCParticle * gammaMC1 = 0x0;
2756 if(gamma1MCLabel != -1){
2758 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
2762 gamma1MotherLabel=gammaMC1->GetMother();
2765 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
2766 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
2767 }
else gamma1MotherLabel=gammaMC1->GetMother();
2772 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2773 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
2820 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
2837 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
2843 }
else if(!isTrueMeson ) {
2845 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
2848 if( (((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 2852 }
else if( TrueGammaCandidate1->E()/mesonCand->E() > 0.7 ){
2860 if (isTrueMeson && !matched){
2872 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
2873 Double_t mcProdVtxX = primVtxMC->GetX();
2874 Double_t mcProdVtxY = primVtxMC->GetY();
2875 Double_t mcProdVtxZ = primVtxMC->GetZ();
2877 Bool_t isTrueMeson = kFALSE;
2879 Int_t gamma0MotherLabel = -1;
2881 TParticle * gammaMC0 = 0x0;
2882 if(gamma0MCLabel != -1){
2883 gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
2887 gamma0MotherLabel=gammaMC0->GetMother(0);
2889 if (TrueGammaCandidate0->
IsConversion() && (gammaMC0->GetMother(0) > -1)){
2890 gamma0MotherLabel=
fMCEvent->Particle(gammaMC0->GetMother(0))->GetMother(0);
2892 gamma0MotherLabel=gammaMC0->GetMother(0);
2897 if (!TrueGammaCandidate1->
GetIsCaloPhoton()) AliFatal(
"CaloPhotonFlag has not been set. Aborting");
2900 Int_t gamma1MotherLabel = -1;
2903 TParticle * gammaMC1 = 0x0;
2904 if(gamma1MCLabel != -1){
2906 gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
2910 gamma1MotherLabel = gammaMC1->GetMother(0);
2913 if(gammaMC1->GetMother(0) > -1) gamma1MotherLabel =
fMCEvent->Particle(gammaMC1->GetMother(0))->GetMother(0);
2915 gamma1MotherLabel=gammaMC1->GetMother(0);
2921 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
2922 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
2972 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
2989 }
else if(!isTrueMeson ){
2991 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
2994 if( (((TParticle*)
fMCEvent->Particle(gamma0MotherLabel))->GetPdgCode() ==
fMesonPDG 3001 }
else if( (TrueGammaCandidate0->E()/mesonCand->E() > 0.7) || (TrueGammaCandidate1->E()/mesonCand->E() > 0.7) ){
3016 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3017 Double_t mcProdVtxX = primVtxMC->GetX();
3018 Double_t mcProdVtxY = primVtxMC->GetY();
3019 Double_t mcProdVtxZ = primVtxMC->GetZ();
3022 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3023 if (AODMCTrackArray == NULL)
return;
3025 Bool_t isTrueMeson = kFALSE;
3027 Int_t gamma0MotherLabel = -1;
3030 AliAODMCParticle * gammaMC0 = 0x0;
3031 if(gamma0MCLabel != -1){
3033 gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3037 gamma0MotherLabel=gammaMC0->GetMother();
3040 AliAODMCParticle * gammaGrandMotherMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC0->GetMother()));
3041 gamma0MotherLabel=gammaGrandMotherMC0->GetMother();
3042 }
else gamma0MotherLabel=gammaMC0->GetMother();
3048 Int_t gamma1MotherLabel = -1;
3051 AliAODMCParticle *gammaMC1 = 0x0;
3052 if(gamma1MCLabel != -1){
3054 gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3058 gamma1MotherLabel=gammaMC1->GetMother();
3061 AliAODMCParticle * gammaGrandMotherMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gammaMC1->GetMother()));
3062 gamma1MotherLabel=gammaGrandMotherMC1->GetMother();
3063 }
else gamma1MotherLabel=gammaMC1->GetMother();
3068 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3069 if(((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3118 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3129 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted*
fWeightJetJetMC);
3132 }
else if(!isTrueMeson ) {
3134 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3137 if( (((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() ==
fMesonPDG 3140 (((AliAODMCParticle*)AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG 3144 }
else if( (TrueGammaCandidate0->E()/mesonCand->E() > 0.7) || (TrueGammaCandidate1->E()/mesonCand->E() > 0.7) ){
3161 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3162 Double_t mcProdVtxX = primVtxMC->GetX();
3163 Double_t mcProdVtxY = primVtxMC->GetY();
3164 Double_t mcProdVtxZ = primVtxMC->GetZ();
3167 Bool_t isTrueMeson = kFALSE;
3168 Bool_t isTrueMesonDalitz = kFALSE;
3169 Bool_t gamma0DalitzCand = kFALSE;
3170 Bool_t gamma1DalitzCand = kFALSE;
3172 Int_t gamma0MotherLabel = -1;
3173 if(gamma0MCLabel != -1){
3177 TParticle * gammaMC0 = (TParticle*)
fMCEvent->Particle(gamma0MCLabel);
3178 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3179 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3180 if(gammaMC0->GetPdgCode() == 22){
3181 gamma0MotherLabel=gammaMC0->GetFirstMother();
3185 gamma0DalitzCand = kTRUE;
3192 Int_t gamma1MotherLabel = -1;
3193 if(gamma1MCLabel != -1){
3197 TParticle * gammaMC1 = (TParticle*)
fMCEvent->Particle(gamma1MCLabel);
3198 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3199 if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){
3200 if(gammaMC1->GetPdgCode() == 22){
3201 gamma1MotherLabel=gammaMC1->GetFirstMother();
3204 if(gammaMC1->GetPdgCode() ==
fMesonPDG ){
3205 gamma1DalitzCand = kTRUE;
3210 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3211 if(((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3221 if (gamma1DalitzCand || gamma0DalitzCand){
3222 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3223 if (gamma0MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3225 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3226 if (gamma1MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3246 if (((TParticle*)
fMCEvent->Particle(gamma1MotherLabel))->Pt()>0.005){
3259 }
else if(!isTrueMeson ){
3261 if(gamma0MotherLabel>-1 && gamma1MotherLabel>-1){
3267 if (!isTrueMesonDalitz && (gamma0DalitzCand || gamma1DalitzCand)){
3280 const AliVVertex* primVtxMC =
fMCEvent->GetPrimaryVertex();
3281 Double_t mcProdVtxX = primVtxMC->GetX();
3282 Double_t mcProdVtxY = primVtxMC->GetY();
3283 Double_t mcProdVtxZ = primVtxMC->GetZ();
3286 TClonesArray *AODMCTrackArray =
dynamic_cast<TClonesArray*
>(
fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
3287 Bool_t isTrueMeson = kFALSE;
3288 Bool_t isTrueMesonDalitz = kFALSE;
3289 Bool_t gamma0DalitzCand = kFALSE;
3290 Bool_t gamma1DalitzCand = kFALSE;
3292 if (AODMCTrackArray!=NULL && TrueGammaCandidate0 != NULL){
3293 AliAODMCParticle *positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelPositive()));
3294 AliAODMCParticle *negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate0->
GetMCLabelNegative()));
3296 Int_t gamma0MCLabel = -1;
3297 Int_t gamma0MotherLabel = -1;
3298 if(!positiveMC||!negativeMC)
3301 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3302 gamma0MCLabel = positiveMC->GetMother();
3305 if(gamma0MCLabel != -1){
3307 AliAODMCParticle * gammaMC0 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma0MCLabel));
3308 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3309 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3310 if(gammaMC0->GetPdgCode() == 22){
3311 gamma0MotherLabel=gammaMC0->GetMother();
3315 gamma0DalitzCand = kTRUE;
3320 positiveMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelPositive()));
3321 negativeMC =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(TrueGammaCandidate1->
GetMCLabelNegative()));
3323 Int_t gamma1MCLabel = -1;
3324 Int_t gamma1MotherLabel = -1;
3325 if(!positiveMC||!negativeMC)
3328 if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
3329 gamma1MCLabel = positiveMC->GetMother();
3331 if(gamma1MCLabel != -1){
3333 AliAODMCParticle * gammaMC1 =
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MCLabel));
3334 if(TMath::Abs(negativeMC->GetPdgCode())==11 && TMath::Abs(positiveMC->GetPdgCode())==11){
3335 if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){
3336 if(gammaMC1->GetPdgCode() == 22){
3337 gamma1MotherLabel=gammaMC1->GetMother();
3340 if(gammaMC1->GetPdgCode() ==
fMesonPDG ){
3341 gamma1DalitzCand = kTRUE;
3346 if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
3347 if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->GetPdgCode() ==
fMesonPDG){
3357 if (gamma1DalitzCand || gamma0DalitzCand){
3358 if (gamma0DalitzCand && gamma0MCLabel >=0 && gamma0MCLabel==gamma1MotherLabel){
3359 if (gamma0MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3361 if (gamma1DalitzCand && gamma1MCLabel >=0 && gamma1MCLabel==gamma0MotherLabel){
3362 if (gamma1MotherLabel == -
fMesonPDG) isTrueMesonDalitz = kTRUE;
3383 if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt()>0.005){
3394 (mesonCand->Pt()-
static_cast<AliAODMCParticle*
>(AODMCTrackArray->At(gamma1MotherLabel))->Pt())/static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma1MotherLabel))->Pt(),weighted);
3397 }
else if(!isTrueMeson ) {
3399 if(!(gamma0MotherLabel>-1 && gamma1MotherLabel>-1)){
3405 if (!isTrueMesonDalitz && (gamma0DalitzCand || gamma1DalitzCand)){
3419 TList* currPhotonList = NULL;
3441 for(
Int_t nEventsInBG=0;nEventsInBG<currBGHandler->
GetNBGEvents();nEventsInBG++){
3446 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3448 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3470 delete backgroundCandidate;
3471 backgroundCandidate = 0x0;
3476 for(
Int_t nEventsInBG=0;nEventsInBG <currBGHandler->
GetNBGEvents();nEventsInBG++){
3478 if(previousEventV0s){
3482 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3484 for(
UInt_t iPrevious=0;iPrevious<previousEventV0s->size();iPrevious++){
3508 delete backgroundCandidate;
3509 backgroundCandidate = 0x0;
3522 TList* currPhotonList = NULL;
3547 for(
Int_t firstGammaIndex=0;firstGammaIndex<currPhotonList->GetEntries();firstGammaIndex++){
3549 if (gamma0==NULL)
continue;
3550 for(
Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<currPhotonList->GetEntries();secondGammaIndex++){
3552 if (gamma1 == NULL)
continue;
3573 if(previousEventGammas){
3580 weight*=0.5*(
Double_t(currPhotonList->GetEntries()-1))/
Double_t(previousEventGammas->size());
3582 for(
Int_t iCurrent=0;iCurrent<currPhotonList->GetEntries();iCurrent++){
3584 for(
UInt_t iPrevious=0;iPrevious<previousEventGammas->size();iPrevious++){
3606 Double_t nRadiansPM = fNDegreesPMBackground*TMath::Pi()/180;
3607 Double_t rotationValue =
fRandom.Rndm()*2*nRadiansPM + TMath::Pi()-nRadiansPM;
3608 gamma->RotateZ(rotationValue);
3613 previousEventEP=previousEventEP+TMath::Pi();
3614 thisEventEP=thisEventEP+TMath::Pi();
3615 Double_t rotationValue= thisEventEP-previousEventEP;
3616 gamma->RotateZ(rotationValue);
3680 if(!PhotonCandidate)
continue;
3693 Bool_t AODLabelPos = kFALSE;
3694 Bool_t AODLabelNeg = kFALSE;
3697 AliAODTrack *tempDaughter =
static_cast<AliAODTrack*
>(
fInputEvent->GetTrack(i));
3702 AODLabelPos = kTRUE;
3709 AODLabelNeg = kTRUE;
3712 if(AODLabelNeg && AODLabelPos){
3716 if(!AODLabelPos || !AODLabelNeg){
3717 cout<<
"WARNING!!! AOD TRACKS NOT FOUND FOR"<<endl;
3739 TAxis *axisafter = histoRebin->GetXaxis();
3740 Int_t bins = axisafter->GetNbins();
3741 Double_t from = axisafter->GetXmin();
3742 Double_t to = axisafter->GetXmax();
3745 Double_t factor = TMath::Power(to/from, 1./bins);
3746 for(
Int_t i=1; i<=bins; ++i) newbins[i] = factor * newbins[i-1];
3747 axisafter->Set(bins, newbins);
3759 if(tobechecked > -1){
3760 vector<Int_t>::iterator it;
3761 it = find (vec.begin(), vec.end(), tobechecked);
3762 if (it != vec.end())
return true;
3770 if(tobechecked > -1){
3771 vector<Int_t>::iterator it;
3772 it = find (vec.begin(), vec.end(), tobechecked);
3773 if (it != vec.end())
return true;
3775 vec.push_back(tobechecked);
3784 if( ma.find(tobechecked) != ma.end() ) ma[tobechecked] += 1;
3785 else ma[tobechecked] = 2;
3791 map<Int_t, Int_t>::iterator it;
3792 for (it = ma.begin(); it != ma.end(); it++){
TParticle * GetMCParticle(AliMCEvent *mcEvent)
Bool_t fEnableSortForClusMC
TH1F ** fHistoClusOverlapHeadersGammaPt
array of histos with cluster, E
TH1F ** fHistoNGammaConvCandidates
array of histos with vertex y distribution for selected events
virtual Double_t GetPhotonPhi() const
Int_t GetMCLabelPositive() const
TH2F ** fHistoSPDClusterTrackletBackground
array of histos with number of calo gamma candidates per event
AliV0ReaderV1 * fV0Reader
TList * fClusterCandidates
TH1F ** fHistoVertexX
array of histos with vertex z distribution for selected events
AliAnalysisTaskHeavyNeutralMesonToGG()
TH2F ** fHistoTrueMesonCaloMergedClusterPartConvInvMassPt
array of histos with validated mothers, merged cluster invMass, pt
virtual ~AliAnalysisTaskHeavyNeutralMesonToGG()
void SetCaloClusterRef(Long_t ref)
void SetLabels(Int_t label1, Int_t label2, Int_t label3=0)
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
GammaConversionVertex * GetBGEventVertex(Int_t zbin, Int_t mbin, Int_t event)
TH1F ** fHistoMCMesonWOWeightInAccPt
array of histos with weighted meson in acceptance, pT
Int_t GetLeadingCellID() const
void SetCaloPhotonMCFlags(AliMCEvent *mcEvent, Bool_t enableSort)
void SetConversionPoint(Double_t convpoint[3])