add the eta decay case separated from the generic other decays where it was not the...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 11 Dec 2014 14:01:35 +0000 (15:01 +0100)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 11 Dec 2014 14:02:05 +0000 (15:02 +0100)
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h
PWGGA/CaloTrackCorrelations/AliAnaPhoton.cxx
PWGGA/CaloTrackCorrelations/AliAnaPhoton.h

index f592fc4..0038d29 100755 (executable)
@@ -326,8 +326,12 @@ void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Fl
   {
     Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
     fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
-    if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
-      fhDeltaPhiChargedMC[7]->Fill(ptTrig , deltaPhi);
+    if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+    {
+      // check index in GetMCTagIndexHistogram
+      if     ( mcIndex == 2 ) fhDeltaPhiChargedMC[8]->Fill(ptTrig , deltaPhi); // pi0 decay
+      else if( mcIndex == 4 ) fhDeltaPhiChargedMC[9]->Fill(ptTrig , deltaPhi); // eta decay
+    }
   }
   
   if(fDecayTrigger && decayTag > 0)
@@ -471,28 +475,54 @@ Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float
     fhMCPtTrigPout       [histoIndex]->Fill(mcTrigPt, mcpout) ;
   }
 
-  if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+  if(lostDecayPair)
   {
-    fhMCEtaCharged     [7]->Fill(mcAssocPt, mcAssocEta);
-    fhMCPhiCharged     [7]->Fill(mcAssocPt, mcAssocPhi);
-    fhMCDeltaEtaCharged[7]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
-    fhMCDeltaPhiCharged[7]->Fill(mcTrigPt , mcdeltaPhi);
-    fhMCPtAssocDeltaPhi[7]->Fill(mcAssocPt, mcdeltaPhi);
-    
-    fhMCDeltaPhiDeltaEtaCharged[7]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
-    
-    //delta phi cut for correlation
-    if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+    // check index in GetMCTagIndexHistogram
+    if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
     {
-      fhMCDeltaPhiChargedPt[7]->Fill(mcAssocPt,mcdeltaPhi);
-      fhMCPtXECharged      [7]->Fill(mcTrigPt, mcxE);
-      fhMCPtHbpXECharged   [7]->Fill(mcTrigPt, mchbpXE);
-      fhMCPtZTCharged      [7]->Fill(mcTrigPt, mczT);
-      fhMCPtHbpZTCharged   [7]->Fill(mcTrigPt, mchbpZT);
-      fhMCPtTrigPout       [7]->Fill(mcTrigPt, mcpout) ;
-    }
+      // pi0 decay
+      fhMCEtaCharged     [8]->Fill(mcAssocPt, mcAssocEta);
+      fhMCPhiCharged     [8]->Fill(mcAssocPt, mcAssocPhi);
+      fhMCDeltaEtaCharged[8]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
+      fhMCDeltaPhiCharged[8]->Fill(mcTrigPt , mcdeltaPhi);
+      fhMCPtAssocDeltaPhi[8]->Fill(mcAssocPt, mcdeltaPhi);
+      
+      fhMCDeltaPhiDeltaEtaCharged[8]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
+      
+      //delta phi cut for correlation
+      if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+      {
+        fhMCDeltaPhiChargedPt[8]->Fill(mcAssocPt,mcdeltaPhi);
+        fhMCPtXECharged      [8]->Fill(mcTrigPt, mcxE);
+        fhMCPtHbpXECharged   [8]->Fill(mcTrigPt, mchbpXE);
+        fhMCPtZTCharged      [8]->Fill(mcTrigPt, mczT);
+        fhMCPtHbpZTCharged   [8]->Fill(mcTrigPt, mchbpZT);
+        fhMCPtTrigPout       [8]->Fill(mcTrigPt, mcpout) ;
+      }
+    } // pi0 decay lost pair
+    if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+    {
+      // eta decay
+      fhMCEtaCharged     [9]->Fill(mcAssocPt, mcAssocEta);
+      fhMCPhiCharged     [9]->Fill(mcAssocPt, mcAssocPhi);
+      fhMCDeltaEtaCharged[9]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
+      fhMCDeltaPhiCharged[9]->Fill(mcTrigPt , mcdeltaPhi);
+      fhMCPtAssocDeltaPhi[9]->Fill(mcAssocPt, mcdeltaPhi);
+      
+      fhMCDeltaPhiDeltaEtaCharged[9]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
+      
+      //delta phi cut for correlation
+      if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+      {
+        fhMCDeltaPhiChargedPt[9]->Fill(mcAssocPt,mcdeltaPhi);
+        fhMCPtXECharged      [9]->Fill(mcTrigPt, mcxE);
+        fhMCPtHbpXECharged   [9]->Fill(mcTrigPt, mchbpXE);
+        fhMCPtZTCharged      [9]->Fill(mcTrigPt, mczT);
+        fhMCPtHbpZTCharged   [9]->Fill(mcTrigPt, mchbpZT);
+        fhMCPtTrigPout       [9]->Fill(mcTrigPt, mcpout) ;
+      }
+    } // eta decay lost pair
   }
-  
   // Underlying event
   
   // Right
@@ -515,15 +545,31 @@ Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float
     
     fhMCUePart[histoIndex]->Fill(mcTrigPt);
     
-    if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+    if(lostDecayPair)
     {
-      fhMCPtXEUeCharged[7]->Fill(mcTrigPt,mcUexE);
-      if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
-      
-      fhMCPtZTUeCharged[7]->Fill(mcTrigPt,mcUezT);
-      if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
-      
-      fhMCUePart[7]->Fill(mcTrigPt);
+      // check index in GetMCTagIndexHistogram
+      if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+      {
+        // pi0 decay
+        fhMCPtXEUeCharged[8]->Fill(mcTrigPt,mcUexE);
+        if(mcUexE > 0) fhMCPtHbpXEUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+        
+        fhMCPtZTUeCharged[8]->Fill(mcTrigPt,mcUezT);
+        if(mcUezT > 0) fhMCPtHbpZTUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+        
+        fhMCUePart[8]->Fill(mcTrigPt);
+      }
+      else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+      {
+        // eta decay
+        fhMCPtXEUeCharged[9]->Fill(mcTrigPt,mcUexE);
+        if(mcUexE > 0) fhMCPtHbpXEUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+        
+        fhMCPtZTUeCharged[9]->Fill(mcTrigPt,mcUezT);
+        if(mcUezT > 0) fhMCPtHbpZTUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+        
+        fhMCUePart[9]->Fill(mcTrigPt);
+      }
     }
   }
 
@@ -546,13 +592,27 @@ Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float
       fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
       if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
       
-      if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+      if(lostDecayPair)
       {
-        fhMCPtXEUeLeftCharged[7]->Fill(mcTrigPt,mcUexE);
-        if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
-        
-        fhMCPtZTUeLeftCharged[7]->Fill(mcTrigPt,mcUezT);
-        if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+        // check index in GetMCTagIndexHistogram
+        if(histoIndex == 2  && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+        {
+          // pi0 decay
+          fhMCPtXEUeLeftCharged[8]->Fill(mcTrigPt,mcUexE);
+          if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+          
+          fhMCPtZTUeLeftCharged[8]->Fill(mcTrigPt,mcUezT);
+          if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+        }
+        else if(histoIndex == 4  && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+        {
+          // eta decay
+          fhMCPtXEUeLeftCharged[9]->Fill(mcTrigPt,mcUexE);
+          if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+          
+          fhMCPtZTUeLeftCharged[9]->Fill(mcTrigPt,mcUezT);
+          if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+        }
       }
     }
   }
@@ -601,8 +661,12 @@ void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Flo
   {
     Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
     fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
-    if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
-      fhXEChargedMC[7]->Fill(ptTrig , xE);
+    if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+    {
+      // check index in GetMCTagIndexHistogram
+      if      ( mcIndex == 2 ) fhXEChargedMC[8]->Fill(ptTrig , xE); // pi0 decay
+      else if ( mcIndex == 4 ) fhXEChargedMC[9]->Fill(ptTrig , xE); // eta decay
+    }
   }
   
   // Pile up studies
@@ -1249,7 +1313,7 @@ TList *  AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
   
   Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
   
-  TString nameMC[]     = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair"};
+  TString nameMC[]     = {"Photon","Pi0","Pi0Decay","Eta","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair","EtaDecayLostPair"};
   TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
   
   // For vz dependent histograms, if option ON
@@ -2888,13 +2952,13 @@ Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag)
   
   if     ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||        
            GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
-  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0))           return 1;    
-  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay))      return 2;
-  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)  ||
-           GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay))      return 3;
-  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay))    return 4;
-  else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron))      return 5;
-  else                                                                                    return 6;
+  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)          ) return 1;
+  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)     ) return 2;
+  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)          ) return 3;
+  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)     ) return 4;
+  else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)   ) return 5;
+  else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)     ) return 6;
+  else                                                                                    return 7;
   
 }
 
@@ -2968,8 +3032,8 @@ void AliAnaParticleHadronCorrelation::InitParameters()
   fMinLeadHadPt  = 1;
   fMaxLeadHadPt  = 100;
   
-  fMCGenTypeMin = 0;
-  fMCGenTypeMax = 6;
+  fMCGenTypeMin =  0;
+  fMCGenTypeMax = 10;
   
   fNDecayBits = 1;
   fDecayBits[0] = AliNeutralMesonSelection::kPi0;
@@ -3283,8 +3347,12 @@ void  AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
     if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
     {
       fhPtTriggerMC[mcIndex]->Fill(pt);
-      if( lostDecayPair && mcIndex==2 )
-        fhPtTriggerMC[7]->Fill(pt);
+      if( lostDecayPair )
+      {
+        // check index in GetMCTagIndexHistogram
+        if     ( mcIndex == 2 ) fhPtTriggerMC[8]->Fill(pt); // pi0 decay
+        else if( mcIndex == 4 ) fhPtTriggerMC[9]->Fill(pt); // eta decay
+      }
     }
     
     if(fDecayTrigger)
@@ -3301,8 +3369,12 @@ void  AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
           if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
           {
             fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
-            if(lostDecayPair && mcIndex==2 )
-              fhPtDecayTriggerMC[ibit][7]->Fill(pt);
+            if( lostDecayPair )
+            {
+              // check index in GetMCTagIndexHistogram
+              if( mcIndex == 2 )  fhPtDecayTriggerMC[ibit][8]->Fill(pt); // pi0 decay
+              if( mcIndex == 4 )  fhPtDecayTriggerMC[ibit][9]->Fill(pt); // eta decay
+            }
           }
         }// check bit
       }// bit loop
@@ -4212,11 +4284,23 @@ void  AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int
   fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
   fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
   
-  if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+  if(lostDecayPair)
   {
-    fhMCPtTrigger [7]->Fill(ptprim);
-    fhMCPhiTrigger[7]->Fill(ptprim,phiprim);
-    fhMCEtaTrigger[7]->Fill(ptprim,etaprim);
+    // check index in GetMCTagIndexHistogram
+    if     (histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+    {
+      // pi0 decay
+      fhMCPtTrigger [8]->Fill(ptprim);
+      fhMCPhiTrigger[8]->Fill(ptprim,phiprim);
+      fhMCEtaTrigger[8]->Fill(ptprim,etaprim);
+    }
+    else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+    {
+      // eta decay
+      fhMCPtTrigger [9]->Fill(ptprim);
+      fhMCPhiTrigger[9]->Fill(ptprim,phiprim);
+      fhMCEtaTrigger[9]->Fill(ptprim,etaprim);
+    }
   }
   
   if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
@@ -4228,11 +4312,23 @@ void  AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int
     fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
     fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
     
-    if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+    if(lostDecayPair)
     {
-      fhMCPtTriggerNotLeading [7]->Fill(ptprim);
-      fhMCPhiTriggerNotLeading[7]->Fill(ptprim,phiprim);
-      fhMCEtaTriggerNotLeading[7]->Fill(ptprim,etaprim);
+      // check index in GetMCTagIndexHistogram
+      if      (histoIndex == 2  && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+      {
+        // pi0 decay
+        fhMCPtTriggerNotLeading [8]->Fill(ptprim);
+        fhMCPhiTriggerNotLeading[8]->Fill(ptprim,phiprim);
+        fhMCEtaTriggerNotLeading[8]->Fill(ptprim,etaprim);
+      }
+      else  if(histoIndex == 4  && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+      {
+        // eta decay
+        fhMCPtTriggerNotLeading [9]->Fill(ptprim);
+        fhMCPhiTriggerNotLeading[9]->Fill(ptprim,phiprim);
+        fhMCEtaTriggerNotLeading[9]->Fill(ptprim,etaprim);
+      }
     }
   }
 }
index 600f7cf..e5adae5 100755 (executable)
@@ -90,7 +90,7 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
                                                          Float_t deltaPhi);  
     
   Int_t        GetMCTagHistogramIndex(Int_t tag);
-  static const Int_t fgkNmcTypes = 8;
+  static const Int_t fgkNmcTypes = 10;
 
   Bool_t       IsTriggerTheEventLeadingParticle();
   
index f772aae..9c78a10 100755 (executable)
@@ -154,6 +154,22 @@ fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap(0),
 fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE(0),
 fhPtPrimMCPi0DecayIsoPairNoOverlap(0),
 fhPtPrimMCPi0Overlap(0),                    fhPtPrimMCPi0IsoOverlap(0),
+
+fhPtPrimMCEtaDecayPairOutOfCone(0),
+fhPtPrimMCEtaDecayPairOutOfAcceptance(0),
+fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap(0),
+fhPtPrimMCEtaDecayPairAcceptInConeLowPt(0),
+fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap(0),
+fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE(0),
+fhPtPrimMCEtaDecayPairNoOverlap(0),
+fhPtPrimMCEtaDecayIsoPairOutOfCone(0),
+fhPtPrimMCEtaDecayIsoPairOutOfAcceptance(0),
+fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap(0),
+fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt(0),
+fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap(0),
+fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE(0),
+fhPtPrimMCEtaDecayIsoPairNoOverlap(0),
+fhPtPrimMCEtaOverlap(0),                    fhPtPrimMCEtaIsoOverlap(0),
 fhPtLeadConeBin(0),                         fhSumPtConeBin(0),
 fhPtLeadConeBinMC(0),                       fhSumPtConeBinMC(0),
 fhPtLeadConeBinDecay(0),                    fhSumPtConeBinDecay(0),
@@ -1219,8 +1235,11 @@ void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliA
         if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
           fhPtDecayMC[isolated][ibit][kmcPhoton]->Fill(pt);
         
-        if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-          fhPtDecayMC[isolated][ibit][kmcPi0DecayLostPair]->Fill(pt);
+        if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+        {
+          if     ( mcIndex == kmcPi0Decay ) fhPtDecayMC[isolated][ibit][kmcPi0DecayLostPair]->Fill(pt);
+          else if( mcIndex == kmcEtaDecay ) fhPtDecayMC[isolated][ibit][kmcEtaDecayLostPair]->Fill(pt);
+        }
       }
     } // bit loop
   } // decay histograms
@@ -1297,7 +1316,6 @@ void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliA
         if(fFillSSHisto)  fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt,m02);
       }
 
-      
       if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
       {
         leadptBinMC = leadptBin+kmcPhoton*fNBkgBin;
@@ -1314,8 +1332,39 @@ void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliA
           if(fFillSSHisto)  fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt,m02);
         }
       }
-    }
-  }
+      
+      // Check if decay and if pair is lost
+      if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+      {
+        if     ( mcIndex == kmcPi0Decay )
+        {
+          leadptBinMC = leadptBin+kmcPi0DecayLostPair*fNBkgBin;
+          ptsumBinMC  =  ptsumBin+kmcPi0DecayLostPair*fNBkgBin;
+        }
+        else if(mcIndex == kmcEtaDecay)
+        {
+          leadptBinMC = leadptBin+kmcEtaDecayLostPair*fNBkgBin;
+          ptsumBinMC  =  ptsumBin+kmcEtaDecayLostPair*fNBkgBin;
+        }
+        else
+          AliFatal(Form("Lost decay Bit assigned to bad case, mcIndex %d",mcIndex));
+        
+        if( leadptBin >=0 )
+        {
+          fhPtLeadConeBinMC[leadptBinMC]->Fill(pt);
+          if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt,m02);
+        }
+        
+        if( ptsumBin  >=0 )
+        {
+          fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt);
+          if(fFillSSHisto)  fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt,m02);
+        }
+        
+      } // check decays with lost pairs
+
+    } // MC data
+  } // background dependent bins
   
   if(fFillPtTrigBinHistograms)
   {
@@ -1390,6 +1439,25 @@ void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliA
           }
         }
       } // photon MC
+      
+      // decays with lost pair
+      if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+      {
+        if     ( mcIndex == kmcPi0Decay ) ptTrigBinMC = ptTrigBin+kmcPi0DecayLostPair*fNPtTrigBin;
+        else if( mcIndex == kmcEtaDecay ) ptTrigBinMC = ptTrigBin+kmcEtaDecayLostPair*fNPtTrigBin;
+        
+        if( ptTrigBin >=0 )
+        {
+          fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt);
+          fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum );
+          if(fFillSSHisto)
+          {
+            fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt,m02);
+            fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum ,m02);
+          }
+        }
+      } // lost decays MC
+
     } // MC
   } // pT trigger bins
   
@@ -1402,11 +1470,14 @@ void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliA
     
     if(IsDataMC())
     {
-      if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
+      if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
         fhPtLambda0MC[kmcPhoton][isolated]->Fill(pt,m02);
       
-      if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-        fhPtLambda0MC[kmcPi0DecayLostPair][isolated]->Fill(pt,m02);
+      if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+      {
+        if     ( mcIndex == kmcPi0Decay ) fhPtLambda0MC[kmcPi0DecayLostPair][isolated]->Fill(pt,m02);
+        else if( mcIndex == kmcEtaDecay ) fhPtLambda0MC[kmcEtaDecayLostPair][isolated]->Fill(pt,m02);
+      }
       
       fhPtLambda0MC[mcIndex][isolated]->Fill(pt,m02);
     }
@@ -1647,21 +1718,24 @@ TList *  AliAnaParticleIsolation::GetCreateOutputObjects()
   TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
   
   // MC histograms title and name
-  TString mcPartType[] = { "#gamma", "#gamma_{prompt}", "#gamma_{fragmentation}",
-    "#pi^{0} (merged #gamma)","#gamma_{#pi decay}","#gamma_{#pi decay} lost companion",
-    "#gamma_{#eta decay}","#gamma_{other decay}",
-    "e^{#pm}","hadrons?"} ;
+  TString mcPartType[] = { "#gamma"                 , "#gamma_{prompt}"    , "#gamma_{fragmentation}",
+                           "#pi^{0} (merged #gamma)", "#gamma_{#pi decay}" , "#gamma_{#pi decay} lost companion",
+                           "#eta (merged #gamma)"   , "#gamma_{#eta decay}", "#gamma_{#eta decay} lost companion",
+                           "#gamma_{other decay}"   , "e^{#pm}"            , "hadrons?"} ;
   
   TString mcPartName[] = { "Photon","PhotonPrompt","PhotonFrag",
-    "Pi0","Pi0Decay","Pi0DecayLostPair","EtaDecay","OtherDecay",
-    "Electron","Hadron"} ;
+                           "Pi0"   ,"Pi0Decay"    ,"Pi0DecayLostPair",
+                           "Eta"   ,"EtaDecay"    ,"EtaDecayLostPair",
+                           "OtherDecay","Electron","Hadron"} ;
   
   // Primary MC histograms title and name
-  TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}",
-    "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","#pi^{0}"} ;
+  TString pptype[] = { "#gamma"         , "#gamma_{#pi decay}"    , "#gamma_{#eta decay}", "#gamma_{other decay}",
+                       "#gamma_{prompt}", "#gamma_{fragmentation}", "#gamma_{ISR}"       ,
+                       "#pi^{0}"        , "#eta"} ;
   
-  TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay",
-    "PhotonPrompt","PhotonFrag","PhotonISR","Pi0"} ;
+  TString ppname[] = { "Photon"      , "PhotonPi0Decay","PhotonEtaDecay", "PhotonOtherDecay",
+                       "PhotonPrompt", "PhotonFrag"    , "PhotonISR"    ,
+                       "Pi0"         , "Eta"} ;
   
   // Not Isolated histograms, reference histograms
   
@@ -3314,6 +3388,122 @@ TList *  AliAnaParticleIsolation::GetCreateOutputObjects()
         fhPtPrimMCPi0IsoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
         outputContainer->Add(fhPtPrimMCPi0IsoOverlap) ;
 
+        
+        
+        
+        
+        
+        
+        
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPt  = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPt",
+                                                            Form("primary photon  %s : #it{p}_{T}, pair in cone, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                            nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairAcceptInConeLowPt) ;
+        
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPt",
+                                                               Form("isolated primary photon %s, pair in cone : #it{p}_{T}, %s",
+                                                                    pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                               nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt) ;
+        
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap  = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPtNoOverlap",
+                                                                     Form("primary photon  %s, no overlap, pair in cone : #it{p}_{T}, %s",
+                                                                          pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                     nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap) ;
+        
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPtNoOverlap",
+                                                                        Form("isolated primary photon  %s, pair in cone,no overlap : #it{p}_{T}, %s",
+                                                                             pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                        nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap) ;
+        
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE  = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPtNoOverlapCaloE",
+                                                                          Form("primary photon  %s, no overlap, pair in cone, E > calo min: #it{p}_{T}, %s",
+                                                                               pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                          nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE) ;
+        
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPtNoOverlapCaloE",
+                                                                             Form("isolated primary photon  %s, pair in cone,no overlap, E > calo min: #it{p}_{T}, %s",
+                                                                                  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                             nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE) ;
+        
+        
+        fhPtPrimMCEtaDecayPairNoOverlap  = new TH1F("hPtPrim_MCPhotonEtaDecayPairNoOverlap",
+                                                    Form("primary photon  %s, no overlap: #it{p}_{T}, %s",
+                                                         pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                    nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairNoOverlap) ;
+        
+        fhPtPrimMCEtaDecayIsoPairNoOverlap  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairNoOverlap",
+                                                       Form("isolated primary photon  %s, no overlap: #it{p}_{T}, %s",
+                                                            pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                       nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairNoOverlap) ;
+        
+        fhPtPrimMCEtaDecayPairOutOfCone  = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfCone",
+                                                    Form("primary photon %s : #it{p}_{T}, pair out of cone, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                    nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfCone) ;
+        
+        fhPtPrimMCEtaDecayIsoPairOutOfCone  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfCone",
+                                                       Form("isolated primary photon %s, pair out of cone : #it{p}_{T}, %s",
+                                                            pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                       nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairOutOfCone) ;
+        
+        fhPtPrimMCEtaDecayPairOutOfAcceptance  = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfAcceptance",
+                                                          Form("primary photon %s : #it{p}_{T}, pair out of acceptance, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                          nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfAcceptance) ;
+        
+        fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap  = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfAcceptanceNoOverlap",
+                                                                   Form("primary photon %s : #it{p}_{T}, pair out of acceptance, no overlap, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                   nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap) ;
+        
+        fhPtPrimMCEtaDecayIsoPairOutOfAcceptance  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfAcceptance",
+                                                             Form("isolated primary photon %s, pair out of acceptance : #it{p}_{T}, %s",
+                                                                  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                             nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairOutOfAcceptance) ;
+        
+        fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap  = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfAcceptanceNoOverlap",
+                                                                      Form("isolated primary photon %s, pair out of acceptance, no overlap : #it{p}_{T}, %s",
+                                                                           pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
+                                                                      nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap) ;
+        
+        fhPtPrimMCEtaOverlap  = new TH1F("hPtPrim_MCEtaOverlap",
+                                         Form("primary %s, overlap: #it{p}_{T}, %s",
+                                              pptype[kmcPrimEta].Data(),parTitle.Data()),
+                                         nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaOverlap) ;
+        
+        fhPtPrimMCEtaIsoOverlap  = new TH1F("hPtPrim_MCisoEtaOverlap",
+                                            Form("primary %s, overlap: #it{p}_{T}, %s",
+                                                 pptype[kmcPrimEta].Data(),parTitle.Data()),
+                                            nptbins,ptmin,ptmax);
+        fhPtPrimMCEtaIsoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhPtPrimMCEtaIsoOverlap) ;
+
       }
       
     }//Histos with MC
@@ -3650,6 +3840,10 @@ Int_t AliAnaParticleIsolation::GetMCIndex(Int_t mcTag)
   {
     return kmcPi0;
   }
+  else if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
+  {
+    return kmcEta;
+  }
   else if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay))
   {
     return kmcPi0Decay;
@@ -4105,11 +4299,20 @@ void  AliAnaParticleIsolation::MakeAnalysisFillHistograms()
           fhEtaIsoMC[kmcPhoton]->Fill(pt,eta);
         }
         
-        if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
+        if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
         {
-          fhPtIsoMC [kmcPi0DecayLostPair]->Fill(pt);
-          fhPhiIsoMC[kmcPi0DecayLostPair]->Fill(pt,phi);
-          fhEtaIsoMC[kmcPi0DecayLostPair]->Fill(pt,eta);
+          if     ( mcIndex == kmcPi0Decay )
+          {
+            fhPtIsoMC [kmcPi0DecayLostPair]->Fill(pt);
+            fhPhiIsoMC[kmcPi0DecayLostPair]->Fill(pt,phi);
+            fhEtaIsoMC[kmcPi0DecayLostPair]->Fill(pt,eta);
+          }
+          else if( mcIndex == kmcEtaDecay )
+          {
+            fhPtIsoMC [kmcEtaDecayLostPair]->Fill(pt);
+            fhPhiIsoMC[kmcEtaDecayLostPair]->Fill(pt,phi);
+            fhEtaIsoMC[kmcEtaDecayLostPair]->Fill(pt,eta);
+          }
         }
         
         fhPtIsoMC [mcIndex]->Fill(pt);
@@ -4155,9 +4358,12 @@ void  AliAnaParticleIsolation::MakeAnalysisFillHistograms()
         if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
           fhPtNoIsoMC[kmcPhoton]->Fill(pt);
         
-        if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-          fhPtNoIsoMC[kmcPi0DecayLostPair]->Fill(pt);
-
+        if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost)  )
+        {
+          if     ( mcIndex == kmcPi0Decay ) fhPtNoIsoMC[kmcPi0DecayLostPair]->Fill(pt);
+          else if( mcIndex == kmcEtaDecay ) fhPtNoIsoMC[kmcEtaDecayLostPair]->Fill(pt);
+        }
+        
         fhPtNoIsoMC[mcIndex]->Fill(pt);
       }
       
@@ -4254,7 +4460,7 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
       if(primStack->Energy() == TMath::Abs(primStack->Pz()))  continue ; //Protection against floating point exception
       
       //printf("i %d, %s %d  %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
-      //       prim->GetName(), prim->GetPdgCode());
+      //       primStack->GetName(), primStack->GetPdgCode());
       
       //photonY   = 0.5*TMath::Log((prim->Energy()+prim->Pz())/(prim->Energy()-prim->Pz())) ;
       
@@ -4330,23 +4536,26 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
     // Check the origin of the photon or if it is a pi0, assing a tag
     Int_t pi0d1Label = -1, pi0d2Label = -1;
     Bool_t overlapPi0 = kTRUE;
-    if(pdg==111)
+    if( pdg == 111 || pdg == 221 )
     {
-      mcIndex = kmcPrimPi0;
-      //printf("check pi0\n");
+      if( pdg == 111 ) mcIndex = kmcPrimPi0;
+      else             mcIndex = kmcPrimEta;
+      
+      //printf("check meson pdg %d\n",pdg);
+      
       // Get the labels of the decay particles, remove them from isolation cone
       // Get also the opening angle and check if decays likely overlap
       Bool_t okpi0 = kFALSE;
       Int_t ndaugh = GetMCAnalysisUtils()->GetNDaughters(i,GetReader(), okpi0);
-      //printf("OK pi0 %d, ndaugh %d\n",okpi0,ndaugh);
+     // printf("OK pi0 %d, ndaugh %d\n",okpi0,ndaugh);
       Int_t d1Pdg = 0, d1Status = 0; Bool_t ok1 = kFALSE;
       Int_t d2Pdg = 0, d2Status = 0; Bool_t ok2 = kFALSE;
      
       if ( ndaugh > 0 ) fMomDaugh1 = GetMCAnalysisUtils()->GetDaughter(0,i,GetReader(),d1Pdg, d1Status,ok1, pi0d1Label);
       if ( ndaugh > 1 ) fMomDaugh2 = GetMCAnalysisUtils()->GetDaughter(1,i,GetReader(),d2Pdg, d2Status,ok2, pi0d2Label);
       
-      //printf("pi0 daug %d: a) %d, b) %d, c) %d\n", ndaugh,pi0d1Label,pi0d2Label);
-      //if ( ndaugh !=2 ) printf("PDG: %d, %d, %d\n",d1Pdg,d2Pdg);
+      //printf("pi0 daug %d: a) %d, b) %d\n", ndaugh,pi0d1Label,pi0d2Label);
+      //if ( ndaugh !=2 ) printf("PDG: %d, %d\n",d1Pdg,d2Pdg);
       
       // Select decays in 2 photons
       if( ndaugh!=2 || (d2Pdg != d1Pdg && d1Pdg!=22)) okpi0 = kFALSE;
@@ -4359,24 +4568,27 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
         //printf("  -- d12 angle %2.3f, angle limit %2.3f, overlap %d\n",d12Angle,overlapAngle,overlapPi0);
       }
     }
-    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) )
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) )
     {
       mcIndex = kmcPrimPrompt;
     }
-    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) )
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) )
     {
       mcIndex = kmcPrimFrag ;
     }
-    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) )
     {
       mcIndex = kmcPrimISR;
     }
-    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) )
     {
       mcIndex = kmcPrimPi0Decay;
     }
-    else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
-              GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)))
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) )
+    {
+      mcIndex = kmcPrimEtaDecay;
+    }
+    else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) )
     {
       mcIndex = kmcPrimOtherDecay;
     }
@@ -4386,6 +4598,8 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
       mcIndex = kmcPrimOtherDecay;
     }//Other origin
     
+    //printf("mcIndex %d\n",mcIndex);
+    
     // ////////////////////ISO MC/////////////////////////
     Double_t sumPtInCone = 0; Double_t dR=0. ;
     TParticle        * mcisopStack = 0;
@@ -4501,7 +4715,7 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
     fhEPrimMC  [mcIndex]->Fill(photonE ) ;
     fhPtPrimMC [mcIndex]->Fill(photonPt) ;
     
-    // In case the photon is a decay from pi0,
+    // In case the photon is a decay from pi0 or eta,
     // study how the decay kinematics affects the isolation
     Int_t  ndaugh   = -1;
     Bool_t okpi0    =  0, ok1     =  0, ok2     =  0;
@@ -4509,90 +4723,131 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
     Bool_t d2Acc   = kTRUE, overlap = kTRUE;
     Int_t  d2AbsId = -1;
     Float_t dRdaugh2 = 0, d12Angle = 0;
-    if(mcIndex == kmcPrimPi0Decay && fMakePrimaryPi0DecayStudy)
+    
+    if(fMakePrimaryPi0DecayStudy)
     {
-      GetMCAnalysisUtils()->GetMotherWithPDG(i,111,GetReader(),okpi0, pi0label);
-      if(okpi0)
+      if( (mcIndex == kmcPrimPi0Decay || mcIndex == kmcPrimEtaDecay ) )
       {
-        ndaugh = GetMCAnalysisUtils()->GetNDaughters(pi0label,GetReader(), okpi0);
-        if(ndaugh==2)
+        if(mcIndex == kmcPrimPi0Decay) GetMCAnalysisUtils()->GetMotherWithPDG(i,111,GetReader(),okpi0, pi0label);
+        else                           GetMCAnalysisUtils()->GetMotherWithPDG(i,221,GetReader(),okpi0, pi0label);
+        
+        if(okpi0)
         {
-          Int_t d1Pdg = 0, d1Status = 0;
-          fMomDaugh1 = GetMCAnalysisUtils()->GetDaughter(0,pi0label,GetReader(),d1Pdg, d1Status,ok1, d1Label);
-          Int_t d2Pdg = 0, d2Status = 0;
-          fMomDaugh2 = GetMCAnalysisUtils()->GetDaughter(1,pi0label,GetReader(),d2Pdg, d2Status,ok2, d2Label);
-          if(d2Pdg != d1Pdg && d1Pdg!=22) okpi0 = kFALSE;
-
-          // Check the momentum and location of second daughter
-          if(okpi0)
+          ndaugh = GetMCAnalysisUtils()->GetNDaughters(pi0label,GetReader(), okpi0);
+          if(ndaugh==2)
           {
-            // assign current trigger to first daughter
-            if(d1Label!=i)
+            Int_t d1Pdg = 0, d1Status = 0;
+            fMomDaugh1 = GetMCAnalysisUtils()->GetDaughter(0,pi0label,GetReader(),d1Pdg, d1Status,ok1, d1Label);
+            Int_t d2Pdg = 0, d2Status = 0;
+            fMomDaugh2 = GetMCAnalysisUtils()->GetDaughter(1,pi0label,GetReader(),d2Pdg, d2Status,ok2, d2Label);
+            if(d2Pdg != d1Pdg && d1Pdg!=22) okpi0 = kFALSE;
+            
+            // Check the momentum and location of second daughter
+            if(okpi0)
             {
-              Int_t tmpLabel = d2Label;
-              d2Label = d1Label;
-              d1Label = tmpLabel;
-              fMomentum  = fMomDaugh2;
-              fMomDaugh2 = fMomDaugh1;
-              fMomDaugh1 = fMomentum;
+              // assign current trigger to first daughter
+              if(d1Label!=i)
+              {
+                Int_t tmpLabel = d2Label;
+                d2Label = d1Label;
+                d1Label = tmpLabel;
+                fMomentum  = fMomDaugh2;
+                fMomDaugh2 = fMomDaugh1;
+                fMomDaugh1 = fMomentum;
+              }
+              
+              // Check if photons hit the Calorimeter acceptance
+              if(IsRealCaloAcceptanceOn() && fIsoDetector!=kCTS) // defined on base class
+                d2Acc = GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(fIsoDetector,fMomDaugh2.Eta(),
+                                                                            fMomDaugh2.Theta(),fMomDaugh2.Phi(),d2AbsId) ;
+              
+              //printf("D2  (eta %2.2f,phi %2.2f)in real calo %d, with absId %d\n",
+              //       daugh2mom.Eta(), daugh2mom.Phi()*TMath::RadToDeg(),d2Acc,d2AbsId);
+              
+              // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
+              if(d2Acc) d2Acc = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomDaugh2.Eta(),fMomDaugh2.Phi(),fIsoDetector);
+              //printf("D2 fidcut %d\n",d2Acc);
+              
+              Float_t phiDaugh2 = fMomDaugh2.Phi();
+              if(phiDaugh2 < 0) phiDaugh2+=TMath::TwoPi();
+              dRdaugh2 = GetIsolationCut()->Radius(photonEta, photonPhi, fMomDaugh2.Eta(),phiDaugh2);
+              
+              // Opening angle, check if pairs will likely overlap
+              d12Angle = fMomDaugh1.Angle(fMomDaugh2.Vect());
+              if(d12Angle > overlapAngle) overlap = kFALSE;
+              
             }
-            
-            // Check if photons hit the Calorimeter acceptance
-            if(IsRealCaloAcceptanceOn() && fIsoDetector!=kCTS) // defined on base class
-                 d2Acc = GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(fIsoDetector,fMomDaugh2.Eta(),
-                                                                             fMomDaugh2.Theta(),fMomDaugh2.Phi(),d2AbsId) ;
-
-            //printf("D2  (eta %2.2f,phi %2.2f)in real calo %d, with absId %d\n",
-            //       daugh2mom.Eta(), daugh2mom.Phi()*TMath::RadToDeg(),d2Acc,d2AbsId);
-            
-            // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
-            if(d2Acc) d2Acc = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomDaugh2.Eta(),fMomDaugh2.Phi(),fIsoDetector);
-            //printf("D2 fidcut %d\n",d2Acc);
-            
-            Float_t phiDaugh2 = fMomDaugh2.Phi();
-            if(phiDaugh2 < 0) phiDaugh2+=TMath::TwoPi();
-            dRdaugh2 = GetIsolationCut()->Radius(photonEta, photonPhi, fMomDaugh2.Eta(),phiDaugh2);
-
-            // Opening angle, check if pairs will likely overlap
-            d12Angle = fMomDaugh1.Angle(fMomDaugh2.Vect());
-            if(d12Angle > overlapAngle) overlap = kFALSE;
-
           }
         }
-      }
-      
-      //printf("Check mother of label %d: mom label %d, okmom %d ndaugh %d, daugh label1 %d, label2 %d, ok1 %d, ok2 %d, R %2.3f, opening angle %2.3f, overlap %d\n",
-      //       i, pi0label,okpi0,ndaugh,d1Label,d2Label,ok1,ok2, dRdaugh2, d12Angle, overlap);
-      
-      // Second decay out of cone
-      if(dRdaugh2 > GetIsolationCut()->GetConeSize())
-        fhPtPrimMCPi0DecayPairOutOfCone->Fill(photonPt);
-      
-      // Second decay out of acceptance
-      if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
-      {
-        fhPtPrimMCPi0DecayPairOutOfAcceptance->Fill(photonPt);
-        if(!overlap) fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap->Fill(photonPt);
-      }
-      
-      // Not Overlapped decay
-      if(!overlap) fhPtPrimMCPi0DecayPairNoOverlap->Fill(photonPt);
-      
-      // Second decay pt smaller than threshold
-      if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
-         fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
-      {
-        fhPtPrimMCPi0DecayPairAcceptInConeLowPt->Fill(photonPt);
-        if(!overlap)
+        
+        //printf("Check mother of label %d: mom label %d, okmom %d ndaugh %d, daugh label1 %d, label2 %d, ok1 %d, ok2 %d, R %2.3f, opening angle %2.3f, overlap %d\n",
+        //       i, pi0label,okpi0,ndaugh,d1Label,d2Label,ok1,ok2, dRdaugh2, d12Angle, overlap);
+        
+        if(mcIndex == kmcPrimPi0Decay)
         {
-          fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
-          if(fMomDaugh2.E() > minECalo) fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
-        }
+          // Second decay out of cone
+          if(dRdaugh2 > GetIsolationCut()->GetConeSize())
+            fhPtPrimMCPi0DecayPairOutOfCone->Fill(photonPt);
+          
+          // Second decay out of acceptance
+          if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
+          {
+            fhPtPrimMCPi0DecayPairOutOfAcceptance->Fill(photonPt);
+            if(!overlap) fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap->Fill(photonPt);
+          }
+          
+          // Not Overlapped decay
+          if(!overlap) fhPtPrimMCPi0DecayPairNoOverlap->Fill(photonPt);
+          
+          // Second decay pt smaller than threshold
+          if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
+             fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
+          {
+            fhPtPrimMCPi0DecayPairAcceptInConeLowPt->Fill(photonPt);
+            if(!overlap)
+            {
+              fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
+              if(fMomDaugh2.E() > minECalo) fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
+            }
+          }
+        } // pi0 decay
+        else // eta decay
+        {
+          // Second decay out of cone
+          if(dRdaugh2 > GetIsolationCut()->GetConeSize())
+            fhPtPrimMCEtaDecayPairOutOfCone->Fill(photonPt);
+          
+          // Second decay out of acceptance
+          if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
+          {
+            fhPtPrimMCEtaDecayPairOutOfAcceptance->Fill(photonPt);
+            if(!overlap) fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap->Fill(photonPt);
+          }
+          
+          // Not Overlapped decay
+          if(!overlap) fhPtPrimMCEtaDecayPairNoOverlap->Fill(photonPt);
+          
+          // Second decay pt smaller than threshold
+          if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
+             fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
+          {
+            fhPtPrimMCEtaDecayPairAcceptInConeLowPt->Fill(photonPt);
+            if(!overlap)
+            {
+              fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
+              if(fMomDaugh2.E() > minECalo) fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
+            }
+          }
+        } // eta decay
+        
+      } // eta or pi0 decay
+
+      if(overlapPi0)
+      {
+        if( mcIndex == kmcPrimPi0) fhPtPrimMCPi0Overlap->Fill(photonPt);
+        if( mcIndex == kmcPrimEta) fhPtPrimMCEtaOverlap->Fill(photonPt);
       }
-    } // pi0 decay
-    
-    if(mcIndex == kmcPrimPi0 && fMakePrimaryPi0DecayStudy && overlapPi0)
-      fhPtPrimMCPi0Overlap->Fill(photonPt);
+    }
     
     // Isolated?
     Bool_t isolated = kFALSE;
@@ -4609,39 +4864,74 @@ void AliAnaParticleIsolation::FillAcceptanceHistograms()
     {
       fhPtPrimMCiso [mcIndex]      ->Fill(photonPt) ;
       fhPtPrimMCiso [kmcPrimPhoton]->Fill(photonPt) ;
-      if(mcIndex == kmcPrimPi0Decay && fMakePrimaryPi0DecayStudy)
+      
+      if(fMakePrimaryPi0DecayStudy)
       {
-        // Not Overlapped decay
-        if(!overlap) fhPtPrimMCPi0DecayIsoPairNoOverlap->Fill(photonPt);
-        
-        // Second decay out of cone
-        if(dRdaugh2 > GetIsolationCut()->GetConeSize())
-          fhPtPrimMCPi0DecayIsoPairOutOfCone->Fill(photonPt);
-        
-        // Second decay out of acceptance
-        if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
+        if( mcIndex == kmcPrimPi0Decay )
         {
-          fhPtPrimMCPi0DecayIsoPairOutOfAcceptance->Fill(photonPt);
-          if(!overlap) fhPtPrimMCPi0DecayIsoPairOutOfAcceptanceNoOverlap->Fill(photonPt);
-        }
-        
-        // Second decay pt smaller than threshold
-        if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
-           fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
+          // Not Overlapped decay
+          if(!overlap) fhPtPrimMCPi0DecayIsoPairNoOverlap->Fill(photonPt);
+          
+          // Second decay out of cone
+          if(dRdaugh2 > GetIsolationCut()->GetConeSize())
+            fhPtPrimMCPi0DecayIsoPairOutOfCone->Fill(photonPt);
+          
+          // Second decay out of acceptance
+          if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
+          {
+            fhPtPrimMCPi0DecayIsoPairOutOfAcceptance->Fill(photonPt);
+            if(!overlap) fhPtPrimMCPi0DecayIsoPairOutOfAcceptanceNoOverlap->Fill(photonPt);
+          }
+          
+          // Second decay pt smaller than threshold
+          if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
+             fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
+          {
+            fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt->Fill(photonPt);
+            if(!overlap)
+            {
+              fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
+              if(fMomDaugh2.E() > minECalo) fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
+            }
+          }
+        }// pi0 decay
+        else if( mcIndex == kmcPrimEtaDecay )
         {
-          fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt->Fill(photonPt);
-          if(!overlap)
+          // Not Overlapped decay
+          if(!overlap) fhPtPrimMCEtaDecayIsoPairNoOverlap->Fill(photonPt);
+          
+          // Second decay out of cone
+          if(dRdaugh2 > GetIsolationCut()->GetConeSize())
+            fhPtPrimMCEtaDecayIsoPairOutOfCone->Fill(photonPt);
+          
+          // Second decay out of acceptance
+          if(!ok2 || !d2Acc || fMomDaugh2.E() <= minECalo)
           {
-            fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
-            if(fMomDaugh2.E() > minECalo) fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
+            fhPtPrimMCEtaDecayIsoPairOutOfAcceptance->Fill(photonPt);
+            if(!overlap) fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap->Fill(photonPt);
           }
+          
+          // Second decay pt smaller than threshold
+          if(d2Acc && dRdaugh2 < GetIsolationCut()->GetConeSize() &&
+             fMomDaugh2.E() < GetIsolationCut()->GetPtThreshold())
+          {
+            fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt->Fill(photonPt);
+            if(!overlap)
+            {
+              fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap->Fill(photonPt);
+              if(fMomDaugh2.E() > minECalo) fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE->Fill(photonPt);
+            }
+          }
+        }// eta decay
+        
+        if(overlapPi0)
+        {
+          if( mcIndex == kmcPrimPi0 ) fhPtPrimMCPi0IsoOverlap->Fill(photonPt);
+          if( mcIndex == kmcPrimEta ) fhPtPrimMCEtaIsoOverlap->Fill(photonPt);
         }
-      }// pi0 decay
-      
-      if(mcIndex == kmcPrimPi0 && fMakePrimaryPi0DecayStudy && overlapPi0)
-        fhPtPrimMCPi0IsoOverlap->Fill(photonPt);
-      
+      }
     } // isolated
+
   }//loop on primaries
   
   AliDebug(1,"End");
@@ -4691,8 +4981,11 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
     if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
       fhPtNoIsoMC[kmcPhoton]->Fill(ptC);
     
-    if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-      fhPtNoIsoMC[kmcPi0DecayLostPair]->Fill(ptC);
+    if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+    {
+      if     ( mcIndex==kmcPi0Decay ) fhPtNoIsoMC[kmcPi0DecayLostPair]->Fill(ptC);
+      else if( mcIndex==kmcEtaDecay ) fhPtNoIsoMC[kmcEtaDecayLostPair]->Fill(ptC);
+    }
     
     fhPtNoIsoMC[mcIndex]->Fill(ptC);
   }
@@ -4712,8 +5005,11 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
           if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
             fhPtDecayMC[0][ibit][kmcPhoton]->Fill(ptC);
 
-          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-            fhPtDecayMC[0][ibit][kmcPi0DecayLostPair]->Fill(ptC);
+          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+          {
+           if      (mcIndex==kmcPi0Decay) fhPtDecayMC[0][ibit][kmcPi0DecayLostPair]->Fill(ptC);
+           else if (mcIndex==kmcEtaDecay) fhPtDecayMC[0][ibit][kmcEtaDecayLostPair]->Fill(ptC);
+          }
           
           fhPtDecayMC[0][ibit][mcIndex]->Fill(ptC);
         }
@@ -4823,8 +5119,11 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
       if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
         fhSumPtLeadingPtMC[kmcPhoton][icone]->Fill(ptC,coneptsum) ;
       
-      if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-        fhSumPtLeadingPtMC[kmcPi0DecayLostPair][icone]->Fill(ptC,coneptsum) ;
+      if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+      {
+        if      ( mcIndex==kmcPi0Decay ) fhSumPtLeadingPtMC[kmcPi0DecayLostPair][icone]->Fill(ptC,coneptsum) ;
+        else if ( mcIndex==kmcEtaDecay ) fhSumPtLeadingPtMC[kmcEtaDecayLostPair][icone]->Fill(ptC,coneptsum) ;
+      }
       
       fhSumPtLeadingPtMC[mcIndex][icone]->Fill(ptC,coneptsum) ;
     }
@@ -4873,9 +5172,12 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
           if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
             fhPtThresIsolatedMC[kmcPhoton][icone][ipt]->Fill(ptC) ;
           
-          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-            fhPtThresIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
-
+          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+          {
+            if     (mcIndex == kmcPi0Decay) fhPtThresIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
+            else if(mcIndex == kmcEtaDecay) fhPtThresIsolatedMC[kmcEtaDecayLostPair][icone][ipt]->Fill(ptC) ;
+          }
+          
           fhPtThresIsolatedMC[mcIndex][icone][ipt]->Fill(ptC) ;
           
         }
@@ -4903,8 +5205,11 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
           if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
             fhPtFracIsolatedMC[kmcPhoton][icone][ipt]->Fill(ptC) ;
           
-          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-            fhPtFracIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
+          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+          {
+            if     ( mcIndex == kmcPi0Decay ) fhPtFracIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
+            else if( mcIndex == kmcEtaDecay ) fhPtFracIsolatedMC[kmcEtaDecayLostPair][icone][ipt]->Fill(ptC) ;
+          }
           
           fhPtFracIsolatedMC[mcIndex][icone][ipt]->Fill(ptC) ;
         }
@@ -4934,8 +5239,11 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
           if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
             fhSumPtIsolatedMC[kmcPhoton][icone][ipt]->Fill(ptC) ;
           
-          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==kmcPi0Decay )
-            fhSumPtIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
+          if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCDecayPairLost) )
+          {
+            if     ( mcIndex == kmcPi0Decay ) fhSumPtIsolatedMC[kmcPi0DecayLostPair][icone][ipt]->Fill(ptC) ;
+            else if( mcIndex == kmcEtaDecay ) fhSumPtIsolatedMC[kmcEtaDecayLostPair][icone][ipt]->Fill(ptC) ;
+          }
           
           fhSumPtIsolatedMC[mcIndex][icone][ipt]->Fill(ptC) ;
         }
index 2a1a95a..b92626c 100755 (executable)
@@ -152,16 +152,19 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
   void         SwitchOffPrimariesPi0DecayStudy()     { fMakePrimaryPi0DecayStudy = kFALSE; }
   
   // For primary histograms in arrays, index in the array, corresponding to a photon origin
-  enum mcPrimTypes { kmcPrimPhoton = 0, kmcPrimPi0Decay = 1, kmcPrimOtherDecay  = 2,
-                     kmcPrimPrompt = 3, kmcPrimFrag     = 4, kmcPrimISR         = 5, kmcPrimPi0 = 6 } ;
-  static const Int_t fgkNmcPrimTypes = 7;
+  enum mcPrimTypes { kmcPrimPhoton = 0, kmcPrimPi0Decay = 1, kmcPrimEtaDecay  = 2, kmcPrimOtherDecay  = 3,
+                     kmcPrimPrompt = 4, kmcPrimFrag     = 5, kmcPrimISR       = 6,
+                     kmcPrimPi0    = 7, kmcPrimEta      = 8                                               } ;
+  
+  static const Int_t fgkNmcPrimTypes = 9;
   
   // For histograms in arrays, index in the array, corresponding to any particle origin
   enum mcTypes     { kmcPhoton   = 0, kmcPrompt     = 1, kmcFragment         = 2,
                      kmcPi0      = 3, kmcPi0Decay   = 4, kmcPi0DecayLostPair = 5,
-                     kmcEtaDecay = 6, kmcOtherDecay = 7,
-                     kmcElectron = 8, kmcHadron     = 9                          } ;
-  static const Int_t fgkNmcTypes = 10;
+                     kmcEta      = 6, kmcEtaDecay   = 7, kmcEtaDecayLostPair = 8,
+                     kmcOtherDecay=9, kmcElectron   =10, kmcHadron           =11  } ;
+  
+  static const Int_t fgkNmcTypes = 12;
 
  private:
   
@@ -380,6 +383,27 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
   TH1F *   fhPtPrimMCPi0IsoOverlap;               //! Pi0 isolated with overlapped decay photons
 
   
+  TH1F *   fhPtPrimMCEtaDecayPairOutOfCone;       //! Eta decay photons, with decay pair out of isolation cone
+  TH1F *   fhPtPrimMCEtaDecayPairOutOfAcceptance; //! Eta decay photons, with decay pair out of detector acceptance
+  TH1F *   fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap; //! Eta decay photons, with decay pair out of detector acceptance
+  TH1F *   fhPtPrimMCEtaDecayPairAcceptInConeLowPt;//! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold
+  TH1F *   fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap; //! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold, and do not overlap
+  TH1F *   fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE; //! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold, and larger than detector threshold, and do not overlap
+  TH1F *   fhPtPrimMCEtaDecayPairNoOverlap;        //! Eta decay photons, not overlapped decay
+  
+  TH1F *   fhPtPrimMCEtaDecayIsoPairOutOfCone;       //! Eta decay photons, with decay pair out of isolation cone, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairOutOfAcceptance; //! Eta decay photons, with decay pair out of detector acceptance, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap; //! Eta decay photons, with decay pair out of detector acceptance, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt;//! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap; //! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold, and do not overlap, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE; //! Eta decay photons, with decay pair in cone and acceptance and lower pT than threshold, and larger than detector threshold, and do not overlap, isolated
+  TH1F *   fhPtPrimMCEtaDecayIsoPairNoOverlap;    //! Eta decay photons isolated, not overlapped decay
+  
+  TH1F *   fhPtPrimMCEtaOverlap;                  //! Eta with overlapped decay photons
+  TH1F *   fhPtPrimMCEtaIsoOverlap;               //! Eta isolated with overlapped decay photons
+
+  
+  
   TH1F *   fhPtNoIsoMC  [fgkNmcTypes];            //! Number of not isolated mcTypes particle
   TH1F *   fhPtIsoMC    [fgkNmcTypes];            //! Number of isolated mcTypes particle
   TH2F *   fhPhiIsoMC   [fgkNmcTypes];            //! Phi of isolated mcTypes particle
@@ -495,7 +519,7 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
   AliAnaParticleIsolation(              const AliAnaParticleIsolation & iso) ; // cpy ctor
   AliAnaParticleIsolation & operator = (const AliAnaParticleIsolation & iso) ; // cpy assignment
   
-  ClassDef(AliAnaParticleIsolation,33)
+  ClassDef(AliAnaParticleIsolation,34)
 } ;
 
 
index e7a5f5f..49e5e12 100755 (executable)
@@ -60,7 +60,7 @@ fTimeCutMin(-10000),          fTimeCutMax(10000),
 fNCellsCut(0),
 fNLMCutMin(-1),               fNLMCutMax(10),
 fFillSSHistograms(kFALSE),    fFillOnlySimpleSSHisto(1),
-fNOriginHistograms(8),        fNPrimaryHistograms(4),
+fNOriginHistograms(9),        fNPrimaryHistograms(5),
 fMomentum(),                  fPrimaryMom(),
 // Histograms
 
@@ -113,7 +113,7 @@ fhPtClusterSM(0),                     fhPtPhotonSM(0)
 {
   //default ctor
   
-  for(Int_t i = 0; i < 14; i++)
+  for(Int_t i = 0; i < fgkNmcTypes; i++)
   {
     fhMCPt     [i] = 0;
     fhMCE      [i] = 0;
@@ -125,7 +125,7 @@ fhPtClusterSM(0),                     fhPtPhotonSM(0)
     fhMC2Pt    [i] = 0;
   }
   
-  for(Int_t i = 0; i < 7; i++)
+  for(Int_t i = 0; i < fgkNmcPrimTypes; i++)
   {
     fhPtPrimMC [i] = 0;
     fhEPrimMC  [i] = 0;
@@ -138,15 +138,18 @@ fhPtClusterSM(0),                     fhPtPhotonSM(0)
     fhPhiPrimMCAcc[i] = 0;
     fhEtaPrimMCAcc[i] = 0;
     fhYPrimMCAcc  [i] = 0;
-    
+  }
+  
+  for(Int_t i = 0; i < 7; i++)
+  {
     fhDispEtaDispPhi[i] = 0;
     fhLambda0DispPhi[i] = 0;
     fhLambda0DispEta[i] = 0;
-
+    
     fhPtPhotonPileUp[i] = 0;
     fhClusterTimeDiffPhotonPileUp [i] = 0;
-
-    for(Int_t j = 0; j < 6; j++)
+    
+    for(Int_t j = 0; j < fgkNssTypes; j++)
     {
       fhMCDispEtaDispPhi[i][j] = 0;
       fhMCLambda0DispEta[i][j] = 0;
@@ -154,7 +157,7 @@ fhPtClusterSM(0),                     fhPtPhotonSM(0)
     }
   }
   
-  for(Int_t i = 0; i < 6; i++)
+  for(Int_t i = 0; i < fgkNssTypes; i++)
   {
     fhMCELambda0    [i]                  = 0;
     fhMCELambda1    [i]                  = 0;
@@ -465,7 +468,7 @@ void AliAnaPhoton::FillAcceptanceHistograms()
     Bool_t takeIt  = kFALSE ;
     if(status == 1 && GetMCAnalysisUtils()->GetMCGenerator() != AliMCAnalysisUtils::kBoxLike ) takeIt = kTRUE ;
 
-    if      (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) continue;
+    if     (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) continue;
     
     //Origin of photon
     if     (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt))
@@ -484,8 +487,11 @@ void AliAnaPhoton::FillAcceptanceHistograms()
     {
       mcIndex = kmcPPi0Decay;
     }
-    else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
-              GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)))
+    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
+    {
+      mcIndex = kmcPEtaDecay;
+    }
+    else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay))
     {
       mcIndex = kmcPOtherDecay;
     }
@@ -1781,13 +1787,15 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
   
   if(IsDataMC())
   {
-    TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
-      "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P",
-      "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String"                                } ;
+    TString ptype[] = { "#gamma"         , "#gamma_{#pi decay}"    , "#gamma_{#eta decay}", "#gamma_{other decay}",
+                        "#pi^{0}"        , "#eta"                  , "e^{#pm}"            , "#gamma->e^{#pm}"     ,
+                        "hadron?"        , "Anti-N"                , "Anti-P"             ,
+                        "#gamma_{prompt}", "#gamma_{fragmentation}", "#gamma_{ISR}"       , "String"               } ;
     
-    TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
-      "Conversion", "Hadron", "AntiNeutron","AntiProton",
-      "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ;
+    TString pname[] = { "Photon"      , "PhotonPi0Decay"     , "PhotonEtaDecay", "PhotonOtherDecay",
+                        "Pi0"         , "Eta"                , "Electron"      , "Conversion"      ,
+                        "Hadron"      , "AntiNeutron"        , "AntiProton"    ,
+                        "PhotonPrompt", "PhotonFragmentation", "PhotonISR"     , "String"           } ;
     
     for(Int_t i = 0; i < fNOriginHistograms; i++)
     {
@@ -1849,11 +1857,13 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
       
     }
     
-    TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}",
-      "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ;
+    TString pptype[] = { "#gamma"             , "#gamma_{#pi decay}"    ,
+                         "#gamma_{#eta decay}", "#gamma_{other decay}"  ,
+                         "#gamma_{prompt}"    , "#gamma_{fragmentation}", "#gamma_{ISR}" } ;
     
-    TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay",
-      "PhotonPrompt","PhotonFragmentation","PhotonISR"} ;
+    TString ppname[] = { "Photon"        , "PhotonPi0Decay"     ,
+                         "PhotonEtaDecay", "PhotonOtherDecay"   ,
+                         "PhotonPrompt"  , "PhotonFragmentation", "PhotonISR" } ;
     
     for(Int_t i = 0; i < fNPrimaryHistograms; i++)
     {
@@ -2586,50 +2596,52 @@ void  AliAnaPhoton::MakeAnalysisFillHistograms()
           fhMCDeltaPt[kmcConversion] ->Fill(ptcluster,ptprim-ptcluster);
         }
         
-        if     (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt))
+        if     ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) )
         {
           mcParticleTag = kmcPrompt;
         }
-        else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation))
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) )
         {
           mcParticleTag = kmcFragmentation;
         }
-        else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) )
         {
           mcParticleTag = kmcISR;
         }
-        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) &&
-                !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
-        {
-          mcParticleTag = kmcPi0Decay;
-        }
-        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
         {
           mcParticleTag = kmcPi0;
         }
-        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) &&
-                !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
         {
           mcParticleTag = kmcEta;
         }
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) )
+        {
+          mcParticleTag = kmcPi0Decay;
+        }
+        else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) )
+        {
+          mcParticleTag = kmcEtaDecay;
+        }
         else
         {
           mcParticleTag = kmcOtherDecay;
         }
       }
-      else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron))
+      else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) )
       {
         mcParticleTag = kmcAntiNeutron;
       }
-      else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton))
+      else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) )
       {
         mcParticleTag = kmcAntiProton;
       }
-      else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
+      else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) )
       {
         mcParticleTag = kmcElectron;
       }
-      else if( fhMCE[kmcOther])
+      else if( fhMCE[kmcOther] )
       {
         mcParticleTag = kmcOther;
         
index f2a7fc5..6c9fc66 100755 (executable)
@@ -94,23 +94,29 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   void         SwitchOffTrackMatchRejection()         { fRejectTrackMatch = kFALSE ; }  
   
   void         FillNOriginHistograms(Int_t n)         { fNOriginHistograms = n ; 
-    if(n > 14) fNOriginHistograms = 14; }
+    if(n > fgkNmcTypes    ) fNOriginHistograms  = fgkNmcTypes     ; }
   void         FillNPrimaryHistograms(Int_t n)        { fNPrimaryHistograms= n ;
-    if(n > 6)  fNPrimaryHistograms = 6; }
+    if(n > fgkNmcPrimTypes) fNPrimaryHistograms = fgkNmcPrimTypes ; }
 
   // For histograms in arrays, index in the array, corresponding to a particle
-  enum mcTypes    { kmcPhoton = 0,        kmcPi0Decay = 1,       kmcOtherDecay = 2,  
-                    kmcPi0 = 3,           kmcEta = 4,            kmcElectron = 5,       
-                    kmcConversion = 6,    kmcOther = 7,          kmcAntiNeutron = 8,    
-                    kmcAntiProton = 9,    kmcPrompt = 10,        kmcFragmentation = 11, 
-                    kmcISR = 12,          kmcString = 13                               };  
+  enum mcTypes    { kmcPhoton     =  0,    kmcPi0Decay = 1,       kmcEtaDecay      = 2,  kmcOtherDecay = 3,
+                    kmcPi0        =  4,    kmcEta      = 5,       kmcElectron      = 6,
+                    kmcConversion =  7,    kmcOther    = 8,       kmcAntiNeutron   = 9,
+                    kmcAntiProton = 10,    kmcPrompt   = 11,      kmcFragmentation = 12,
+                    kmcISR        = 13,    kmcString   = 14  };
 
-  enum mcPTypes   { kmcPPhoton = 0,       kmcPPi0Decay = 1,       kmcPOtherDecay = 2,
-                    kmcPPrompt = 3,       kmcPFragmentation = 4,  kmcPISR = 5           };
+  static const Int_t fgkNmcTypes = 15;
+
+  enum mcPTypes   { kmcPPhoton = 0,       kmcPPi0Decay      = 1,  kmcPEtaDecay = 2,     kmcPOtherDecay = 3,
+                    kmcPPrompt = 4,       kmcPFragmentation = 5,  kmcPISR      = 6 };
+  
+  static const Int_t fgkNmcPrimTypes = 7;
   
   enum mcssTypes  { kmcssPhoton = 0,      kmcssOther = 1,       kmcssPi0 = 2,         
                     kmcssEta = 3,         kmcssConversion = 4,  kmcssElectron = 5       };  
   
+  static const Int_t fgkNssTypes = 6 ;
+  
   private:
  
   Float_t  fMinDist ;                               // Minimal distance to bad channel to accept cluster
@@ -202,54 +208,54 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   
   //Fill MC dependent histograms, Origin of this cluster is ...
 
-  TH2F * fhMCDeltaE[14]  ;                          //! MC-Reco E distribution coming from MC particle
-  TH2F * fhMCDeltaPt[14] ;                          //! MC-Reco pT distribution coming from MC particle
-  TH2F * fhMC2E[14]  ;                              //! E distribution, Reco vs MC coming from MC particle
-  TH2F * fhMC2Pt[14] ;                              //! pT distribution, Reco vs MC coming from MC particle
-  
-  TH1F * fhMCE[14];                                 //! Number of identified photon vs cluster energy coming from MC particle
-  TH1F * fhMCPt[14];                                //! Number of identified photon vs cluster pT     coming from MC particle
-  TH2F * fhMCPhi[14];                               //! Phi of identified photon coming from MC particle
-  TH2F * fhMCEta[14];                               //! eta of identified photon coming from MC particle
+  TH2F * fhMCDeltaE [fgkNmcTypes];                  //! MC-Reco E distribution coming from MC particle
+  TH2F * fhMCDeltaPt[fgkNmcTypes];                  //! MC-Reco pT distribution coming from MC particle
+  TH2F * fhMC2E     [fgkNmcTypes];                  //! E distribution, Reco vs MC coming from MC particle
+  TH2F * fhMC2Pt    [fgkNmcTypes];                  //! pT distribution, Reco vs MC coming from MC particle
+  
+  TH1F * fhMCE  [fgkNmcTypes];                      //! Number of identified photon vs cluster energy coming from MC particle
+  TH1F * fhMCPt [fgkNmcTypes];                      //! Number of identified photon vs cluster pT     coming from MC particle
+  TH2F * fhMCPhi[fgkNmcTypes];                      //! Phi of identified photon coming from MC particle
+  TH2F * fhMCEta[fgkNmcTypes];                      //! eta of identified photon coming from MC particle
 
-  TH1F * fhEPrimMC[7];                              //! Number of generated photon vs energy
-  TH1F * fhPtPrimMC[7];                             //! Number of generated photon vs pT
-  TH2F * fhPhiPrimMC[7];                            //! Phi of generted photon
-  TH2F * fhYPrimMC[7];                              //! Rapidity of generated photon
-  TH2F * fhEtaPrimMC[7];                            //! Eta of generated photon
-  
-  TH1F * fhEPrimMCAcc[7];                           //! Number of generated photon vs energy, in calorimeter acceptance
-  TH1F * fhPtPrimMCAcc[7];                          //! Number of generated photon vs pT, in calorimeter acceptance
-  TH2F * fhPhiPrimMCAcc[7];                         //! Phi of generted photon, in calorimeter acceptance
-  TH2F * fhEtaPrimMCAcc[7];                         //! Phi of generted photon, in calorimeter acceptance
-  TH2F * fhYPrimMCAcc[7];                           //! Rapidity of generated photon, in calorimeter acceptance
+  TH1F * fhEPrimMC  [fgkNmcPrimTypes];              //! Number of generated photon vs energy
+  TH1F * fhPtPrimMC [fgkNmcPrimTypes];              //! Number of generated photon vs pT
+  TH2F * fhPhiPrimMC[fgkNmcPrimTypes];              //! Phi of generted photon
+  TH2F * fhYPrimMC  [fgkNmcPrimTypes];              //! Rapidity of generated photon
+  TH2F * fhEtaPrimMC[fgkNmcPrimTypes];              //! Eta of generated photon
+  
+  TH1F * fhEPrimMCAcc  [fgkNmcPrimTypes];           //! Number of generated photon vs energy, in calorimeter acceptance
+  TH1F * fhPtPrimMCAcc [fgkNmcPrimTypes];           //! Number of generated photon vs pT, in calorimeter acceptance
+  TH2F * fhPhiPrimMCAcc[fgkNmcPrimTypes];           //! Phi of generted photon, in calorimeter acceptance
+  TH2F * fhEtaPrimMCAcc[fgkNmcPrimTypes];           //! Phi of generted photon, in calorimeter acceptance
+  TH2F * fhYPrimMCAcc  [fgkNmcPrimTypes];           //! Rapidity of generated photon, in calorimeter acceptance
   
   // Shower Shape MC
-  TH2F * fhMCELambda0[6] ;                          //! E vs Lambda0     from MC particle
-  TH2F * fhMCELambda1[6] ;                          //! E vs Lambda1     from MC particle
-  TH2F * fhMCEDispersion[6] ;                       //! E vs Dispersion  from MC particle
+  TH2F * fhMCELambda0   [fgkNssTypes] ;             //! E vs Lambda0     from MC particle
+  TH2F * fhMCELambda1   [fgkNssTypes] ;             //! E vs Lambda1     from MC particle
+  TH2F * fhMCEDispersion[fgkNssTypes] ;             //! E vs Dispersion  from MC particle
   
   TH2F * fhMCPhotonELambda0NoOverlap ;              //! E vs Lambda0     from MC photons, no overlap
   TH2F * fhMCPhotonELambda0TwoOverlap ;             //! E vs Lambda0     from MC photons, 2 particles overlap
   TH2F * fhMCPhotonELambda0NOverlap ;               //! E vs Lambda0     from MC photons, N particles overlap
   
-  TH2F * fhMCLambda0vsClusterMaxCellDiffE0[6];      //! Lambda0 vs fraction of energy of max cell for E < 2 GeV
-  TH2F * fhMCLambda0vsClusterMaxCellDiffE2[6];      //! Lambda0 vs fraction of energy of max cell for 2< E < 6 GeV
-  TH2F * fhMCLambda0vsClusterMaxCellDiffE6[6];      //! Lambda0 vs fraction of energy of max cell for E > 6 GeV
-  TH2F * fhMCNCellsvsClusterMaxCellDiffE0[6];       //! NCells  vs fraction of energy of max cell for E < 2
-  TH2F * fhMCNCellsvsClusterMaxCellDiffE2[6];       //! NCells  vs fraction of energy of max cell for 2 < E < 6 GeV
-  TH2F * fhMCNCellsvsClusterMaxCellDiffE6[6];       //! NCells  vs fraction of energy of max cell for E > 6
-  TH2F * fhMCNCellsE[6];                            //! NCells per cluster vs energy
-  TH2F * fhMCMaxCellDiffClusterE[6];                //! Fraction of energy carried by cell with maximum energy
+  TH2F * fhMCLambda0vsClusterMaxCellDiffE0[fgkNssTypes]; //! Lambda0 vs fraction of energy of max cell for E < 2 GeV
+  TH2F * fhMCLambda0vsClusterMaxCellDiffE2[fgkNssTypes]; //! Lambda0 vs fraction of energy of max cell for 2< E < 6 GeV
+  TH2F * fhMCLambda0vsClusterMaxCellDiffE6[fgkNssTypes]; //! Lambda0 vs fraction of energy of max cell for E > 6 GeV
+  TH2F * fhMCNCellsvsClusterMaxCellDiffE0 [fgkNssTypes]; //! NCells  vs fraction of energy of max cell for E < 2
+  TH2F * fhMCNCellsvsClusterMaxCellDiffE2 [fgkNssTypes]; //! NCells  vs fraction of energy of max cell for 2 < E < 6 GeV
+  TH2F * fhMCNCellsvsClusterMaxCellDiffE6 [fgkNssTypes]; //! NCells  vs fraction of energy of max cell for E > 6
+  TH2F * fhMCNCellsE            [fgkNssTypes];           //! NCells per cluster vs energy
+  TH2F * fhMCMaxCellDiffClusterE[fgkNssTypes];           //! Fraction of energy carried by cell with maximum energy
 
-  TH2F * fhMCEDispEta[6] ;                          //! shower dispersion in eta direction
-  TH2F * fhMCEDispPhi[6] ;                          //! shower dispersion in phi direction
-  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 * fhMCLambda0DispEta[7][6] ;                 //! shower shape correlation l0 vs disp eta
-  TH2F * fhMCLambda0DispPhi[7][6] ;                 //! shower shape correlation l0 vs disp phi
+  TH2F * fhMCEDispEta       [fgkNssTypes] ;              //! shower dispersion in eta direction
+  TH2F * fhMCEDispPhi       [fgkNssTypes] ;              //! shower dispersion in phi direction
+  TH2F * fhMCESumEtaPhi     [fgkNssTypes] ;              //! shower dispersion in eta vs phi direction
+  TH2F * fhMCEDispEtaPhiDiff[fgkNssTypes] ;              //! shower dispersion in eta -phi direction
+  TH2F * fhMCESphericity    [fgkNssTypes] ;              //! shower sphericity, eta vs phi
+  TH2F * fhMCDispEtaDispPhi [7][fgkNssTypes] ;           //! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
+  TH2F * fhMCLambda0DispEta [7][fgkNssTypes] ;           //! shower shape correlation l0 vs disp eta
+  TH2F * fhMCLambda0DispPhi [7][fgkNssTypes] ;           //! shower shape correlation l0 vs disp phi
 
   //Embedding
   TH2F * fhEmbeddedSignalFractionEnergy ;           //! Fraction of photon energy of embedded signal vs cluster energy
@@ -315,7 +321,7 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   AliAnaPhoton(              const AliAnaPhoton & g) ; // cpy ctor
   AliAnaPhoton & operator = (const AliAnaPhoton & g) ; // cpy assignment
   
-  ClassDef(AliAnaPhoton,39)
+  ClassDef(AliAnaPhoton,40)
 
 } ;