]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added more MC related histograms, in case of SS analysis and photon originator, check...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Jul 2012 17:35:51 +0000 (17:35 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Jul 2012 17:35:51 +0000 (17:35 +0000)
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.h

index d34a371d270d94bb9ea47165a0b68e5be359ab4a..34d6f401f1813eee8d50671d018981c99d33d73c 100755 (executable)
@@ -66,8 +66,10 @@ AliAnaPi0EbE::AliAnaPi0EbE() :
     fhDispEtaPhiDiffE(0),          fhSphericityE(0),             fhAsymmetryE(0), 
 
     // MC histos
-    fhPtMCNo(0),                   fhPhiMCNo(0),                 fhEtaMCNo(0), 
-    fhPtMC(0),                     fhPhiMC(0),                   fhEtaMC(0),
+    fhMCPt(),                      fhMCPhi(),                    fhMCEta(),
+    fhMCPi0DecayPt(0),             fhMCPi0DecayPtFraction(0),
+    fhMCEtaDecayPt(0),             fhMCEtaDecayPtFraction(0),
+    fhMCOtherDecayPt(0),           
     fhMassPairMCPi0(0),            fhMassPairMCEta(0),
     fhAnglePairMCPi0(0),           fhAnglePairMCEta(0),
     // Weight studies
@@ -83,6 +85,9 @@ AliAnaPi0EbE::AliAnaPi0EbE() :
   
   for(Int_t i = 0; i < 6; i++)
   {
+    fhMCPt             [i] = 0;
+    fhMCPhi            [i] = 0;                   
+    fhMCEta            [i] = 0;
     fhEMCLambda0       [i] = 0;
     fhEMCLambda0NoTRD  [i] = 0;
     fhEMCLambda0FracMaxCellCut[i]= 0;
@@ -313,33 +318,7 @@ void AliAnaPi0EbE::FillSelectedClusterHistograms(AliVCluster* cluster,
   
   if(IsDataMC()) 
   {
-    Int_t mcIndex = 0;
-    
-    if       ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0)  )
-    {
-      mcIndex = kmcPi0 ;      
-    }//pi0
-    else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)  )
-    {
-      mcIndex = kmcEta ; 
-    }//eta          
-    else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
-               GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
-    {
-      mcIndex = kmcConversion ; 
-    }//conversion photon
-    else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
-    {
-      mcIndex = kmcPhoton ; 
-    }//photon   no conversion
-    else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
-    {
-      mcIndex = kmcElectron ; 
-    }//electron
-    else 
-    {
-      mcIndex = kmcHadron ; 
-    }//other particles 
+    Int_t mcIndex = GetMCIndex(tag);
     
     fhEMCLambda0[mcIndex]    ->Fill(e, l0);
     fhEMCLambda1[mcIndex]    ->Fill(e, l1);
@@ -488,95 +467,6 @@ TObjString * AliAnaPi0EbE::GetAnalysisCuts()
   return new TObjString(parList) ;
 }
 
-//__________________________________________________________________
-void AliAnaPi0EbE::HasPairSameMCMother(AliAODPWG4Particle * photon1, 
-                                       AliAODPWG4Particle * photon2, 
-                                       Int_t & label, Int_t & tag)
-{
-  // Check the labels of pare in case mother was same pi0 or eta
-  // Set the new AOD accordingly
-  
-  Int_t  label1 = photon1->GetLabel();
-  Int_t  label2 = photon2->GetLabel();
-  
-  if(label1 < 0 || label2 < 0 ) return ;
-  
-  //Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader(), photon1->GetInputFileIndex());
-  //Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(), photon2->GetInputFileIndex());
-  Int_t tag1 = photon1->GetTag();
-  Int_t tag2 = photon2->GetTag();
-
-  if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2);
-  if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) && 
-       GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay)    ) ||
-      (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) && 
-       GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCEtaDecay)    )
-     )
-  {
-    
-    //Check if pi0/eta mother is the same
-    if(GetReader()->ReadStack())
-    { 
-      if(label1>=0)
-      {
-        TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree
-        label1 = mother1->GetFirstMother();
-        //mother1 = GetMCStack()->Particle(label1);//pi0
-      }
-      if(label2>=0)
-      {
-        TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree
-        label2 = mother2->GetFirstMother();
-        //mother2 = GetMCStack()->Particle(label2);//pi0
-      }
-    } // STACK
-    else if(GetReader()->ReadAODMCParticles())
-    {//&& (input > -1)){
-      if(label1>=0)
-      {
-        AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(photon1->GetInputFileIndex()))->At(label1);//photon in kine tree
-        label1 = mother1->GetMother();
-        //mother1 = GetMCStack()->Particle(label1);//pi0
-      }
-      if(label2>=0)
-      {
-        AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(photon2->GetInputFileIndex()))->At(label2);//photon in kine tree
-        label2 = mother2->GetMother();
-        //mother2 = GetMCStack()->Particle(label2);//pi0
-      }
-    }// AOD
-    
-    //printf("mother1 %d, mother2 %d\n",label1,label2);
-    if( label1 == label2 && label1>=0 )
-    {
-      
-      label = label1;
-
-      TLorentzVector mom1 = *(photon1->Momentum());
-      TLorentzVector mom2 = *(photon2->Momentum());
-      
-      Double_t angle = mom2.Angle(mom1.Vect());
-      Double_t mass  = (mom1+mom2).M();
-      Double_t epair = (mom1+mom2).E();
-
-      if(GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay))
-      {
-        fhMassPairMCPi0 ->Fill(epair,mass);
-        fhAnglePairMCPi0->Fill(epair,angle);
-        GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCPi0);
-      }
-      else 
-      {
-        fhMassPairMCEta ->Fill(epair,mass);
-        fhAnglePairMCEta->Fill(epair,angle);
-        GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCEta);
-      }
-      
-    } // same label
-  } // both from eta or pi0 decay
-  
-}   
-
 //_____________________________________________
 TList *  AliAnaPi0EbE::GetCreateOutputObjects()
 {  
@@ -991,44 +881,42 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
   
   if(IsDataMC()) 
   {
+    
+    if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
+    {
+      fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay  identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax); 
+      fhMCPi0DecayPt->SetYTitle("N");
+      fhMCPi0DecayPt->SetXTitle("p^{rec}_{T} (GeV/c)");
+      outputContainer->Add(fhMCPi0DecayPt) ; 
+      
+      fhMCPi0DecayPtFraction = new TH2F("hMCPi0DecayPtFraction","Number of #gamma from #pi^{0} decay  identified as #pi^{0} (#eta), pT versus pT / pT mother",
+                                        nptbins,ptmin,ptmax,100,0,1); 
+      fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/c)");
+      fhMCPi0DecayPtFraction->SetYTitle("E^{gen}_{T} / E^{gen-mother}_{T}");
+      outputContainer->Add(fhMCPi0DecayPtFraction) ; 
+      
+      fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #pi^{0} decay  identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax); 
+      fhMCEtaDecayPt->SetYTitle("N");
+      fhMCEtaDecayPt->SetXTitle("p^{rec}_{T} (GeV/c)");
+      outputContainer->Add(fhMCEtaDecayPt) ; 
+      
+      fhMCEtaDecayPtFraction = new TH2F("hMCEtaDecayPtFraction","Number of #gamma from #pi^{0} decay  identified as #pi^{0} (#eta), pT versus pT / pT mother",
+                                        nptbins,ptmin,ptmax,100,0,1); 
+      fhMCEtaDecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/c)");
+      fhMCEtaDecayPtFraction->SetYTitle("E^{gen}_{T} / E^{gen-mother}_{T}");
+      outputContainer->Add(fhMCEtaDecayPtFraction) ; 
+      
+      fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma from #pi^{0} decay  identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax); 
+      fhMCOtherDecayPt->SetYTitle("N");
+      fhMCOtherDecayPt->SetXTitle("p^{rec}_{T} (GeV/c)");
+      outputContainer->Add(fhMCOtherDecayPt) ; 
+      
+    }
+       
     if((GetReader()->GetDataType() == AliCaloTrackReader::kMC && fAnaType!=kSSCalo) || 
        GetReader()->GetDataType() != AliCaloTrackReader::kMC)
     {
       
-      fhPtMC  = new TH1F("hPtMC","Identified #pi^{0} (#eta) from #pi^{0} (#eta)",nptbins,ptmin,ptmax); 
-      fhPtMC->SetYTitle("N");
-      fhPtMC->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhPtMC) ; 
-      
-      fhPhiMC  = new TH2F
-      ("hPhiMC","Identified #pi^{0} (#eta) from #pi^{0} (#eta)",nptbins,ptmin,ptmax,nphibins,phimin,phimax); 
-      fhPhiMC->SetYTitle("#phi");
-      fhPhiMC->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhPhiMC) ; 
-      
-      fhEtaMC  = new TH2F
-      ("hEtaMC","Identified #pi^{0} (#eta) from #pi^{0} (#eta)",nptbins,ptmin,ptmax,netabins,etamin,etamax); 
-      fhEtaMC->SetYTitle("#eta");
-      fhEtaMC->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhEtaMC) ;
-      
-      fhPtMCNo  = new TH1F("hPtMCNo","Identified #pi^{0} (#eta) not from #pi^{0} (#eta)",nptbins,ptmin,ptmax); 
-      fhPtMCNo->SetYTitle("N");
-      fhPtMCNo->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhPtMCNo) ; 
-      
-      fhPhiMCNo  = new TH2F
-      ("hPhiMCNo","Identified #pi^{0} (#eta) not from #pi^{0} (#eta)",nptbins,ptmin,ptmax,nphibins,phimin,phimax); 
-      fhPhiMCNo->SetYTitle("#phi");
-      fhPhiMCNo->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhPhiMCNo) ; 
-      
-      fhEtaMCNo  = new TH2F
-      ("hEtaMCNo","Identified #pi^{0} (#eta) not from #pi^{0} (#eta)",nptbins,ptmin,ptmax,netabins,etamin,etamax); 
-      fhEtaMCNo->SetYTitle("#eta");
-      fhEtaMCNo->SetXTitle("p_{T} (GeV/c)");
-      outputContainer->Add(fhEtaMCNo) ;
-      
       fhAnglePairMCPi0  = new TH2F
       ("AnglePairMCPi0",
        "Angle between decay #gamma pair vs E_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5); 
@@ -1060,10 +948,37 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
         outputContainer->Add(fhMassPairMCEta) ; 
       }
       
-      if( fFillSelectClHisto )
-      {
-        for(Int_t i = 0; i < 6; i++)
-        { 
+      for(Int_t i = 0; i < 6; i++)
+      { 
+        
+        fhMCPt[i]  = new TH1F
+        (Form("hPt_MC%s",pname[i].Data()),
+         Form("Identified as #pi^{0} (#eta), cluster from %s",
+              ptype[i].Data()),
+         nptbins,ptmin,ptmax); 
+        fhMCPt[i]->SetYTitle("N");
+        fhMCPt[i]->SetXTitle("p_{T} (GeV/c)");
+        outputContainer->Add(fhMCPt[i]) ; 
+        
+        fhMCPhi[i]  = new TH2F
+        (Form("hPhi_MC%s",pname[i].Data()),
+         Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
+         nptbins,ptmin,ptmax,nphibins,phimin,phimax); 
+        fhMCPhi[i]->SetYTitle("#phi");
+        fhMCPhi[i]->SetXTitle("p_{T} (GeV/c)");
+        outputContainer->Add(fhMCPhi[i]) ; 
+        
+        fhMCEta[i]  = new TH2F
+        (Form("hEta_MC%s",pname[i].Data()),
+         Form("Identified as #pi^{0} (#eta), cluster from %s",
+              ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax); 
+        fhMCEta[i]->SetYTitle("#eta");
+        fhMCEta[i]->SetXTitle("p_{T} (GeV/c)");
+        outputContainer->Add(fhMCEta[i]) ;
+        
+        
+        if( fFillSelectClHisto )
+        {
           fhEMCLambda0[i]  = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
                                       Form("Selected pair, cluster from %s : E vs #lambda_{0}^{2}",ptype[i].Data()),
                                       nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); 
@@ -1277,6 +1192,129 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
   
 }
 
+//_____________________________________________
+Int_t AliAnaPi0EbE::GetMCIndex(const Int_t tag)
+{ 
+  
+  // Assign mc index depending on MC bit set
+  
+  if       ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0)  )
+  {
+    return kmcPi0 ;      
+  }//pi0
+  else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)  )
+  {
+    return kmcEta ; 
+  }//eta          
+  else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
+            GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
+  {
+    return kmcConversion ; 
+  }//conversion photon
+  else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
+  {
+    return kmcPhoton ; 
+  }//photon   no conversion
+  else if  ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
+  {
+    return kmcElectron ; 
+  }//electron
+  else 
+  {
+    return kmcHadron ; 
+  }//other particles 
+  
+}
+
+//__________________________________________________________________
+void AliAnaPi0EbE::HasPairSameMCMother(AliAODPWG4Particle * photon1, 
+                                       AliAODPWG4Particle * photon2, 
+                                       Int_t & label, Int_t & tag)
+{
+  // Check the labels of pare in case mother was same pi0 or eta
+  // Set the new AOD accordingly
+  
+  Int_t  label1 = photon1->GetLabel();
+  Int_t  label2 = photon2->GetLabel();
+  
+  if(label1 < 0 || label2 < 0 ) return ;
+  
+  //Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader(), photon1->GetInputFileIndex());
+  //Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(), photon2->GetInputFileIndex());
+  Int_t tag1 = photon1->GetTag();
+  Int_t tag2 = photon2->GetTag();
+  
+  if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2);
+  if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) && 
+       GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay)    ) ||
+     (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) && 
+      GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCEtaDecay)    )
+     )
+  {
+    
+    //Check if pi0/eta mother is the same
+    if(GetReader()->ReadStack())
+    { 
+      if(label1>=0)
+      {
+        TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree
+        label1 = mother1->GetFirstMother();
+        //mother1 = GetMCStack()->Particle(label1);//pi0
+      }
+      if(label2>=0)
+      {
+        TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree
+        label2 = mother2->GetFirstMother();
+        //mother2 = GetMCStack()->Particle(label2);//pi0
+      }
+    } // STACK
+    else if(GetReader()->ReadAODMCParticles())
+    {//&& (input > -1)){
+      if(label1>=0)
+      {
+        AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(photon1->GetInputFileIndex()))->At(label1);//photon in kine tree
+        label1 = mother1->GetMother();
+        //mother1 = GetMCStack()->Particle(label1);//pi0
+      }
+      if(label2>=0)
+      {
+        AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles(photon2->GetInputFileIndex()))->At(label2);//photon in kine tree
+        label2 = mother2->GetMother();
+        //mother2 = GetMCStack()->Particle(label2);//pi0
+      }
+    }// AOD
+    
+    //printf("mother1 %d, mother2 %d\n",label1,label2);
+    if( label1 == label2 && label1>=0 )
+    {
+      
+      label = label1;
+      
+      TLorentzVector mom1 = *(photon1->Momentum());
+      TLorentzVector mom2 = *(photon2->Momentum());
+      
+      Double_t angle = mom2.Angle(mom1.Vect());
+      Double_t mass  = (mom1+mom2).M();
+      Double_t epair = (mom1+mom2).E();
+      
+      if(GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay))
+      {
+        fhMassPairMCPi0 ->Fill(epair,mass);
+        fhAnglePairMCPi0->Fill(epair,angle);
+        GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCPi0);
+      }
+      else 
+      {
+        fhMassPairMCEta ->Fill(epair,mass);
+        fhAnglePairMCEta->Fill(epair,angle);
+        GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCEta);
+      }
+      
+    } // same label
+  } // both from eta or pi0 decay
+  
+}   
+
 //____________________________________________________________________________
 void AliAnaPi0EbE::Init()
 { 
@@ -1796,19 +1834,41 @@ void  AliAnaPi0EbE::MakeAnalysisFillHistograms()
 
     if(IsDataMC())
     {
-      if(GetMCAnalysisUtils()->CheckTagBit(pi0->GetTag(), AliMCAnalysisUtils::kMCPi0))
-      {
-        fhPtMC  ->Fill(pt);
-        fhPhiMC ->Fill(pt,phi);
-        fhEtaMC ->Fill(pt,eta);
-      }
-      else
+      Int_t tag     = pi0->GetTag();
+      Int_t mcIndex = GetMCIndex(tag);
+
+      fhMCPt [mcIndex] ->Fill(pt);
+      fhMCPhi[mcIndex] ->Fill(pt,phi);
+      fhMCEta[mcIndex] ->Fill(pt,eta);
+      
+      if(mcIndex==kmcPhoton && fAnaType==kSSCalo)
       {
-        fhPtMCNo  ->Fill(pt);
-        fhPhiMCNo ->Fill(pt,phi);
-        fhEtaMCNo ->Fill(pt,eta);
+        Float_t efracMC = 0;
+        Int_t label = pi0->GetLabel();
+        TLorentzVector mom   = GetMCAnalysisUtils()->GetMother(label,GetReader()); 
+
+        if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
+        {
+          fhMCPi0DecayPt->Fill(pt);
+          TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader()); 
+          if(grandmom.E()>0) efracMC =  mom.E()/grandmom.E();
+          fhMCPi0DecayPtFraction ->Fill(pt,efracMC);
+        }
+        else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
+        {
+          fhMCEtaDecayPt->Fill(pt);
+          
+          TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader()); 
+          if(grandmom.E()>0) efracMC =  mom.E()/grandmom.E();
+          fhMCEtaDecayPtFraction ->Fill(pt,efracMC);
+        }
+        else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay))
+        {
+          fhMCOtherDecayPt->Fill(pt);
+        }
         
       }
+      
     }//Histograms with MC
     
   }// aod loop
index 1739d0a6e614609fb7fc4a06ac71c585cd5fc990..a7bf28f690b29e160908979aa80b16e49f013fcc 100755 (executable)
@@ -32,6 +32,8 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   
   TList      *   GetCreateOutputObjects();
   
+  Int_t          GetMCIndex(const Int_t aodTag);
+  
   void           Init();
   
   void           InitParameters();
@@ -153,37 +155,40 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
 
   //MC histograms
   
-  TH2F         * fhEMCLambda0[6] ;         //! E vs lambda0 of pi0 pairs but really from MC particle
-  TH2F         * fhEMCLambda1[6] ;         //! E vs lambda1 of pi0 pairs but really from MC particle
-  TH2F         * fhEMCDispersion[6] ;      //! E vs dispersion of pi0 pairs but really from MC particle
+  TH2F         * fhEMCLambda0[6] ;            //! E vs lambda0 of pi0 pairs but really from MC particle
+  TH2F         * fhEMCLambda1[6] ;            //! E vs lambda1 of pi0 pairs but really from MC particle
+  TH2F         * fhEMCDispersion[6] ;         //! E vs dispersion of pi0 pairs but really from MC particle
   TH2F         * fhEMCLambda0NoTRD[6] ;         //! E vs lambda0 of pi0 pairs but really from MC particle, not behind TRD
   TH2F         * fhEMCLambda0FracMaxCellCut[6] ;//! E vs lambda0 of pi0 pairs but really from MC particle, fraction of cluster energy in max cell cut
-  TH2F         * fhEMCFracMaxCell[6] ;     //! E vs fraction of max cell 
-  
-  TH2F         * fhMCEDispEta[6] ;         //! shower dispersion in eta direction
-  TH2F         * fhMCEDispPhi[6] ;         //! shower dispersion in phi direction
-  TH2F         * fhMCLambda0DispEta[7][6] ;//! shower shape correlation l0 vs disp eta
-  TH2F         * fhMCLambda0DispPhi[7][6] ;//! shower shape correlation l0 vs disp phi
-  TH2F         * fhMCESumEtaPhi[6] ;       //! shower dispersion in eta vs phi direction
-  TH2F         * fhMCEDispEtaPhiDiff[6] ;  //! shower dispersion in eta -phi direction
-  TH2F         * fhMCESphericity[6] ;      //! shower sphericity, eta vs phi
-  TH2F         * fhMCDispEtaDispPhi[7][6] ;//! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
+  TH2F         * fhEMCFracMaxCell[6] ;        //! E vs fraction of max cell 
+  
+  TH2F         * fhMCEDispEta[6] ;            //! shower dispersion in eta direction
+  TH2F         * fhMCEDispPhi[6] ;            //! shower dispersion in phi direction
+  TH2F         * fhMCLambda0DispEta[7][6] ;   //! shower shape correlation l0 vs disp eta
+  TH2F         * fhMCLambda0DispPhi[7][6] ;   //! shower shape correlation l0 vs disp phi
+  TH2F         * fhMCESumEtaPhi[6] ;          //! shower dispersion in eta vs phi direction
+  TH2F         * fhMCEDispEtaPhiDiff[6] ;     //! shower dispersion in eta -phi direction
+  TH2F         * fhMCESphericity[6] ;         //! shower sphericity, eta vs phi
+  TH2F         * fhMCDispEtaDispPhi[7][6] ;   //! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
   TH2F         * fhMCEAsymmetry[6] ;          //! E asymmetry of 2 splitted clusters vs cluster E
   TH2F         * fhMCAsymmetryLambda0[7][6] ; //! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
   TH2F         * fhMCAsymmetryDispEta[7][6] ; //! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
   TH2F         * fhMCAsymmetryDispPhi[7][6] ; //! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
   
-  TH1F         * fhPtMCNo;                 //! Number of identified pi0, not coming from pi0/eta
-  TH2F         * fhPhiMCNo;                //! Phi of identified pi0, not coming from pi0/eta
-  TH2F         * fhEtaMCNo;                //! eta of identified  pi0, not coming from pi0/eta
-  TH1F         * fhPtMC;                   //! Number of identified pi0, coming from pi0/eta
-  TH2F         * fhPhiMC;                  //! Phi of identified pi0, coming from pi0/eta
-  TH2F         * fhEtaMC;                  //! eta of identified pi0, coming from pi0/eta
+  TH1F         * fhMCPt[6];                   //! Number of identified as pi0, coming from X
+  TH2F         * fhMCPhi[6];                  //! Phi of identified as pi0, coming from X
+  TH2F         * fhMCEta[6];                  //! eta of identified as pi0, coming from X
+
+  TH1F         * fhMCPi0DecayPt;              //! SS id, clusters id as pi0, coming from single photon, pi0 decay, pt
+  TH2F         * fhMCPi0DecayPtFraction;      //! SS id, clusters id as pi0, coming from single photon, pi0 decay, pt vs pt decay / pt mother
+  TH1F         * fhMCEtaDecayPt;              //! SS id, clusters id as pi0, coming from single photon, eta decay, pt
+  TH2F         * fhMCEtaDecayPtFraction;      //! SS id, clusters id as pi0, coming from single photon, eta decay, pt vs pt decay / pt mother  
+  TH1F         * fhMCOtherDecayPt;            //! SS id, clusters id as pi0, coming from single photon, other decay, pt
 
-  TH2F         * fhMassPairMCPi0;          //! pair mass, origin is same pi0
-  TH2F         * fhMassPairMCEta;          //! pair mass, origin is same eta
-  TH2F         * fhAnglePairMCPi0;         //! pair opening angle, origin is same pi0
-  TH2F         * fhAnglePairMCEta;         //! pair opening angle, origin is same eta
+  TH2F         * fhMassPairMCPi0;             //! pair mass, origin is same pi0
+  TH2F         * fhMassPairMCEta;             //! pair mass, origin is same eta
+  TH2F         * fhAnglePairMCPi0;            //! pair opening angle, origin is same pi0
+  TH2F         * fhAnglePairMCEta;            //! pair opening angle, origin is same eta
   
   // Weight studies
   
@@ -220,7 +225,7 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   AliAnaPi0EbE(              const AliAnaPi0EbE & pi0ebe) ; // cpy ctor
   AliAnaPi0EbE & operator = (const AliAnaPi0EbE & pi0ebe) ; // cpy assignment
   
-  ClassDef(AliAnaPi0EbE,17)
+  ClassDef(AliAnaPi0EbE,18)
 } ;