]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- added missing pi0 histograms for calo conv
authorfbock <friederike.bock@cern.ch>
Sun, 30 Nov 2014 13:21:17 +0000 (14:21 +0100)
committerfbock <friederike.bock@cern.ch>
Sun, 30 Nov 2014 13:21:17 +0000 (14:21 +0100)
x

PWGGA/GammaConv/AliAODConversionPhoton.h
PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h

index 247f787280f0131ccfebea84766400502e7fe0c2..c2202ed2d07cbb38a1d880d6f60c1f7c6535b3b8 100644 (file)
@@ -45,6 +45,11 @@ class AliAODConversionPhoton : public AliAODConversionParticle, public AliConver
                void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex* primVertex);
                void SetMassToZero() { SetE(P()); }
                
+               void SetIsTrueConvertedPhoton(){
+                       fCaloPhoton = 0;
+                       fCaloPhotonMCFlags = 1; 
+               }       
+               
                Float_t GetDCAzToPrimVtx()const {return fDCAzPrimVtx;}
                Float_t GetDCArToPrimVtx()const {return fDCArPrimVtx;}
                
@@ -75,6 +80,11 @@ class AliAODConversionPhoton : public AliAODConversionParticle, public AliConver
                Bool_t IsEMNonLeading(){return !(fCaloPhotonMCFlags&kIsPhoton) && !(fCaloPhotonMCFlags&kIsElectron);} // largest contribution is from hadron
         Bool_t IsSubLeadingEM(){return fCaloPhotonMCFlags&kIsSubLeadingEM;}                         // cluster contains at least one electron or photon from a pi0 or eta in subleading contribution
                
+               Bool_t IsTrueConvertedPhoton() {
+                       if (!fCaloPhoton && fCaloPhotonMCFlags == 1) return kTRUE;
+                               else return kFALSE;
+               }
+               
                Float_t fDCArPrimVtx;
                Float_t fDCAzPrimVtx;
                Bool_t fCaloPhoton;
@@ -86,7 +96,7 @@ class AliAODConversionPhoton : public AliAODConversionParticle, public AliConver
         Int_t fCaloPhotonMotherMCLabels[20];
                
        
-       ClassDef(AliAODConversionPhoton,3)
+       ClassDef(AliAODConversionPhoton,4)
 };
 
 
index 42a7930a4f3129f735d30dad0c3ff451e0db9d31..b42c31c8e5a0cb1df319ec63a8c1eb56fbf166bf 100644 (file)
@@ -161,7 +161,6 @@ AliAnalysisTaskGammaCalo::AliAnalysisTaskGammaCalo(): AliAnalysisTaskSE(),
        fHistoTruePrimaryPi0MCPtResolPt(NULL),
        fHistoTruePrimaryEtaMCPtResolPt(NULL),
        fHistoTrueSecondaryPi0InvMassPt(NULL),
-       fHistoTrueSecondaryEtaInvMassPt(NULL),
        fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
        fHistoTrueK0sWithPi0DaughterMCPt(NULL),
        fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
@@ -332,7 +331,6 @@ AliAnalysisTaskGammaCalo::AliAnalysisTaskGammaCalo(const char *name):
        fHistoTruePrimaryPi0MCPtResolPt(NULL),
        fHistoTruePrimaryEtaMCPtResolPt(NULL),
        fHistoTrueSecondaryPi0InvMassPt(NULL),
-       fHistoTrueSecondaryEtaInvMassPt(NULL),
        fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
        fHistoTrueK0sWithPi0DaughterMCPt(NULL),
        fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
@@ -696,7 +694,6 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){
                        fProfileTruePrimaryPi0WeightsInvMassPt  = new TProfile2D*[fnCuts];
                        fProfileTruePrimaryEtaWeightsInvMassPt  = new TProfile2D*[fnCuts];
                        fHistoTrueSecondaryPi0InvMassPt                         = new TH2F*[fnCuts];
-                       fHistoTrueSecondaryEtaInvMassPt                         = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromK0sInvMassPt  = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromEtaInvMassPt  = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromLambdaInvMassPt = new TH2F*[fnCuts];
@@ -971,9 +968,6 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){
                                fHistoTrueSecondaryPi0InvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0_InvMass_Pt", "ESD_TrueSecondaryPi0_InvMass_Pt", 800,0,0.8,250,0,25);
                                fHistoTrueSecondaryPi0InvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTrueSecondaryPi0InvMassPt[iCut]);
-                               fHistoTrueSecondaryEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryEta_InvMass_Pt", "ESD_TrueSecondaryEta_InvMass_Pt", 800,0,0.8,250,0,25);
-                               fHistoTrueSecondaryEtaInvMassPt[iCut]->Sumw2();
-                               fTrueList[iCut]->Add(fHistoTrueSecondaryEtaInvMassPt[iCut]);
 
                                fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromK0s_InvMass_Pt","ESD_TrueSecondaryPi0FromK0s_InvMass_Pt",800,0,0.8,250,0,25);
                                fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->Sumw2();
@@ -2112,7 +2106,6 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidates(AliAODConversionMother
                                //cout << "MC input \t"<<i << "\t" <<  particle->Pt()<<"\t"<<weighted << endl;
                        }
                        if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                       if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
                        if (secMotherLabel >-1){
                                if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0){
                                        fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
@@ -2368,7 +2361,6 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidatesAOD(AliAODConversionMot
                                //cout << "MC input \t"<<i << "\t" <<  particle->Pt()<<"\t"<<weighted << endl;
                        }
                        if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                       if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
                        if (secMotherLabel >-1){
                                if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0 ){
                                        fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
index 2a624caee33ae55397bbc3749437fd3946adc963..55b2d0f5f6d8b34f4c5c8d9a2d158e2fb84ee2e9 100644 (file)
@@ -81,7 +81,7 @@ class AliAnalysisTaskGammaCalo : public AliAnalysisTaskSE {
                // Additional functions for convenience
                void SetLogBinningXTH2(TH2* histoRebin);
                Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode);
-       
+               
        protected:
                AliV0ReaderV1                                           *fV0Reader;                                                     // basic photon Selection Task
                AliGammaConversionAODBGHandler          **fBGHandler;                                           // BG handler for Conversion 
@@ -190,7 +190,6 @@ class AliAnalysisTaskGammaCalo : public AliAnalysisTaskSE {
                TH2F                                                            **fHistoTruePrimaryPi0MCPtResolPt;                              //! array of histos with validated weighted primary pi0, MCpt, resol pt
                TH2F                                                            **fHistoTruePrimaryEtaMCPtResolPt;                              //! array of histos with validated weighted primary eta, MCpt, resol pt
                TH2F                                                            **fHistoTrueSecondaryPi0InvMassPt;                              //! array of histos with validated secondary mothers, invMass, pt
-               TH2F                                                            **fHistoTrueSecondaryEtaInvMassPt;                              //! array of histos with validated secondary mothers, invMass, pt
                TH2F                                                            **fHistoTrueSecondaryPi0FromK0sInvMassPt;               //! array of histos with validated secondary mothers from K0s, invMass, pt
                TH1F                                                            **fHistoTrueK0sWithPi0DaughterMCPt;                             //! array of histos with K0s with reconstructed pi0 as daughter, pt
                TH2F                                                            **fHistoTrueSecondaryPi0FromEtaInvMassPt;               //! array of histos with validated secondary mothers from eta, invMass, pt
index abe971dbeb90a70edc98f95bce258bb241831607..9f4a81f0b13c8eab69886a258d7d65333bdac917 100644 (file)
@@ -176,7 +176,6 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
     fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
     fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
        fHistoTrueSecondaryPi0InvMassPt(NULL),
-       fHistoTrueSecondaryEtaInvMassPt(NULL),
        fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
        fHistoTrueK0sWithPi0DaughterMCPt(NULL),
        fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
@@ -220,9 +219,16 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE(
        fHistoTruePrimaryClusGammaPt(NULL),
        fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
        fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
+       fHistoTruePrimaryPi0DCPtconv(NULL),
+       fHistoTruePrimaryPi0MissingPtconv(NULL),
        fHistoTruePrimaryEtaPhotonPairPtconv(NULL),
+       fHistoTruePrimaryEtaDCPtconv(NULL),
+       fHistoTruePrimaryEtaMissingPtconv(NULL),
        fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
-       fHistoTrueSecondaryEtaPhotonPairPtconv(NULL),
+       fHistoTrueSecondaryPi0DCPtconv(NULL),
+       fHistoTrueSecondaryPi0MissingPtconv(NULL),
+       fStringRecTruePi0s(NULL),
+       fStringRecTrueEtas(NULL),
        fHistoNEvents(NULL),
        fHistoNGoodESDTracks(NULL),
        fHistoNGammaCandidates(NULL),
@@ -373,7 +379,6 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
     fHistoTrueMotherPi0ConvPhotonEtaPhi(NULL),
     fHistoTrueMotherEtaConvPhotonEtaPhi(NULL),
        fHistoTrueSecondaryPi0InvMassPt(NULL),
-       fHistoTrueSecondaryEtaInvMassPt(NULL),
        fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL),
        fHistoTrueK0sWithPi0DaughterMCPt(NULL),
        fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL),
@@ -417,9 +422,16 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name):
        fHistoTruePrimaryClusGammaPt(NULL),
        fHistoTruePrimaryClusGammaESDPtMCPt(NULL),
        fHistoTruePrimaryPi0PhotonPairPtconv(NULL),
+       fHistoTruePrimaryPi0DCPtconv(NULL),
+       fHistoTruePrimaryPi0MissingPtconv(NULL),
        fHistoTruePrimaryEtaPhotonPairPtconv(NULL),
+       fHistoTruePrimaryEtaDCPtconv(NULL),
+       fHistoTruePrimaryEtaMissingPtconv(NULL),
        fHistoTrueSecondaryPi0PhotonPairPtconv(NULL),
-       fHistoTrueSecondaryEtaPhotonPairPtconv(NULL),
+       fHistoTrueSecondaryPi0DCPtconv(NULL),
+       fHistoTrueSecondaryPi0MissingPtconv(NULL),
+       fStringRecTruePi0s(NULL),
+       fStringRecTrueEtas(NULL),
        fHistoNEvents(NULL),
        fHistoNGoodESDTracks(NULL),
        fHistoNGammaCandidates(NULL),
@@ -667,24 +679,32 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                if(fIsHeavyIon == 1) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",4000,0,4000);
                else if(fIsHeavyIon == 2) fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",400,0,400);
                else fHistoNGoodESDTracks[iCut] = new TH1I("GoodESDTracks","GoodESDTracks",200,0,200);
+               fHistoNGoodESDTracks[iCut]->SetXTitle("# TPC tracks");
                fESDList[iCut]->Add(fHistoNGoodESDTracks[iCut]);
+               
                if(fIsHeavyIon == 1) fHistoNGammaCandidates[iCut] = new TH1I("GammaCandidates","GammaCandidates",100,0,100);
                else if(fIsHeavyIon == 2) fHistoNGammaCandidates[iCut] = new TH1I("GammaCandidates","GammaCandidates",50,0,50);
                else fHistoNGammaCandidates[iCut] = new TH1I("GammaCandidates","GammaCandidates",50,0,50);
+               fHistoNGammaCandidates[iCut]->SetXTitle("# accepted $#gamma_{conv}");
                fESDList[iCut]->Add(fHistoNGammaCandidates[iCut]);
+               
                if(fIsHeavyIon == 1) fHistoNGoodESDTracksVsNGammaCanditates[iCut] = new TH2F("GoodESDTracksVsGammaCandidates","GoodESDTracksVsGammaCandidates",4000,0,4000,100,0,100);
                else if(fIsHeavyIon == 2) fHistoNGoodESDTracksVsNGammaCanditates[iCut] = new TH2F("GoodESDTracksVsGammaCandidates","GoodESDTracksVsGammaCandidates",400,0,400,50,0,50);
                else fHistoNGoodESDTracksVsNGammaCanditates[iCut] = new TH2F("GoodESDTracksVsGammaCandidates","GoodESDTracksVsGammaCandidates",200,0,200,50,0,50);
+               fHistoNGoodESDTracksVsNGammaCanditates[iCut]->SetXTitle("# TPC tracks");
+               fHistoNGoodESDTracksVsNGammaCanditates[iCut]->SetYTitle("# accepted $#gamma_{conv}");
                fESDList[iCut]->Add(fHistoNGoodESDTracksVsNGammaCanditates[iCut]);
     
                
                if(fIsHeavyIon == 1) fHistoNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",30000,0,30000);
                else if(fIsHeavyIon == 2) fHistoNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",2500,0,2500);
                else fHistoNV0Tracks[iCut] = new TH1I("V0 Multiplicity","V0 Multiplicity",1500,0,1500);
+               fHistoNV0Tracks[iCut]->SetXTitle("VZERO amp [arb. units]");
                fESDList[iCut]->Add(fHistoNV0Tracks[iCut]);
                fProfileEtaShift[iCut] = new TProfile("Eta Shift","Eta Shift",1, -0.5,0.5);
                fESDList[iCut]->Add(fProfileEtaShift[iCut]);
                fHistoConvGammaPt[iCut] = new TH1F("ESD_ConvGamma_Pt","ESD_ConvGamma_Pt",250,0,25);
+               fHistoConvGammaPt[iCut]->SetXTitle("p_{T,conv} (GeV/c)");
                fESDList[iCut]->Add(fHistoConvGammaPt[iCut]);
     
                if (fDoPhotonQA == 2){
@@ -705,8 +725,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
     
                if (fDoPhotonQA > 0){
                        fHistoConvGammaR[iCut] = new TH1F("ESD_ConvGamma_R","ESD_ConvGamma_R",800,0,200);
+                       fHistoConvGammaR[iCut]->SetXTitle("R_{conv} (cm)");
                        fESDList[iCut]->Add(fHistoConvGammaR[iCut]);
                        fHistoConvGammaEta[iCut] = new TH1F("ESD_ConvGamma_Eta","ESD_ConvGamma_Eta",2000,-2,2);
+                       fHistoConvGammaEta[iCut]->SetXTitle("#eta_{conv}");
                        fESDList[iCut]->Add(fHistoConvGammaEta[iCut]);
                }
 
@@ -716,8 +738,10 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                fCutFolder[iCut]->Add(fClusterOutputList[iCut]);
                
                fHistoClusGammaPt[iCut] = new TH1F("ClusGamma_Pt","ClusGamma_Pt",250,0,25);
+               fHistoClusGammaPt[iCut]->SetXTitle("p_{T,clus} (GeV/c)");
                fClusterOutputList[iCut]->Add(fHistoClusGammaPt[iCut]);
                fHistoClusOverlapHeadersGammaPt[iCut] = new TH1F("ClusGammaOverlapHeaders_Pt","ClusGammaOverlapHeaders_Pt",250,0,25);
+               fHistoClusOverlapHeadersGammaPt[iCut]->SetXTitle("p_{T,clus} (GeV/c), selected header w/ overlap");
                fClusterOutputList[iCut]->Add(fHistoClusOverlapHeadersGammaPt[iCut]);
 
                if(fDoMesonAnalysis){
@@ -727,12 +751,12 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fESDList[iCut]->Add(fHistoMotherInvMassPt[iCut]);
                        
                        fHistoMotherMatchedInvMassPt[iCut] = new TH2F("ESD_MotherMatched_InvMass_Pt","ESD_MotherMatched_InvMass_Pt",800,0,0.8,250,0,25);
-                       fHistoMotherMatchedInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2})");
+                       fHistoMotherMatchedInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2}) matched conv e^{+/-} to cluster");
                        fHistoMotherMatchedInvMassPt[iCut]->SetYTitle("p_{T,pair} (GeV/c)");
                        fESDList[iCut]->Add(fHistoMotherMatchedInvMassPt[iCut]);
                        
                        fHistoMotherBackInvMassPt[iCut] = new TH2F("ESD_Background_InvMass_Pt","ESD_Background_InvMass_Pt",800,0,0.8,250,0,25);
-                       fHistoMotherBackInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2})");
+                       fHistoMotherBackInvMassPt[iCut]->SetXTitle("M_{inv, mxed} (GeV/c^{2})");
                        fHistoMotherBackInvMassPt[iCut]->SetYTitle("p_{T,BG pair} (GeV/c)");
                        fESDList[iCut]->Add(fHistoMotherBackInvMassPt[iCut]);
                        
@@ -766,32 +790,32 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        if (fDoMesonQA > 0 ){
                                fHistoMotherPi0PtY[iCut] = new TH2F("ESD_MotherPi0_Pt_Y","ESD_MotherPi0_Pt_Y",150,0.03,15.,150,-1.5,1.5);
                                fHistoMotherPi0PtY[iCut]->SetXTitle("p_{T, #pi^{0} cand} (GeV/c)");
-                               fHistoMotherPi0PtY[iCut]->SetYTitle("y_{pair, #pi^{0} cand}");
+                               fHistoMotherPi0PtY[iCut]->SetYTitle("y_{#pi^{0} cand}");
                                SetLogBinningXTH2(fHistoMotherPi0PtY[iCut]);
                                fESDList[iCut]->Add(fHistoMotherPi0PtY[iCut]);
                                fHistoMotherEtaPtY[iCut] = new TH2F("ESD_MotaherEta_Pt_Y","ESD_MotherEta_Pt_Y",150,0.03,15.,150,-1.5,1.5);
                                fHistoMotherEtaPtY[iCut]->SetXTitle("p_{T, #eta cand} (GeV/c)");
-                               fHistoMotherEtaPtY[iCut]->SetYTitle("y_{pair, #eta cand}");
+                               fHistoMotherEtaPtY[iCut]->SetYTitle("y_{ #eta cand}");
                                SetLogBinningXTH2(fHistoMotherEtaPtY[iCut]);
                                fESDList[iCut]->Add(fHistoMotherEtaPtY[iCut]);
                                fHistoMotherPi0PtAlpha[iCut] = new TH2F("ESD_MotherPi0_Pt_Alpha","ESD_MotherPi0_Pt_Alpha",150,0.03,15.,100,0,1);
                                fHistoMotherPi0PtAlpha[iCut]->SetXTitle("p_{T, #pi^{0} cand} (GeV/c)");
-                               fHistoMotherPi0PtAlpha[iCut]->SetYTitle("#alpha_{pair, #pi^{0} cand}");
+                               fHistoMotherPi0PtAlpha[iCut]->SetYTitle("#alpha_{#pi^{0} cand}");
                                SetLogBinningXTH2(fHistoMotherPi0PtAlpha[iCut]);
                                fESDList[iCut]->Add(fHistoMotherPi0PtAlpha[iCut]);
                                fHistoMotherEtaPtAlpha[iCut] = new TH2F("ESD_MotherEta_Pt_Alpha","ESD_MotherEta_Pt_Alpha",150,0.03,15.,100,0,1);
                                fHistoMotherEtaPtAlpha[iCut]->SetXTitle("p_{T, #eta cand} (GeV/c)");
-                               fHistoMotherEtaPtAlpha[iCut]->SetYTitle("#alpha_{pair, #eta cand}");
+                               fHistoMotherEtaPtAlpha[iCut]->SetYTitle("#alpha_{#eta cand}");
                                SetLogBinningXTH2(fHistoMotherEtaPtAlpha[iCut]);
                                fESDList[iCut]->Add(fHistoMotherEtaPtAlpha[iCut]);
                                fHistoMotherPi0PtOpenAngle[iCut] = new TH2F("ESD_MotherPi0_Pt_OpenAngle","ESD_MotherPi0_Pt_OpenAngle",150,0.03,15.,100,0,TMath::Pi());
                                fHistoMotherPi0PtOpenAngle[iCut]->SetXTitle("p_{T, #pi^{0} cand} (GeV/c)");
-                               fHistoMotherPi0PtOpenAngle[iCut]->SetYTitle("#theta_{pair, #pi^{0} cand}");
+                               fHistoMotherPi0PtOpenAngle[iCut]->SetYTitle("#theta_{#pi^{0} cand}");
                                SetLogBinningXTH2(fHistoMotherPi0PtOpenAngle[iCut]);
                                fESDList[iCut]->Add(fHistoMotherPi0PtOpenAngle[iCut]);
                                fHistoMotherEtaPtOpenAngle[iCut] = new TH2F("ESD_MotherEta_Pt_OpenAngle","ESD_MotherEta_Pt_OpenAngle",150,0.03,15.,100,0,TMath::Pi());
                                fHistoMotherEtaPtOpenAngle[iCut]->SetXTitle("p_{T, #eta cand} (GeV/c)");
-                               fHistoMotherEtaPtOpenAngle[iCut]->SetYTitle("#theta_{pair, #eta cand}");
+                               fHistoMotherEtaPtOpenAngle[iCut]->SetYTitle("#theta_{#eta cand}");
                                SetLogBinningXTH2(fHistoMotherEtaPtOpenAngle[iCut]);
                                fESDList[iCut]->Add(fHistoMotherEtaPtOpenAngle[iCut]);
                 fHistoMotherPi0ConvPhotonEtaPhi[iCut] = new TH2F("ESD_MotherPi0ConvPhoton_Eta_Phi","ConvPhoton under #pi^{0} peak",600,0,2*TMath::Pi(),200,-1,1);
@@ -882,15 +906,21 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                        fProfileTruePrimaryPi0WeightsInvMassPt          = new TProfile2D*[fnCuts];
                        fProfileTruePrimaryEtaWeightsInvMassPt          = new TProfile2D*[fnCuts];
                        fHistoTrueSecondaryPi0InvMassPt                         = new TH2F*[fnCuts];
-                       fHistoTrueSecondaryEtaInvMassPt                         = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromK0sInvMassPt          = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromEtaInvMassPt          = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0FromLambdaInvMassPt       = new TH2F*[fnCuts];
                        fHistoTruePrimaryPi0PhotonPairPtconv            = new TH2F*[fnCuts];
                        fHistoTrueSecondaryPi0PhotonPairPtconv          = new TH2F*[fnCuts];
                        fHistoTruePrimaryEtaPhotonPairPtconv            = new TH2F*[fnCuts];
-                       fHistoTrueSecondaryEtaPhotonPairPtconv          = new TH2F*[fnCuts];
-
+                       fHistoTruePrimaryPi0DCPtconv                            = new TH1F*[fnCuts];
+                       fHistoTrueSecondaryPi0DCPtconv                          = new TH1F*[fnCuts];
+                       fHistoTruePrimaryEtaDCPtconv                            = new TH1F*[fnCuts];
+                       fHistoTruePrimaryPi0MissingPtconv                       = new TH1F*[fnCuts];
+                       fHistoTrueSecondaryPi0MissingPtconv             = new TH1F*[fnCuts];
+                       fHistoTruePrimaryEtaMissingPtconv                       = new TH1F*[fnCuts];
+                       fStringRecTruePi0s                                                      = new TString[fnCuts];
+                       fStringRecTrueEtas                                                      = new TString[fnCuts];
+                       
                        if (fDoMesonQA > 0){
                                fHistoMCPi0PtY                                                          = new TH2F*[fnCuts];
                                fHistoMCEtaPtY                                                          = new TH2F*[fnCuts];
@@ -933,9 +963,7 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                 fHistoTrueMotherEtaConvPhotonEtaPhi                    = new TH2F*[fnCuts];
                        }
                }
-    
-    
-    
+     
                for(Int_t iCut = 0; iCut<fnCuts;iCut++){
                        TString cutstringEvent  = ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetCutNumber();
                        TString cutstringPhoton = ((AliConversionPhotonCuts*)fCutArray->At(iCut))->GetCutNumber();
@@ -1127,44 +1155,65 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
 
                        if(fDoMesonAnalysis){
                                fHistoTruePi0InvMassPt[iCut] = new TH2F("ESD_TruePi0_InvMass_Pt","ESD_TruePi0_InvMass_Pt",800,0,0.8,250,0,25);
+                               fHistoTruePi0InvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2})");
+                               fHistoTruePi0InvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTruePi0InvMassPt[iCut]);
                                fHistoTrueEtaInvMassPt[iCut] = new TH2F("ESD_TrueEta_InvMass_Pt","ESD_TrueEta_InvMass_Pt",800,0,0.8,250,0,25);
+                               fHistoTruePi0InvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2})");
+                               fHistoTruePi0InvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTrueEtaInvMassPt[iCut]);
 
                                fHistoTruePrimaryPi0InvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0_InvMass_Pt", "ESD_TruePrimaryPi0_InvMass_Pt", 800,0,0.8,250,0,25);
+                               fHistoTruePrimaryPi0InvMassPt[iCut]->SetXTitle("M_{inv,prim #pi^{0}} (GeV/c^{2})");
+                               fHistoTruePrimaryPi0InvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fHistoTruePrimaryPi0InvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTruePrimaryPi0InvMassPt[iCut]);
+                               
                                fHistoTruePrimaryEtaInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEta_InvMass_Pt", "ESD_TruePrimaryEta_InvMass_Pt", 800,0,0.8,250,0,25);
+                               fHistoTruePrimaryEtaInvMassPt[iCut]->SetXTitle("M_{inv,prim #eta} (GeV/c^{2})");
+                               fHistoTruePrimaryEtaInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                fHistoTruePrimaryEtaInvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTruePrimaryEtaInvMassPt[iCut]);
 
                                fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0W0Weights_InvMass_Pt", "ESD_TruePrimaryPi0W0Weights_InvMass_Pt", 800,0,0.8,250,0,25);
-                               fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]->Sumw2();
+                               fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]->SetXTitle("M_{inv,prim #pi^{0}} (GeV/c^{2})");
+                               fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]);
+                               
                                fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEtaW0Weights_InvMass_Pt", "ESD_TruePrimaryEtaW0Weights_InvMass_Pt", 800,0,0.8,250,0,25);
-                               fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]->Sumw2();
+                               fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]->SetXTitle("M_{inv,prim #eta} (GeV/c^{2})");
+                               fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]);
 
                                fProfileTruePrimaryPi0WeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryPi0Weights_InvMass_Pt", "ESD_TruePrimaryPi0Weights_InvMass_Pt", 800,0,0.8,250,0,25);
+                               fProfileTruePrimaryPi0WeightsInvMassPt[iCut]->SetXTitle("M_{inv,prim #pi^{0}} (GeV/c^{2})");
+                               fProfileTruePrimaryPi0WeightsInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fProfileTruePrimaryPi0WeightsInvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fProfileTruePrimaryPi0WeightsInvMassPt[iCut]);
                                fProfileTruePrimaryEtaWeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryEtaWeights_InvMass_Pt", "ESD_TruePrimaryEtaWeights_InvMass_Pt", 800,0,0.8,250,0,25);
+                               fProfileTruePrimaryEtaWeightsInvMassPt[iCut]->SetXTitle("M_{inv,prim #eta} (GeV/c^{2})");
+                               fProfileTruePrimaryEtaWeightsInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                fProfileTruePrimaryEtaWeightsInvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fProfileTruePrimaryEtaWeightsInvMassPt[iCut]);
 
                                fHistoTrueSecondaryPi0InvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0_InvMass_Pt", "ESD_TrueSecondaryPi0_InvMass_Pt", 800,0,0.8,250,0,25);
+                               fHistoTrueSecondaryPi0InvMassPt[iCut]->SetXTitle("M_{inv,sec #pi^{0}} (GeV/c^{2})");
+                               fHistoTrueSecondaryPi0InvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fHistoTrueSecondaryPi0InvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTrueSecondaryPi0InvMassPt[iCut]);
-                               fHistoTrueSecondaryEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryEta_InvMass_Pt", "ESD_TrueSecondaryEta_InvMass_Pt", 800,0,0.8,250,0,25);
-                               fHistoTrueSecondaryEtaInvMassPt[iCut]->Sumw2();
-                               fTrueList[iCut]->Add(fHistoTrueSecondaryEtaInvMassPt[iCut]);
 
                                fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromK0s_InvMass_Pt","ESD_TrueSecondaryPi0FromK0s_InvMass_Pt",800,0,0.8,250,0,25);
+                               fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0} from K^{0}_{S}} (GeV/c^{2})");
+                               fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]);
                                fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromEta_InvMass_Pt","ESD_TrueSecondaryPi0FromEta_InvMass_Pt",800,0,0.8,250,0,25);
+                               fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0} from #eta} (GeV/c^{2})");
+                               fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut]->SetYTitle("#pi^{0}  p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut]);
                                fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromLambda_InvMass_Pt","ESD_TrueSecondaryPi0FromLambda_InvMass_Pt",800,0,0.8,250,0,25);
+                               fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0} from #Lambda} (GeV/c^{2})");
+                               fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut]->SetYTitle("#pi^{0}  p_{T} (GeV/c)");
                                fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut]);
 
                                fHistoTruePrimaryPi0PhotonPairPtconv[iCut] = new TH2F("ESD_TruePrimaryPi0_InvMass_PtConv","",800,0,0.8,250,0,25);
@@ -1185,85 +1234,169 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){
                                fHistoTruePrimaryEtaPhotonPairPtconv[iCut]->Sumw2();
                                fTrueList[iCut]->Add(fHistoTruePrimaryEtaPhotonPairPtconv[iCut]);
 
-                               fHistoTrueSecondaryEtaPhotonPairPtconv[iCut] = new TH2F("ESD_TrueSecondaryEta_InvMass_PtConv","",800,0,0.8,250,0,25);
-                               fHistoTrueSecondaryEtaPhotonPairPtconv[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2})");
-                               fHistoTrueSecondaryEtaPhotonPairPtconv[iCut]->SetYTitle("#gamma^{conv} p_{T} (GeV/c)");
-                               fHistoTrueSecondaryEtaPhotonPairPtconv[iCut]->Sumw2();
-                               fTrueList[iCut]->Add(fHistoTrueSecondaryEtaPhotonPairPtconv[iCut]);
+                               fHistoTruePrimaryPi0DCPtconv[iCut] = new TH1F("ESD_TruePrimaryPi0DC_PtConv","",250,0,25);
+                               fHistoTruePrimaryPi0DCPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTruePrimaryPi0DCPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTruePrimaryPi0DCPtconv[iCut]);
+
+                               fHistoTrueSecondaryPi0DCPtconv[iCut] = new TH1F("ESD_TrueSecondaryPi0DC_PtConv","",250,0,25);
+                               fHistoTrueSecondaryPi0DCPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTrueSecondaryPi0DCPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTrueSecondaryPi0DCPtconv[iCut]);
+
+                               fHistoTruePrimaryEtaDCPtconv[iCut] = new TH1F("ESD_TruePrimaryEtaDC_PtConv","",250,0,25);
+                               fHistoTruePrimaryEtaDCPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTruePrimaryEtaDCPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTruePrimaryEtaDCPtconv[iCut]);
+
+                               fHistoTruePrimaryPi0MissingPtconv[iCut] = new TH1F("ESD_TruePrimaryPi0Missing_PtConv","",250,0,25);
+                               fHistoTruePrimaryPi0MissingPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTruePrimaryPi0MissingPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTruePrimaryPi0MissingPtconv[iCut]);
+
+                               fHistoTrueSecondaryPi0MissingPtconv[iCut] = new TH1F("ESD_TrueSecondaryPi0Missing_PtConv","",250,0,25);
+                               fHistoTrueSecondaryPi0MissingPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTrueSecondaryPi0MissingPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTrueSecondaryPi0MissingPtconv[iCut]);
+
+                               fHistoTruePrimaryEtaMissingPtconv[iCut] = new TH1F("ESD_TruePrimaryEtaMissing_PtConv","",250,0,25);
+                               fHistoTruePrimaryEtaMissingPtconv[iCut]->SetXTitle("#gamma^{conv} p_{T} (GeV/c)");
+                               fHistoTruePrimaryEtaMissingPtconv[iCut]->Sumw2();
+                               fTrueList[iCut]->Add(fHistoTruePrimaryEtaMissingPtconv[iCut]);
                                
                                if (fDoMesonQA > 0){
                                        fHistoTruePi0CaloPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloPhoton_InvMass_Pt","ESD_TruePi0CaloPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloPhotonInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma #gamma");
+                                       fHistoTruePi0CaloPhotonInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloPhotonInvMassPt[iCut]);
+                                       
                                        fHistoTrueEtaCaloPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloPhoton_InvMass_Pt","ESD_TrueEtaCaloPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloPhotonInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma #gamma");
+                                       fHistoTrueEtaCaloPhotonInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloPhotonInvMassPt[iCut]);
+                                       
                                        fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhoton_InvMass_Pt","ESD_TruePi0CaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma #gamma_{conv}");
+                                       fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]);
+                                       
                                        fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt","ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma #gamma_{conv,matched}");
+                                       fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut]);
+                                       
                                        fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt","ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma #gamma_{conv}");
+                                       fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]);
+                                       
                                        fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt","ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma #gamma_{conv,matched}");
+                                       fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut]);
 
                                        fHistoTruePi0CaloElectronInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloElectron_InvMass_Pt","ESD_TruePi0CaloElectron_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloElectronInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma e^{#pm}");
+                                       fHistoTruePi0CaloElectronInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloElectronInvMassPt[iCut]);
                                        fHistoTrueEtaCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloElectron_InvMass_Pt","ESD_TrueEtaCaloElectron_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloElectronInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma e^{#pm}");
+                                       fHistoTrueEtaCaloElectronInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloElectronInvMassPt[iCut]);
 
                                        fHistoTruePi0CaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedCluster_InvMass_Pt","ESD_TruePi0CaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloMergedClusterInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma merged cluster");
+                                       fHistoTruePi0CaloMergedClusterInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterInvMassPt[iCut]);
                                        fHistoTrueEtaCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedCluster_InvMass_Pt","ESD_TrueEtaCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloMergedClusterInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma merged cluster");
+                                       fHistoTrueEtaCaloMergedClusterInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterInvMassPt[iCut]);
 
                                        fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloEMNonLeading_InvMass_Pt","ESD_TrueMotherCaloEMNonLeading_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2}) #gamma cluster no leading EM");
+                                       fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut]->SetYTitle("#pair p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut]);
                                        fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt","ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut]->SetXTitle("M_{inv,#pi^{0}} (GeV/c^{2}) #gamma merged cluster, part conv");
+                                       fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut]->SetYTitle("#pi^{0} p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut]);
                                        fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt","ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut]->SetXTitle("M_{inv,#eta} (GeV/c^{2}) #gamma merged cluster, part conv");
+                                       fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut]->SetYTitle("#eta p_{T} (GeV/c)");
                                        fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut]);
                                        
                                        fHistoTruePrimaryPi0MCPtResolPt[iCut] = new TH2F("ESD_TruePrimaryPi0_MCPt_ResolPt","ESD_TruePrimaryPi0_ResolPt_MCPt",500,0.03,25,1000,-1.,1.);
+                                       fHistoTruePrimaryPi0MCPtResolPt[iCut]->SetXTitle("#pi^{0} p_{T,MC} (GeV/c)");
+                                       fHistoTruePrimaryPi0MCPtResolPt[iCut]->SetYTitle("#pi^{0} (p_{T,rec}-p_{T,MC})/p_{T,MC} ()");   
                                        fHistoTruePrimaryPi0MCPtResolPt[iCut]->Sumw2();
                                        SetLogBinningXTH2(fHistoTruePrimaryPi0MCPtResolPt[iCut]);
                                        fTrueList[iCut]->Add(fHistoTruePrimaryPi0MCPtResolPt[iCut]);
+                                       
                                        fHistoTruePrimaryEtaMCPtResolPt[iCut]  = new TH2F("ESD_TruePrimaryEta_MCPt_ResolPt","ESD_TruePrimaryEta_ResolPt_MCPt",500,0.03,25,1000,-1.,1.);
+                                       fHistoTruePrimaryEtaMCPtResolPt[iCut]->SetXTitle("#eta p_{T,MC} (GeV/c)");
+                                       fHistoTruePrimaryEtaMCPtResolPt[iCut]->SetYTitle("#eta (p_{T,rec}-p_{T,MC})/p_{T,MC} ()");      
                                        fHistoTruePrimaryEtaMCPtResolPt[iCut]->Sumw2();
                                        SetLogBinningXTH2(fHistoTruePrimaryEtaMCPtResolPt[iCut]);
                                        fTrueList[iCut]->Add(fHistoTruePrimaryEtaMCPtResolPt[iCut]);
+                                       
                                        fHistoTrueBckGGInvMassPt[iCut] = new TH2F("ESD_TrueBckGG_InvMass_Pt","ESD_TrueBckGG_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueBckGGInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2}) #gamma #gamma no signal");
+                                       fHistoTrueBckGGInvMassPt[iCut]->SetYTitle("#pair p_{T} (GeV/c)");                                       
                                        fTrueList[iCut]->Add(fHistoTrueBckGGInvMassPt[iCut]);
                                        fHistoTrueBckContInvMassPt[iCut] = new TH2F("ESD_TrueBckCont_InvMass_Pt","ESD_TrueBckCont_InvMass_Pt",800,0,0.8,250,0,25);
+                                       fHistoTrueBckContInvMassPt[iCut]->SetXTitle("M_{inv} (GeV/c^{2}) contamination");
+                                       fHistoTrueBckContInvMassPt[iCut]->SetYTitle("#pair p_{T} (GeV/c)");                                     
                                        fTrueList[iCut]->Add(fHistoTrueBckContInvMassPt[iCut]);
                                        fHistoTrueK0sWithPi0DaughterMCPt[iCut] = new TH1F("ESD_TrueK0sWithPi0Daughter_MCPt","ESD_TrueK0sWithPi0Daughter_MCPt",250,0,25);
+                                       fHistoTrueK0sWithPi0DaughterMCPt[iCut]->SetXTitle("K^{0}_{s} p_{MC,T} (GeV/c) for K^{0}_{s} where #pi^{0} rec ");                       
                                        fTrueList[iCut]->Add(fHistoTrueK0sWithPi0DaughterMCPt[iCut]);
                                        fHistoTrueEtaWithPi0DaughterMCPt[iCut] = new TH1F("ESD_TrueEtaWithPi0Daughter_MCPt","ESD_TrueEtaWithPi0Daughter_MCPt",250,0,25);
+                                       fHistoTrueEtaWithPi0DaughterMCPt[iCut]->SetXTitle("#eta p_{MC,T} (GeV/c) for #eta where #pi^{0} rec ");                 
                                        fTrueList[iCut]->Add(fHistoTrueEtaWithPi0DaughterMCPt[iCut]);
                                        fHistoTrueLambdaWithPi0DaughterMCPt[iCut] = new TH1F("ESD_TrueLambdaWithPi0Daughter_MCPt","ESD_TrueLambdaWithPi0Daughter_MCPt",250,0,25);
+                                       fHistoTrueLambdaWithPi0DaughterMCPt[iCut]->SetXTitle("#Lambda p_{MC,T} (GeV/c) for #Lambda where #pi^{0} rec ");                        
                                        fTrueList[iCut]->Add(fHistoTrueLambdaWithPi0DaughterMCPt[iCut]);
           
                                        fHistoTruePi0PtY[iCut] = new TH2F("ESD_TruePi0_Pt_Y","ESD_TruePi0_Pt_Y",150,0.03,15.,150,-1.5,1.5);
+                                       fHistoTruePi0PtY[iCut]->SetYTitle("Y_{#pi^{0}}");
+                                       fHistoTruePi0PtY[iCut]->SetXTitle("#pi^{0} p_{T} (GeV/c)");                                     
                                        SetLogBinningXTH2(fHistoTruePi0PtY[iCut]);
                                        fTrueList[iCut]->Add(fHistoTruePi0PtY[iCut]);
                                        fHistoTrueEtaPtY[iCut] = new TH2F("ESD_TrueEta_Pt_Y","ESD_TrueEta_Pt_Y",150,0.03,15.,150,-1.5,1.5);
+                                       fHistoTrueEtaPtY[iCut]->SetYTitle("Y_{#eta}");
+                                       fHistoTrueEtaPtY[iCut]->SetXTitle("#eta p_{T} (GeV/c)");                                        
                                        SetLogBinningXTH2(fHistoTrueEtaPtY[iCut]);
                                        fTrueList[iCut]->Add(fHistoTrueEtaPtY[iCut]);
                                        fHistoTruePi0PtAlpha[iCut] = new TH2F("ESD_TruePi0_Pt_Alpha","ESD_TruePi0_Pt_Alpha",150,0.03,15.,100,0,1);
+                                       fHistoTruePi0PtAlpha[iCut]->SetYTitle("#alpha_{#pi^{0}}");
+                                       fHistoTruePi0PtAlpha[iCut]->SetXTitle("#pi^{0} p_{T} (GeV/c)");         
                                        SetLogBinningXTH2(fHistoTruePi0PtAlpha[iCut]);
                                        fTrueList[iCut]->Add(fHistoTruePi0PtAlpha[iCut]);
                                        fHistoTrueEtaPtAlpha[iCut] = new TH2F("ESD_TrueEta_Pt_Alpha","ESD_TrueEta_Pt_Alpha",150,0.03,15.,100,0,1);
+                                       fHistoTrueEtaPtAlpha[iCut]->SetYTitle("#alpha_{#eta}");
+                                       fHistoTrueEtaPtAlpha[iCut]->SetXTitle("#eta p_{T} (GeV/c)");            
                                        SetLogBinningXTH2(fHistoTrueEtaPtAlpha[iCut]);
                                        fTrueList[iCut]->Add(fHistoTrueEtaPtAlpha[iCut]);
                                        
                                        fHistoTruePi0PtOpenAngle[iCut] = new TH2F("ESD_TruePi0_Pt_OpenAngle","ESD_TruePi0_Pt_OpenAngle",150,0.03,15.,200,0,2*TMath::Pi());
+                                       fHistoTruePi0PtOpenAngle[iCut]->SetYTitle("#theta_{#pi^{0}}");
+                                       fHistoTruePi0PtOpenAngle[iCut]->SetXTitle("#pi^{0} p_{T} (GeV/c)");
                                        SetLogBinningXTH2(fHistoTruePi0PtOpenAngle[iCut]);
                                        fTrueList[iCut]->Add(fHistoTruePi0PtOpenAngle[iCut]);
                                        fHistoTrueEtaPtOpenAngle[iCut] = new TH2F("ESD_TrueEta_Pt_OpenAngle","ESD_TrueEta_Pt_OpenAngle",150,0.03,15.,200,0,2*TMath::Pi());
+                                       fHistoTrueEtaPtOpenAngle[iCut]->SetYTitle("#theta_{#eta}");
+                                       fHistoTrueEtaPtOpenAngle[iCut]->SetXTitle("#eta p_{T} (GeV/c)");
                                        SetLogBinningXTH2(fHistoTrueEtaPtOpenAngle[iCut]);
                                        fTrueList[iCut]->Add(fHistoTrueEtaPtOpenAngle[iCut]);
                                        
-                                       fHistoTrueMotherPi0ConvPhotonEtaPhi[iCut] = new TH2F("ESD_TrueMotherPi0ConvPhoton_Eta_Phi","ESD_TrueMotherPi0ConvPhoton_Eta_Phi",600,0,2*TMath::Pi(),400,-2,2);
+                                       fHistoTrueMotherPi0ConvPhotonEtaPhi[iCut] = new TH2F("ESD_TrueMotherPi0ConvPhoton_Eta_Phi","conv photons for true #pi^{0}",600,0,2*TMath::Pi(),400,-2,2);
+                                       fHistoTrueMotherPi0ConvPhotonEtaPhi[iCut]->SetXTitle("#phi_{#gamma_{conv}} (rad)");
+                                       fHistoTrueMotherPi0ConvPhotonEtaPhi[iCut]->SetYTitle("#eta_{#gamma_{conv}}");
                                        fTrueList[iCut]->Add(fHistoTrueMotherPi0ConvPhotonEtaPhi[iCut]);
-                                       fHistoTrueMotherEtaConvPhotonEtaPhi[iCut] = new TH2F("ESD_TrueMotherEtaConvPhoton_Eta_Phi","ESD_TrueMotherEtaConvPhoton_Eta_Phi",600,0,2*TMath::Pi(),400,-2,2);
+                                       fHistoTrueMotherEtaConvPhotonEtaPhi[iCut] = new TH2F("ESD_TrueMotherEtaConvPhoton_Eta_Phi","conv photons for true #eta",600,0,2*TMath::Pi(),400,-2,2);
+                                       fHistoTrueMotherEtaConvPhotonEtaPhi[iCut]->SetXTitle("#phi_{#gamma_{conv}} (rad)");
+                                       fHistoTrueMotherEtaConvPhotonEtaPhi[iCut]->SetYTitle("#eta_{#gamma_{conv}}");
                                        fTrueList[iCut]->Add(fHistoTrueMotherEtaConvPhotonEtaPhi[iCut]);
 
                                }
@@ -1400,6 +1533,8 @@ void AliAnalysisTaskGammaConvCalo::UserExec(Option_t *)
 
                if(fIsMC){
                        // Process MC Particle
+                       fStringRecTruePi0s[iCut] = "";
+                       fStringRecTrueEtas[iCut] = "";
                        if(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetSignalRejection() != 0){
                                if(fInputEvent->IsA()==AliESDEvent::Class()){
                                ((AliConvEventCuts*)fEventCutArray->At(iCut))->GetNotRejectedParticles(((AliConvEventCuts*)fEventCutArray->At(iCut))->GetSignalRejection(),
@@ -1425,10 +1560,10 @@ void AliAnalysisTaskGammaConvCalo::UserExec(Option_t *)
                        }
                }
                if(fIsMC){
-               if(fInputEvent->IsA()==AliESDEvent::Class())
-                       ProcessMCParticles();
-               if(fInputEvent->IsA()==AliAODEvent::Class())
-                       ProcessAODMCParticles();
+                       if(fInputEvent->IsA()==AliESDEvent::Class())
+                               ProcessMCParticles();
+                       if(fInputEvent->IsA()==AliAODEvent::Class())
+                               ProcessAODMCParticles();
                }
                
                // it is in the loop to have the same conversion cut string (used also for MC stuff that should be same for V0 and Cluster)
@@ -1466,6 +1601,13 @@ void AliAnalysisTaskGammaConvCalo::UserExec(Option_t *)
                                fBGClusHandlerRP[iCut]->AddEvent(fClusterCandidates,fInputEvent); // Store Event for mixed Events
                        }
                }
+               
+               if(fIsMC && fInputEvent->IsA()==AliAODEvent::Class()){
+                       ProcessConversionPhotonsForMissingTagsAOD(); //Count missing tags
+               } else if (fIsMC && fInputEvent->IsA()==AliESDEvent::Class()){  
+                       ProcessConversionPhotonsForMissingTags(); //Count missing tags
+               }
+               
                if(((AliConversionMesonCuts*)fMesonCutArray->At(iCut))->UseMCPSmearing() && fIsMC){
                        for(Int_t gamma=0;gamma<fGammaCandidates->GetEntries();gamma++){ // Smear the AODPhotons in MC
                        ((AliAODConversionPhoton*)fGammaCandidates->At(gamma))->SetPx(fUnsmearedPx[gamma]); // Reset Unsmeared Momenta
@@ -1871,6 +2013,7 @@ void AliAnalysisTaskGammaConvCalo::ProcessPhotonCandidates()
        GammaCandidatesStepTwo = 0x0;
   
 }
+
 //________________________________________________________________________
 void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidatesAOD(AliAODConversionPhoton *TruePhotonCandidate)
 {
@@ -1958,11 +2101,10 @@ void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidatesAOD(AliAODConversi
                                fCharPhotonMCInfo = 3;
                        }
                }
-       }  
-    if( ((AliAODMCParticle*)AODMCTrackArray->At(Photon->GetMother()))->GetPdgCode() == 111 ){
-              fHistoTrueConvPi0GammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
-    }
+       }
+       TruePhotonCandidate->SetIsTrueConvertedPhoton();
 }
+
 //________________________________________________________________________
 void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
 {
@@ -2015,11 +2157,9 @@ void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidates(AliAODConversionP
                        fCharPhotonMCInfo = 6;
                        fHistoTruePrimaryConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
                        fHistoTruePrimaryConvGammaESDPtMCPt[fiCut]->Fill(TruePhotonCandidate->Pt(),Photon->Pt()); // Allways Filled
-               
                }
                // (Not Filled for i6, Extra Signal Gamma (parambox) are secondary)
-       }
-       else{
+       } else {
                if(fIsFromMBHeader){
                        fCharPhotonMCInfo = 2;
                        fHistoTrueSecondaryConvGammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
@@ -2039,15 +2179,7 @@ void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidates(AliAODConversionP
                        }
                }
        }
-
-       // pi0 photon
-       //Bool_t bpi0 = 0;
-       Int_t imother = Photon->GetMother(0);
-       if(imother > -1){
-               AliMCParticle* McMother = static_cast<AliMCParticle*>(fMCEvent->GetTrack(imother));
-               //cout << fMCEvent->GetRunNumber() << " " << imother << " " << fMCEvent->GetNumberOfTracks() << endl;
-               if(McMother->PdgCode() == 111) fHistoTrueConvPi0GammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
-       }
+       TruePhotonCandidate->SetIsTrueConvertedPhoton();
        return;
 }
 //________________________________________________________________________
@@ -2470,24 +2602,16 @@ void AliAnalysisTaskGammaConvCalo::CalculatePi0Candidates(){
 void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, Bool_t matched)
 {
        // Process True Mesons
-       AliStack *MCStack = fMCEvent->Stack();
        if(TrueGammaCandidate0->GetV0Index()<fInputEvent->GetNumberOfV0s()){
                Bool_t isTruePi0 = kFALSE;
                Bool_t isTrueEta = kFALSE;
-               Int_t gamma0MCLabel = TrueGammaCandidate0->GetMCParticleLabel(MCStack);
+               Int_t gamma0MCLabel = -1;
                Int_t gamma0MotherLabel = -1;
-               if(gamma0MCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother
-                       // Daughters Gamma 0
-                       TParticle * negativeMC = (TParticle*)TrueGammaCandidate0->GetNegativeMCDaughter(MCStack);
-                       TParticle * positiveMC = (TParticle*)TrueGammaCandidate0->GetPositiveMCDaughter(MCStack);
-                       TParticle * gammaMC0 = (TParticle*)MCStack->Particle(gamma0MCLabel);
-                       if(abs(negativeMC->GetPdgCode())==11 && abs(positiveMC->GetPdgCode())==11){  // Electrons ...
-                               if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ...
-                                       if(gammaMC0->GetPdgCode() == 22){ // ... with Gamma Mother
-                                               gamma0MotherLabel=gammaMC0->GetFirstMother();
-                                       }
-                               }
-                       }
+               if (TrueGammaCandidate0->IsTrueConvertedPhoton()){
+                       gamma0MCLabel = TrueGammaCandidate0->GetMCParticleLabel(fMCStack);
+                       TParticle * gammaMC0 = (TParticle*)fMCStack->Particle(gamma0MCLabel);
+                       gamma0MotherLabel=gammaMC0->GetFirstMother();
+       
                }
                if (!TrueGammaCandidate1->GetIsCaloPhoton()) AliFatal("CaloPhotonFlag has not been set. Aborting");
                
@@ -2497,13 +2621,13 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
 
                if(gamma1MCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother
                        // Daughters Gamma 1
-                       TParticle * gammaMC1 = (TParticle*)MCStack->Particle(gamma1MCLabel);
+                       TParticle * gammaMC1 = (TParticle*)fMCStack->Particle(gamma1MCLabel);
                        if (TrueGammaCandidate1->IsLargestComponentPhoton() || TrueGammaCandidate1->IsLargestComponentElectron()){              // largest component is electro magnetic
                                // get mother of interest (pi0 or eta)
                                if (TrueGammaCandidate1->IsLargestComponentPhoton()){                                                                                                           // for photons its the direct mother 
                                        gamma1MotherLabel=gammaMC1->GetMother(0);
                                } else if (TrueGammaCandidate1->IsLargestComponentElectron()){                                                                                          // for electrons its either the direct mother or for conversions the grandmother
-                                       if (TrueGammaCandidate1->IsConversion()) gamma1MotherLabel=MCStack->Particle(gammaMC1->GetMother(0))->GetMother(0);
+                                       if (TrueGammaCandidate1->IsConversion()) gamma1MotherLabel=fMCStack->Particle(gammaMC1->GetMother(0))->GetMother(0);
                                        else gamma1MotherLabel=gammaMC1->GetMother(0); 
                                }
                        } else {
@@ -2512,10 +2636,10 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
                }
                                
                if(gamma0MotherLabel>=0 && gamma0MotherLabel==gamma1MotherLabel){
-                       if(((TParticle*)MCStack->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
+                       if(((TParticle*)fMCStack->Particle(gamma1MotherLabel))->GetPdgCode() == 111){
                                isTruePi0=kTRUE;
                        }
-                       if(((TParticle*)MCStack->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
+                       if(((TParticle*)fMCStack->Particle(gamma1MotherLabel))->GetPdgCode() == 221){
                                isTrueEta=kTRUE;
                        }
                }
@@ -2572,39 +2696,38 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
                                        }
                                }
                                
-                               if(gamma0MotherLabel >= MCStack->GetNprimary()){ // Secondary Meson
-                                       Int_t secMotherLabel = ((TParticle*)MCStack->Particle(gamma0MotherLabel))->GetMother(0);
+                               if(gamma0MotherLabel >= fMCStack->GetNprimary()){ // Secondary Meson
+                                       Int_t secMotherLabel = ((TParticle*)fMCStack->Particle(gamma0MotherLabel))->GetMother(0);
                                        Float_t weightedSec= 1;
-                                       if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(secMotherLabel, fMCStack, fInputEvent) && MCStack->Particle(secMotherLabel)->GetPdgCode()==310){
+                                       if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(secMotherLabel, fMCStack, fInputEvent) && fMCStack->Particle(secMotherLabel)->GetPdgCode()==310){
                                                weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt
                                                //cout << "MC input \t"<<i << "\t" <<  particle->Pt()<<"\t"<<weighted << endl;
                                        }
                                        if (isTruePi0){
                                                fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
                                                fHistoTrueSecondaryPi0PhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weightedSec);
-                                       }       
-                                       if (isTrueEta){
-                                               fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                                               fHistoTrueSecondaryEtaPhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weightedSec);
+                                               if(CheckIfContainedInString(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){
+                                                       fHistoTrueSecondaryPi0DCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weightedSec);
+                                               }       
                                        }       
                                        if (secMotherLabel >-1){
-                                               if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0 ){
+                                               if(fMCStack->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0 ){
                                                        fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                                                       if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt());
+                                                       if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(fMCStack->Particle(secMotherLabel)->Pt());
                                                }
-                                               if(MCStack->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){
+                                               if(fMCStack->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){
                                                        fHistoTrueSecondaryPi0FromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                                                       if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt());
+                                                       if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(fMCStack->Particle(secMotherLabel)->Pt());
                                                }
-                                               if(MCStack->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){
+                                               if(fMCStack->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){
                                                        fHistoTrueSecondaryPi0FromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                                                       if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt());
+                                                       if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(fMCStack->Particle(secMotherLabel)->Pt());
                                                }
                                        }
                                } else { // Only primary pi0 for efficiency calculation
                                        Float_t weighted= 1;
                                        if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gamma1MotherLabel, fMCStack, fInputEvent)){
-                                               if (((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt()>0.005){
+                                               if (((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt()>0.005){
                                                        weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gamma1MotherLabel, fMCStack, fInputEvent);
                                                        //                      cout << "rec \t " <<gamma1MotherLabel << "\t" <<  weighted << endl;
                                                }
@@ -2614,19 +2737,26 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
                                                fHistoTruePrimaryPi0PhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weighted);
                                                fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                                fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);
+                                               if(CheckIfContainedInString(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){
+                                                       fHistoTruePrimaryPi0DCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weighted);
+                                               }       
+
                                        } else if (isTrueEta) {
                                                fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);
                                                fHistoTruePrimaryEtaPhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weighted);
                                                fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                                fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);
+                                               if(CheckIfContainedInString(fStringRecTrueEtas[fiCut],gamma0MotherLabel)){
+                                                       fHistoTruePrimaryEtaDCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weighted);
+                                               }                                                       
                                        }       
                                                
                                        if (fDoMesonQA > 0){
                                                if(isTruePi0){ // Only primary pi0 for resolution
-                                                       fHistoTruePrimaryPi0MCPtResolPt[fiCut]->Fill(((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt(),(Pi0Candidate->Pt()-((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt())/((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt(),weighted);
+                                                       fHistoTruePrimaryPi0MCPtResolPt[fiCut]->Fill(((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt(),(Pi0Candidate->Pt()-((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt())/((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt(),weighted);
                                                }
                                                if (isTrueEta){ // Only primary eta for resolution
-                                                       fHistoTruePrimaryEtaMCPtResolPt[fiCut]->Fill(((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt(),(Pi0Candidate->Pt()-((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt())/((TParticle*)MCStack->Particle(gamma1MotherLabel))->Pt(),weighted);
+                                                       fHistoTruePrimaryEtaMCPtResolPt[fiCut]->Fill(((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt(),(Pi0Candidate->Pt()-((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt())/((TParticle*)fMCStack->Particle(gamma1MotherLabel))->Pt(),weighted);
                                                }
                                        }
                                }
@@ -2640,6 +2770,13 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo
                                }
                        }
                }
+               if (isTrueEta && !matched){
+                       fStringRecTrueEtas[fiCut].Append(Form("%i,",gamma0MotherLabel));
+               }
+               if (isTruePi0 && !matched){
+                       fStringRecTruePi0s[fiCut].Append(Form("%i,",gamma0MotherLabel));
+               }       
+
        }
 }
 //______________________________________________________________________
@@ -2659,22 +2796,13 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio
        if(!positiveMC||!negativeMC)
                return;
        
-       if(positiveMC->GetMother()>-1&&(negativeMC->GetMother() == positiveMC->GetMother())){
+       if (TrueGammaCandidate0->IsTrueConvertedPhoton()){
                gamma0MCLabel = positiveMC->GetMother();
-       }
-       
-       if(gamma0MCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother
-               // Daughters Gamma 0
                AliAODMCParticle * gammaMC0 = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MCLabel));
-               if(abs(negativeMC->GetPdgCode())==11 && abs(positiveMC->GetPdgCode())==11){  // Electrons ...
-                       if(((positiveMC->GetMCProcessCode())) == 5 && ((negativeMC->GetMCProcessCode())) == 5){ // ... From Conversion ...
-                               if(gammaMC0->GetPdgCode() == 22){ // ... with Gamma Mother
-                               gamma0MotherLabel=gammaMC0->GetMother();
-                               }
-                       }
-               }
+               gamma0MotherLabel=gammaMC0->GetMother();
        }       
 
+       if (!TrueGammaCandidate1->GetIsCaloPhoton()) AliFatal("CaloPhotonFlag has not been set. Aborting");
        Int_t gamma1MCLabel = TrueGammaCandidate1->GetCaloPhotonMCLabel(0);     // get most probable MC label
        Int_t gamma1MotherLabel = -1;
                // check if 
@@ -2766,11 +2894,10 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio
                                if (isTruePi0){
                                        fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
                                        fHistoTrueSecondaryPi0PhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weightedSec);
+                                       if(CheckIfContainedInString(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){
+                                               fHistoTrueSecondaryPi0DCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weightedSec);
+                                       }                                               
                                }       
-                               if (isTrueEta){
-                                       fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
-                                       fHistoTrueSecondaryEtaPhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weightedSec);
-                               }
                                if (secMotherLabel >-1){
                                        if(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0){
                                                fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec);
@@ -2798,11 +2925,17 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio
                                        fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                        fHistoTruePrimaryPi0PhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weighted);
                                        fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);
+                                       if(CheckIfContainedInString(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){
+                                               fHistoTruePrimaryPi0DCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weighted);
+                                       }                                               
                                } else if (isTrueEta){
                                        fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);
                                        fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt());
                                        fHistoTruePrimaryEtaPhotonPairPtconv[fiCut]->Fill(Pi0Candidate->M(),TrueGammaCandidate0->Pt(),weighted);
                                        fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted);                                     
+                                       if(CheckIfContainedInString(fStringRecTrueEtas[fiCut],gamma0MotherLabel)){
+                                               fHistoTruePrimaryEtaDCPtconv[fiCut]->Fill(TrueGammaCandidate0->Pt(),weighted);
+                                       }                                                                                               
                                }       
                                if (fDoMesonQA > 0){
                                        if(isTruePi0){ // Only primary pi0 for resolution
@@ -2826,6 +2959,16 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio
                        }
                }
        }
+       
+       if (isTrueEta && !matched){
+               fStringRecTrueEtas[fiCut].Append(Form("%i,",gamma0MotherLabel));
+       }
+       if (isTruePi0 && !matched){
+               fStringRecTruePi0s[fiCut].Append(Form("%i,",gamma0MotherLabel));
+       }       
+
+
+       
 }
 
 //________________________________________________________________________
@@ -2907,7 +3050,7 @@ void AliAnalysisTaskGammaConvCalo::CalculateBackground(){
                                }
                        }
                }
-       }
+       }       
 }
 
 //________________________________________________________________________
@@ -3167,3 +3310,136 @@ Int_t AliAnalysisTaskGammaConvCalo::GetSourceClassification(Int_t daughter, Int_
        return 15;
   
 }
+
+//_________________________________________________________________________________
+Bool_t AliAnalysisTaskGammaConvCalo::CheckIfContainedInString(TString input, Int_t tobechecked){
+       TObjArray *arr = input.Tokenize(",");
+       for (Int_t i = 0; i < arr->GetEntriesFast();i++){
+               TString tempStr = ((TObjString*)arr->At(i))->GetString();
+               if (tempStr.Atoi() == tobechecked) return kTRUE;
+       }       
+       return kFALSE;
+}
+
+//_________________________________________________________________________________
+Bool_t AliAnalysisTaskGammaConvCalo::CheckIfContainedInStringAndAppend(TString &input, Int_t tobechecked){
+       TObjArray *arr = input.Tokenize(",");
+       Bool_t isContained = kFALSE;
+       for (Int_t i = 0; i < arr->GetEntriesFast();i++){
+               TString tempStr = ((TObjString*)arr->At(i))->GetString();
+               if (tempStr.Atoi() == tobechecked) isContained= kTRUE;
+       }       
+       if (!isContained)input.Append(Form("%i,",tobechecked)); 
+       return isContained;
+}
+
+//_________________________________________________________________________________
+void AliAnalysisTaskGammaConvCalo::ProcessConversionPhotonsForMissingTags (){
+
+       if (!fMCStack) return;
+
+       for(Int_t firstGammaIndex=0;firstGammaIndex<fGammaCandidates->GetEntries();firstGammaIndex++){
+               AliAODConversionPhoton *gamma0=dynamic_cast<AliAODConversionPhoton*>(fGammaCandidates->At(firstGammaIndex));
+               if (gamma0->IsTrueConvertedPhoton()){
+                       Int_t gamma0MotherLabel = -1;
+                       Int_t gamma0MCLabel = gamma0->GetMCParticleLabel(fMCStack);
+                       if(gamma0MCLabel != -1){ 
+                               TParticle * gammaMC0 = (TParticle*)fMCStack->Particle(gamma0MCLabel);
+                               gamma0MotherLabel=gammaMC0->GetFirstMother();
+                               if (gamma0MotherLabel>-1){
+                                       if(((TParticle*)fMCStack->Particle(gamma0MotherLabel))->GetPdgCode() == 111){
+                                               if (!CheckIfContainedInStringAndAppend(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){ 
+                                                       if (gamma0MotherLabel >= fMCStack->GetNprimary()){
+                                                               Int_t secMotherLabel = ((TParticle*)fMCStack->Particle(gamma0MotherLabel))->GetMother(0);
+                                                               Float_t weightedSec= 1;
+                                                               if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(secMotherLabel, fMCStack, fInputEvent) && fMCStack->Particle(secMotherLabel)->GetPdgCode()==310){
+                                                                       weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt
+                                                               }
+                                                               fHistoTrueSecondaryPi0MissingPtconv[fiCut]->Fill(gamma0->Pt(),weightedSec);
+                                                       } else {
+                                                               Float_t weighted= 1;
+                                                               if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gamma0MotherLabel, fMCStack, fInputEvent)){
+                                                                       if (((TParticle*)fMCStack->Particle(gamma0MotherLabel))->Pt()>0.005){
+                                                                               weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gamma0MotherLabel, fMCStack, fInputEvent);
+                                                                       }
+                                                               }
+                                                               fHistoTruePrimaryPi0MissingPtconv[fiCut]->Fill(gamma0->Pt(),weighted);          
+                                                       }       
+                                               }
+                                       } else if(((TParticle*)fMCStack->Particle(gamma0MotherLabel))->GetPdgCode() == 221){
+                                               if (!CheckIfContainedInStringAndAppend(fStringRecTrueEtas[fiCut],gamma0MotherLabel)){
+                                                       Float_t weighted= 1;
+                                                       if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gamma0MotherLabel, fMCStack, fInputEvent)){
+                                                               if (((TParticle*)fMCStack->Particle(gamma0MotherLabel))->Pt()>0.005){
+                                                                       weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gamma0MotherLabel, fMCStack, fInputEvent);
+                                                               }
+                                                       }
+                                                       fHistoTruePrimaryEtaMissingPtconv[fiCut]->Fill(gamma0->Pt(),weighted);
+                                               }       
+                                       }       
+                               }
+                       }       
+               }       
+       }       
+       return;
+}
+
+//_________________________________________________________________________________
+void AliAnalysisTaskGammaConvCalo::ProcessConversionPhotonsForMissingTagsAOD (){
+
+       TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(fInputEvent->FindListObject(AliAODMCParticle::StdBranchName()));
+               
+       for(Int_t firstGammaIndex=0;firstGammaIndex<fGammaCandidates->GetEntries();firstGammaIndex++){
+               AliAODConversionPhoton *gamma0=dynamic_cast<AliAODConversionPhoton*>(fGammaCandidates->At(firstGammaIndex));
+
+               if (gamma0->IsTrueConvertedPhoton()){
+                       AliAODMCParticle *positiveMC = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0->GetMCLabelPositive()));
+                       AliAODMCParticle *negativeMC = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0->GetMCLabelNegative()));
+                       
+                       Int_t gamma0MCLabel = -1;
+                       Int_t gamma0MotherLabel = -1;
+                       if(!positiveMC||!negativeMC)
+                               return;
+                       
+                       if (gamma0->IsTrueConvertedPhoton()){
+                               gamma0MCLabel = positiveMC->GetMother();
+                               AliAODMCParticle * gammaMC0 = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MCLabel));
+                               gamma0MotherLabel=gammaMC0->GetMother();
+
+                               if (gamma0MotherLabel>-1){
+                                       if(((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 111){
+                                               if (!CheckIfContainedInStringAndAppend(fStringRecTruePi0s[fiCut],gamma0MotherLabel)){ 
+                                                       if (!(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MotherLabel))->IsPrimary())){
+                                                               Int_t secMotherLabel = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MotherLabel))->GetMother();
+                                                               Float_t weightedSec= 1;
+                                                               if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(secMotherLabel, 0x0, fInputEvent) && static_cast<AliAODMCParticle*>(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310){
+                                                                       weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, 0x0, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt
+                                                               }
+                                                               fHistoTrueSecondaryPi0MissingPtconv[fiCut]->Fill(gamma0->Pt(),weightedSec);
+                                                       } else {
+                                                               Float_t weighted= 1;
+                                                               if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gamma0MotherLabel, 0x0, fInputEvent)){
+                                                                       if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MotherLabel))->Pt()>0.005){
+                                                                               weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gamma0MotherLabel, 0x0, fInputEvent);
+                                                                       }
+                                                               }
+                                                               fHistoTruePrimaryPi0MissingPtconv[fiCut]->Fill(gamma0->Pt(),weighted);          
+                                                       }       
+                                               }
+                                       } else if(((AliAODMCParticle*)AODMCTrackArray->At(gamma0MotherLabel))->GetPdgCode() == 221){
+                                               if (!CheckIfContainedInStringAndAppend(fStringRecTrueEtas[fiCut],gamma0MotherLabel)){
+                                                       Float_t weighted= 1;
+                                                       if(((AliConvEventCuts*)fEventCutArray->At(fiCut))->IsParticleFromBGEvent(gamma0MotherLabel, 0x0, fInputEvent)){
+                                                               if (static_cast<AliAODMCParticle*>(AODMCTrackArray->At(gamma0MotherLabel))->Pt()>0.005){
+                                                                       weighted= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),gamma0MotherLabel, 0x0, fInputEvent);
+                                                               }
+                                                       }
+                                                       fHistoTruePrimaryEtaMissingPtconv[fiCut]->Fill(gamma0->Pt(),weighted);
+                                               }       
+                                       }       
+                               }
+                       }       
+               }       
+       }       
+       return;
+}      
\ No newline at end of file
index 591fe453263d84ad7616a5f2c0bce2b747fd3167..0ca75bb435c159a41ff1ccc95874b6ab0b672b3e 100644 (file)
@@ -36,7 +36,6 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                // base functions for selecting photon and meson candidates in reconstructed data
                void ProcessClusters();
                void ProcessPhotonCandidates();
-               void PhotonTagging();
                void CalculatePi0Candidates();
                
                // MC functions
@@ -50,6 +49,8 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                void ProcessTruePhotonCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
                void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, Bool_t matched);
                void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, Bool_t matched);
+               void ProcessConversionPhotonsForMissingTags();
+               void ProcessConversionPhotonsForMissingTagsAOD();
                
                // switches for additional analysis streams or outputs
                void SetDoMesonAnalysis(Bool_t flag){fDoMesonAnalysis = flag;}
@@ -94,6 +95,8 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                // Additional functions for convenience
                void SetLogBinningXTH2(TH2* histoRebin);
                Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode);
+               Bool_t CheckIfContainedInString(TString input, Int_t tobechecked);
+               Bool_t CheckIfContainedInStringAndAppend(TString &input, Int_t tobechecked);
        
        protected:
                AliV0ReaderV1                                           *fV0Reader;                                                     // basic photon Selection Task
@@ -233,7 +236,6 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
         TH2F                                **fHistoTrueMotherPi0ConvPhotonEtaPhi;             //! array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17 ,eta/phi of conversion photon
         TH2F                                **fHistoTrueMotherEtaConvPhotonEtaPhi;             //! array of histograms with invariant mass cut of 0.45 && pi0cand->M() < 0.65 ,eta/phi of conversion photon
                TH2F                                                            **fHistoTrueSecondaryPi0InvMassPt;                              //! array of histos with validated secondary mothers, invMass, pt
-               TH2F                                                            **fHistoTrueSecondaryEtaInvMassPt;                              //! array of histos with validated secondary mothers, invMass, pt
                TH2F                                                            **fHistoTrueSecondaryPi0FromK0sInvMassPt;               //! array of histos with validated secondary mothers from K0s, invMass, pt
                TH1F                                                            **fHistoTrueK0sWithPi0DaughterMCPt;                             //! array of histos with K0s with reconstructed pi0 as daughter, pt
                TH2F                                                            **fHistoTrueSecondaryPi0FromEtaInvMassPt;               //! array of histos with validated secondary mothers from eta, invMass, pt
@@ -278,10 +280,16 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                TH1F                                                            **fHistoTruePrimaryClusGammaPt;                                 //! array of histos with validated primary cluster, pt
                TH2F                                                            **fHistoTruePrimaryClusGammaESDPtMCPt;                  //! array of histos with validated primary cluster, rec Pt, MC pt
                TH2F                                                            **fHistoTruePrimaryPi0PhotonPairPtconv;                 //! array of histos with validated primary pi0's vs conversion photon pT
+               TH1F                                                            **fHistoTruePrimaryPi0DCPtconv;                                 //! array of histos with validated primary pi0's vs conversion photon pT, double counting
+               TH1F                                                            **fHistoTruePrimaryPi0MissingPtconv;                    //! array of histos with validated primary pi0's vs conversion photon pT, missing
                TH2F                                                            **fHistoTruePrimaryEtaPhotonPairPtconv;                 //! array of histos with validated primary eta's vs conversion photon pT
+               TH1F                                                            **fHistoTruePrimaryEtaDCPtconv;                                 //! array of histos with validated primary eta's vs conversion photon pT, double counting
+               TH1F                                                            **fHistoTruePrimaryEtaMissingPtconv;                    //! array of histos with validated primary eta's vs conversion photon pT, missing
                TH2F                                                            **fHistoTrueSecondaryPi0PhotonPairPtconv;               //! array of histos with validated secondary pi0's vs conversion photon pT
-               TH2F                                                            **fHistoTrueSecondaryEtaPhotonPairPtconv;               //! array of histos with validated secondary eta's vs conversion photon pT
-               
+               TH1F                                                            **fHistoTrueSecondaryPi0DCPtconv;                               //! array of histos with validated secondary pi0's vs conversion photon pT, double counting
+               TH1F                                                            **fHistoTrueSecondaryPi0MissingPtconv;                  //! array of histos with validated secondary pi0's vs conversion photon pT, missing
+               TString                                                         *fStringRecTruePi0s;                                                    //! array of strings containing the stack position of the reconstructed validated pi0
+               TString                                                         *fStringRecTrueEtas;                                                    //! array of strings containing the stack position of the reconstructed validated eta
                // event histograms
                TH1I                                                            **fHistoNEvents;                                                                //! array of histos with event information
                TH1I                                                            **fHistoNGoodESDTracks;                                                 //! array of histos with number of good tracks (2010 Standard track cuts)
@@ -319,7 +327,7 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE {
                AliAnalysisTaskGammaConvCalo(const AliAnalysisTaskGammaConvCalo&); // Prevent copy-construction
                AliAnalysisTaskGammaConvCalo &operator=(const AliAnalysisTaskGammaConvCalo&); // Prevent assignment
 
-               ClassDef(AliAnalysisTaskGammaConvCalo, 4);
+               ClassDef(AliAnalysisTaskGammaConvCalo, 5);
 };
 
 #endif