update AddTask example with last months implementations, add new histograms to split...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 18 Aug 2013 15:46:29 +0000 (15:46 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 18 Aug 2013 15:46:29 +0000 (15:46 +0000)
PWGGA/CaloTrackCorrelations/AliAnaInsideClusterInvariantMass.cxx
PWGGA/CaloTrackCorrelations/AliAnaInsideClusterInvariantMass.h
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C

index d45e202..8fc026d 100755 (executable)
@@ -312,7 +312,7 @@ AliAnaInsideClusterInvariantMass::AliAnaInsideClusterInvariantMass() :
       
       fhMCENOverlaps       [nlm][i] = 0;
       fhMCENOverlapsMatch  [nlm][i] = 0;
-      
+            
       if(i > 3) continue ;
       
       fhMCPi0MassM02Overlap0     [nlm][i] = 0;
@@ -370,6 +370,41 @@ AliAnaInsideClusterInvariantMass::AliAnaInsideClusterInvariantMass() :
   
   for(Int_t nlm = 0; nlm < 3; nlm++)
   {
+    
+    fhMCPi0DecayPhotonHitHighLMDiffELM1 [nlm] = 0 ;
+    fhMCPi0DecayPhotonAdjHighLMDiffELM1 [nlm] = 0 ;           
+    fhMCPi0DecayPhotonHitOtherLMDiffELM1[nlm] = 0 ;           
+    fhMCPi0DecayPhotonAdjOtherLMDiffELM1[nlm] = 0 ;            
+    
+    fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1 [nlm] = 0 ;     
+    fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1 [nlm] = 0 ;      
+    fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[nlm] = 0 ;     
+    fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[nlm] = 0 ;     
+    
+    fhMCPi0DecayPhotonHitHighLMDiffELM2 [nlm] = 0 ;           
+    fhMCPi0DecayPhotonAdjHighLMDiffELM2 [nlm] = 0 ;            
+    fhMCPi0DecayPhotonHitOtherLMDiffELM2[nlm] = 0 ;            
+    fhMCPi0DecayPhotonAdjOtherLMDiffELM2[nlm] = 0 ;         
+    
+    fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2 [nlm] = 0 ;    
+    fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2 [nlm] = 0 ;      
+    fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[nlm] = 0 ;     
+    fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[nlm] = 0 ;    
+    
+    fhMCPi0DecayPhotonHitHighLMMass [nlm] = 0 ;                
+    fhMCPi0DecayPhotonAdjHighLMMass [nlm] = 0 ;                 
+    fhMCPi0DecayPhotonHitOtherLMMass[nlm] = 0 ;              
+    fhMCPi0DecayPhotonAdjOtherLMMass[nlm] = 0 ;               
+    fhMCPi0DecayPhotonAdjacentMass  [nlm] = 0 ;                  
+    fhMCPi0DecayPhotonHitNoLMMass   [nlm] = 0 ;                  
+    
+    fhMCPi0DecayPhotonHitHighLMOverlapMass [nlm] = 0 ;
+    fhMCPi0DecayPhotonAdjHighLMOverlapMass [nlm] = 0 ;          
+    fhMCPi0DecayPhotonHitOtherLMOverlapMass[nlm] = 0 ;        
+    fhMCPi0DecayPhotonAdjOtherLMOverlapMass[nlm] = 0 ;        
+    fhMCPi0DecayPhotonAdjacentOverlapMass  [nlm] = 0 ;
+    fhMCPi0DecayPhotonHitNoLMOverlapMass   [nlm] = 0 ;          
+    
     fhPi0CellE       [nlm] = 0 ;
     fhPi0CellEFrac   [nlm] = 0 ;
     fhPi0CellLogEFrac[nlm] = 0 ;
@@ -391,6 +426,10 @@ AliAnaInsideClusterInvariantMass::AliAnaInsideClusterInvariantMass() :
     fhM02BadDistClose [nlm] = 0;
     fhMassOnBorder    [nlm] = 0;
     fhM02OnBorder     [nlm] = 0;
+    
+    fhAsyMCGenRecoDiffMCPi0    [nlm] = 0;
+    fhAsyMCGenRecoDiffMCPi0Conv[nlm] = 0;
+
   }
   
   InitParameters();
@@ -398,9 +437,9 @@ AliAnaInsideClusterInvariantMass::AliAnaInsideClusterInvariantMass() :
 }
 
 //_______________________________________________________________________________________________________
-void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* cluster,
-                                                                const Int_t mcindex, const Int_t noverlaps)
-                                                                //Float_t mass, Float_t m02,
+void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* cluster,const Int_t mcindex, const Int_t noverlaps,
+                                                                const Float_t e1,    const Float_t e2,    const Float_t mass)
+                                                                //Float_t m02,
                                                                 //TLorentzVector l1, TLorentzVector l2)
 {
   // Check origin NLM tower of the cluster, when MC gives merged pi0
@@ -774,6 +813,8 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
 //           list[imax],smm0,ietam0,iphim0,list[imax2],smm1,ietam1,iphim1);
 //  }
 
+  Int_t inlm = nMax-1;
+  if(inlm > 2) inlm = 2;
   
   Bool_t match0  = kFALSE;
   Bool_t match1  = kFALSE;
@@ -887,8 +928,37 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
 //   if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //      printf("a) Both Photons hit local maxima \n");
     
-    if(!noverlaps)fhMCPi0DecayPhotonHitHighLM       ->Fill(en,nMax);
-    else          fhMCPi0DecayPhotonHitHighLMOverlap->Fill(en,nMax);
+    if(!noverlaps)
+    {
+      fhMCPi0DecayPhotonHitHighLM          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonHitHighLMMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
+    else
+    {
+      fhMCPi0DecayPhotonHitHighLMOverlap          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonHitHighLMOverlapMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax )
+      {
+        fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+
+    }
     
     return ;
   }
@@ -902,18 +972,18 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
   
   if(!match0)
   {
-    if(imatch1!=imax  && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax])) match0 = kTRUE;
+    if(imatch1!=imax  && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax]))   { match0 = kTRUE; imatch0 = imax  ; }
     //printf("imax - match0? (%d-%d)=%d, (%d-%d)=%d\n",ieta0,ietam0,ieta0-ietam0, iphi0,iphim0,iphi0-iphim0);
-    if(imatch1!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax2]) ) match0 = kTRUE;
+    if(imatch1!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax2]) ) { match0 = kTRUE; imatch0 = imax2 ; }
     //printf("imax2 - match0? (%d-%d)=%d, (%d-%d)=%d\n",ieta0,ietam1,ieta0-ietam1, iphi0,iphim1,iphi0-iphim1);
   }
   
   if(!match1)
   {
-    if(imatch0!=imax  && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax]) ) match1 = kTRUE;
+    if(imatch0!=imax  && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax]) ) { match1 = kTRUE; imatch1 = imax  ; }
     //printf("imax - match1? (%d-%d)=%d, (%d-%d)=%d\n",ieta1,ietam0,ieta1-ietam0, iphi1,iphim0,iphi1-iphim0);
   
-    if(imatch0!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax2])) match1 = kTRUE;
+    if(imatch0!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax2])) { match1 = kTRUE; imatch1 = imax2 ; }
     //printf("imax2 - match1? (%d-%d)=%d, (%d-%d)=%d\n",ieta1,ietam1,ieta1-ietam1, iphi1,iphim1,iphi1-iphim1);
   }
     
@@ -924,12 +994,40 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
 //   if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //      printf("b) Both Photons hit local maxima or cell adjacent or 2 cells adjacent \n");
     
-    if(!noverlaps) fhMCPi0DecayPhotonAdjHighLM       ->Fill(en,nMax);
-    else           fhMCPi0DecayPhotonAdjHighLMOverlap->Fill(en,nMax);
+    if(!noverlaps)
+    {
+      fhMCPi0DecayPhotonAdjHighLM          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjHighLMMass[inlm]->Fill(en,mass);
+
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
+    else
+    {
+      fhMCPi0DecayPhotonAdjHighLMOverlap          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjHighLMOverlapMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
     
     return;
   }
-
   
   // Decay photon cells are adjacent?
   
@@ -937,8 +1035,16 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
   {
 //   if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //      printf("c) Both Photons hit a local maxima and in adjacent cells \n");
-    if(!noverlaps)  fhMCPi0DecayPhotonAdjacent        ->Fill(en,nMax);
-    else            fhMCPi0DecayPhotonAdjacentOverlap ->Fill(en,nMax);
+    if(!noverlaps)
+    {
+      fhMCPi0DecayPhotonAdjacent          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjacentMass[inlm]->Fill(en,mass);
+    }
+    else
+    {
+      fhMCPi0DecayPhotonAdjacentOverlap          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjacentOverlapMass[inlm]->Fill(en,mass);
+    }
     
     return;
   }
@@ -969,8 +1075,36 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
 //   if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //      printf("d) One Photon hits a local maxima, the other another not high \n");
     
-    if(!noverlaps) fhMCPi0DecayPhotonHitOtherLM       ->Fill(en,nMax);
-    else           fhMCPi0DecayPhotonHitOtherLMOverlap->Fill(en,nMax);
+    if(!noverlaps)
+    {
+      fhMCPi0DecayPhotonHitOtherLM          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonHitOtherLMMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
+    else
+    {
+      fhMCPi0DecayPhotonHitOtherLMOverlap   ->Fill(en,nMax);
+      fhMCPi0DecayPhotonHitOtherLMMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
     
     return ;
   }
@@ -1015,16 +1149,52 @@ void AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(AliVCluster* clu
 //   if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //      printf("e) One Photon hits a local maxima, the other another not high, adjacent \n");
     
-    if(!noverlaps) fhMCPi0DecayPhotonAdjOtherLM       ->Fill(en,nMax);
-    else           fhMCPi0DecayPhotonAdjOtherLMOverlap->Fill(en,nMax);
+    if(!noverlaps)
+    {
+      fhMCPi0DecayPhotonAdjOtherLM       ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjOtherLMMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
+    else
+    {
+      fhMCPi0DecayPhotonAdjOtherLMOverlap          ->Fill(en,nMax);
+      fhMCPi0DecayPhotonAdjOtherLMOverlapMass[inlm]->Fill(en,mass);
+      if(match0 && imatch0 == imax)
+      {
+        fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,e1-photon0Kine.E());
+        fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,e2-photon1Kine.E());
+      }
+      else
+      {
+        fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,e1-photon1Kine.E());
+        fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,e2-photon0Kine.E());
+      }
+    }
     
     return;
   }
   
 // if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
 //    printf("f) No hit found \n");
-  if(!noverlaps) fhMCPi0DecayPhotonHitNoLM       ->Fill(en,nMax);
-  else           fhMCPi0DecayPhotonHitNoLMOverlap->Fill(en,nMax);
+  if(!noverlaps)
+  {
+    fhMCPi0DecayPhotonHitNoLM          ->Fill(en,nMax);
+    fhMCPi0DecayPhotonHitNoLMMass[inlm]->Fill(en,mass);
+  }
+  else
+  {
+    fhMCPi0DecayPhotonHitNoLMOverlap          ->Fill(en,nMax);
+    fhMCPi0DecayPhotonHitNoLMOverlapMass[inlm]->Fill(en,mass);
+  }
   
 }
 
@@ -1105,8 +1275,8 @@ void AliAnaInsideClusterInvariantMass::FillHistograms1(const Float_t en,     con
   if(IsDataMC())
   {
     fhNLocMax[mcindex][matched]->Fill(en,nMax);
-    fhSplitClusterENLocMax[0][matched]->Fill(e1,nMax);
-    fhSplitClusterENLocMax[0][matched]->Fill(e2,nMax);
+    fhSplitClusterENLocMax[mcindex][matched]->Fill(e1,nMax);
+    fhSplitClusterENLocMax[mcindex][matched]->Fill(e2,nMax);
   }
   
   if     ( nMax == 1  )
@@ -1589,7 +1759,8 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
   Float_t efrac      = eprim/en;
   Float_t efracSplit = 0;
   if(e1+e2 > 0) efracSplit = eprim/(e1+e2);
-
+  Float_t asymDiff = TMath::Abs(asym) - TMath::Abs(asymGen);
+  
   //printf("e1 %2.2f, e2 %2.2f, eprim %2.2f, ereco %2.2f, esplit/ereco %2.2f, egen/ereco %2.2f, egen/esplit %2.2f\n",
   //       e1,e2,eprim,en,splitFrac,efrac,efracSplit);
   
@@ -1604,7 +1775,12 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
     fhMCGenFracNLocMax1      [mcindex][matched]->Fill(en     ,  efrac );
     fhMCGenSplitEFracNLocMax1[mcindex][matched]->Fill(en     ,  efracSplit );
     fhMCGenEvsSplitENLocMax1 [mcindex][matched]->Fill(eprim  ,  e1+e2);
-    
+    if(asym > 0 && !matched)
+    {
+      if      (mcindex==kmcPi0)    fhAsyMCGenRecoDiffMCPi0[0]    ->Fill(en, asymDiff );
+      else  if(mcindex==kmcPi0Conv)fhAsyMCGenRecoDiffMCPi0Conv[0]->Fill(en, asymDiff );
+    }
+
     if(noverlaps==0)
     {
       fhMCGenFracNLocMax1NoOverlap      [mcindex][matched]->Fill(en ,  efrac );
@@ -1620,8 +1796,11 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
         fhM02MCGenFracNLocMax1Ebin [mcindex][ebin]->Fill(efrac  ,  l0    );
         fhMassMCGenFracNLocMax1Ebin[mcindex][ebin]->Fill(efrac  ,  mass  );
         
-        fhMCAsymM02NLocMax1MCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
-        fhAsyMCGenRecoNLocMax1EbinPi0[ebin]->Fill(asym,  asymGen );
+        if(mcindex==kmcPi0 || mcindex==kmcPi0Conv)
+        {
+          fhMCAsymM02NLocMax1MCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
+          fhAsyMCGenRecoNLocMax1EbinPi0[ebin]->Fill(asym,  asymGen );
+        }
       }
     }
   }
@@ -1630,6 +1809,12 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
     fhMCGenFracNLocMax2      [mcindex][matched]->Fill(en     ,  efrac );
     fhMCGenSplitEFracNLocMax2[mcindex][matched]->Fill(en     ,  efracSplit );
     fhMCGenEvsSplitENLocMax2 [mcindex][matched]->Fill(eprim  ,  e1+e2);
+
+    if(asym > 0 && !matched)
+    {
+     if      (mcindex==kmcPi0)    fhAsyMCGenRecoDiffMCPi0[1]    ->Fill(en, asymDiff );
+     else  if(mcindex==kmcPi0Conv)fhAsyMCGenRecoDiffMCPi0Conv[1]->Fill(en, asymDiff );
+    }
     
     if(noverlaps==0)
     {
@@ -1645,9 +1830,11 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
       {
         fhM02MCGenFracNLocMax2Ebin [mcindex][ebin]->Fill(efrac  ,  l0    );
         fhMassMCGenFracNLocMax2Ebin[mcindex][ebin]->Fill(efrac  ,  mass  );
-        
-        fhMCAsymM02NLocMax2MCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
-        fhAsyMCGenRecoNLocMax2EbinPi0[ebin]->Fill(asym,  asymGen );
+        if(mcindex==kmcPi0 || mcindex==kmcPi0Conv)
+        {
+          fhMCAsymM02NLocMax2MCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
+          fhAsyMCGenRecoNLocMax2EbinPi0[ebin]->Fill(asym,  asymGen );
+        }
       }
     }
 
@@ -1657,7 +1844,12 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
     fhMCGenFracNLocMaxN      [mcindex][matched]->Fill(en     ,  efrac );
     fhMCGenSplitEFracNLocMaxN[mcindex][matched]->Fill(en     ,  efracSplit );
     fhMCGenEvsSplitENLocMaxN [mcindex][matched]->Fill(eprim  ,  e1+e2);
-    
+    if(asym > 0 && !matched)
+    {
+      if      (mcindex==kmcPi0)    fhAsyMCGenRecoDiffMCPi0[2]    ->Fill(en, asymDiff );
+      else  if(mcindex==kmcPi0Conv)fhAsyMCGenRecoDiffMCPi0Conv[2]->Fill(en, asymDiff );
+    }
+
     if(noverlaps==0)
     {
       fhMCGenFracNLocMaxNNoOverlap      [mcindex][matched]->Fill(en ,  efrac );
@@ -1673,8 +1865,11 @@ void AliAnaInsideClusterInvariantMass::FillMCHistograms(const Float_t en,
         fhM02MCGenFracNLocMaxNEbin [mcindex][ebin]->Fill(efrac  ,  l0    );
         fhMassMCGenFracNLocMaxNEbin[mcindex][ebin]->Fill(efrac  ,  mass  );
         
-        fhMCAsymM02NLocMaxNMCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
-        fhAsyMCGenRecoNLocMaxNEbinPi0[ebin]->Fill(asym,  asymGen );
+        if(mcindex==kmcPi0 || mcindex==kmcPi0Conv)
+        {
+          fhMCAsymM02NLocMaxNMCPi0Ebin [ebin]->Fill(l0  ,  asymGen );
+          fhAsyMCGenRecoNLocMaxNEbinPi0[ebin]->Fill(asym,  asymGen );
+        }
       }
     }
   }
@@ -4225,9 +4420,6 @@ TList * AliAnaInsideClusterInvariantMass::GetCreateOutputObjects()
     outputContainer->Add(fhMCPi0NoneNLMPairNoMCMatch) ;
     
     
-    
-    
-    
     fhMCPi0HighNLMPairOverlap    = new TH2F("hMCPi0HighNLMPairOverlap","NLM vs E for merged pi0 cluster, high energy NLM pair are decays",
                                             nptbins,ptmin,ptmax,nMaxBins,0,nMaxBins);
     fhMCPi0HighNLMPairOverlap   ->SetYTitle("N maxima");
@@ -4275,6 +4467,7 @@ TList * AliAnaInsideClusterInvariantMass::GetCreateOutputObjects()
     fhMCPi0NoneNLMPairNoMCMatchOverlap   ->SetYTitle("N maxima");
     fhMCPi0NoneNLMPairNoMCMatchOverlap   ->SetXTitle("E (GeV)");
     outputContainer->Add(fhMCPi0NoneNLMPairNoMCMatchOverlap) ;
+  
     
     fhMCPi0DecayPhotonHitHighLM    = new TH2F("hMCPi0DecayPhotonHitHighLM","NLM vs E for merged pi0 cluster, decay photon hit High Local Maxima",
                                               nptbins,ptmin,ptmax,nMaxBins,0,nMaxBins);
@@ -4350,6 +4543,207 @@ TList * AliAnaInsideClusterInvariantMass::GetCreateOutputObjects()
     outputContainer->Add(fhMCPi0DecayPhotonHitNoLMOverlap ) ;
     
     
+    for(Int_t nlm = 0; nlm < 3; nlm++)
+    {
+      fhMCPi0DecayPhotonHitHighLMMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sMass",snlm[nlm].Data()),
+                                                       Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima",snlm[nlm].Data()),
+                                                nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitHighLMMass[nlm]  ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitHighLMMass[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMMass[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sMass",snlm[nlm].Data()),
+                                                       Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima",snlm[nlm].Data()),
+                                                nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjHighLMMass[nlm]  ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjHighLMMass[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMMass[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sMass",snlm[nlm].Data()),
+                                                        Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima",snlm[nlm].Data()),
+                                                 nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitOtherLMMass[nlm]  ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitOtherLMMass[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMMass[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sMass",snlm[nlm].Data()),
+                                                        Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima",snlm[nlm].Data()),
+                                                 nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjOtherLMMass[nlm]  ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjOtherLMMass[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMMass[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjacentMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjacentLM%sMass",snlm[nlm].Data()),
+                                                       Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit adjacent cells",snlm[nlm].Data()),
+                                              nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjacentMass[nlm]    ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjacentMass[nlm]    ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjacentMass[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitNoLMMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitNoLM%sMass",snlm[nlm].Data()),
+                                                     Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon do not hit Local Maxima",snlm[nlm].Data()),
+                                              nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitNoLMMass[nlm]  ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitNoLMMass[nlm]    ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitNoLMMass[nlm] ) ;
+      
+      
+      fhMCPi0DecayPhotonHitHighLMOverlapMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sOverlapMass",snlm[nlm].Data()),
+                                                               Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                       nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitHighLMOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitHighLMOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMOverlapMass[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMOverlapMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sOverlapMass",snlm[nlm].Data()),
+                                                               Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                       nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjHighLMOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjHighLMOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMOverlapMass[nlm]) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMOverlapMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sOverlapMass",snlm[nlm].Data()),
+                                                                Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                        nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitOtherLMOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitOtherLMOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMOverlapMass[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMOverlapMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sOverlapMass",snlm[nlm].Data()),
+                                                                Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                        nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjOtherLMOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjOtherLMOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMOverlapMass[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjacentOverlapMass[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjacentLM%sOverlapMass",snlm[nlm].Data()),
+                                                             Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon hit adjacent cells, there was an overlap",snlm[nlm].Data()),
+                                                     nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonAdjacentOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonAdjacentOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjacentOverlapMass[nlm]) ;
+      
+      fhMCPi0DecayPhotonHitNoLMOverlapMass[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitNoLM%sOverlapMass",snlm[nlm].Data()),
+                                                             Form("Mass vs E for merged pi0 cluster, NLM=%s, decay photon do not hit Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                     nptbins,ptmin,ptmax,mbins,mmin,mmax);
+      fhMCPi0DecayPhotonHitNoLMOverlapMass[nlm]   ->SetYTitle("Mass (MeV/c^{2})");
+      fhMCPi0DecayPhotonHitNoLMOverlapMass[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitNoLMOverlapMass[nlm]) ;
+
+      fhMCPi0DecayPhotonHitHighLMDiffELM1[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sDiffELM1",snlm[nlm].Data()),
+                                                       Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima",snlm[nlm].Data()),
+                                                       nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitHighLMDiffELM1[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitHighLMDiffELM1[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMDiffELM1[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMDiffELM1[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sDiffELM1",snlm[nlm].Data()),
+                                                       Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima",snlm[nlm].Data()),
+                                                       nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjHighLMDiffELM1[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjHighLMDiffELM1[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMDiffELM1[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMDiffELM1[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sDiffELM1",snlm[nlm].Data()),
+                                                        Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima",snlm[nlm].Data()),
+                                                        nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitOtherLMDiffELM1[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitOtherLMDiffELM1[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMDiffELM1[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM1[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sDiffELM1",snlm[nlm].Data()),
+                                                        Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima",snlm[nlm].Data()),
+                                                        nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM1[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM1[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMDiffELM1[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sOverlapDiffELM1",snlm[nlm].Data()),
+                                                               Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                               nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sOverlapDiffELM1",snlm[nlm].Data()),
+                                                               Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                               nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[nlm]) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sOverlapDiffELM1",snlm[nlm].Data()),
+                                                                Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sOverlapDiffELM1",snlm[nlm].Data()),
+                                                                Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[nlm]) ;
+      
+      fhMCPi0DecayPhotonHitHighLMDiffELM2[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sDiffELM2",snlm[nlm].Data()),
+                                                           Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima",snlm[nlm].Data()),
+                                                           nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitHighLMDiffELM2[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitHighLMDiffELM2[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMDiffELM2[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMDiffELM2[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sDiffELM2",snlm[nlm].Data()),
+                                                           Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima",snlm[nlm].Data()),
+                                                           nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjHighLMDiffELM2[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjHighLMDiffELM2[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMDiffELM2[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMDiffELM2[nlm]  = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sDiffELM2",snlm[nlm].Data()),
+                                                            Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima",snlm[nlm].Data()),
+                                                            nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitOtherLMDiffELM2[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitOtherLMDiffELM2[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMDiffELM2[nlm] ) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM2[nlm]  = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sDiffELM2",snlm[nlm].Data()),
+                                                            Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima",snlm[nlm].Data()),
+                                                            nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM2[nlm]  ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjOtherLMDiffELM2[nlm]  ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMDiffELM2[nlm] ) ;
+      
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitHighLM%sOverlapDiffELM2",snlm[nlm].Data()),
+                                                                   Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                   nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjHighLM%sOverlapDiffELM2",snlm[nlm].Data()),
+                                                                   Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to High Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                   nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[nlm]) ;
+      
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[nlm]   = new TH2F(Form("hMCPi0DecayPhotonHitOtherLM%sOverlapDiffELM2",snlm[nlm].Data()),
+                                                                    Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                    nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[nlm]) ;
+      
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[nlm]   = new TH2F(Form("hMCPi0DecayPhotonAdjOtherLM%sOverlapDiffELM2",snlm[nlm].Data()),
+                                                                    Form("E_{reco}-E_{gen} vs E for merged pi0 cluster, NLM=%s, decay photon hit cells adjacent to Other Local Maxima, there was an overlap",snlm[nlm].Data()),
+                                                                    nptbins,ptmin,ptmax,nptbins,-ptmax/4,ptmax/4);
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[nlm]   ->SetYTitle("E_{reco}-E_{gen}");
+      fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[nlm]   ->SetXTitle("E (GeV)");
+      outputContainer->Add(fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[nlm]) ;
+
+    }
+    
     fhMCEOverlapType = new TH2F("hMCEOverlapType","Kind of overlap particle, neutral clusters",
                                 nptbins,ptmin,ptmax,5,0,5);
     //fhMCEOverlapType   ->SetYTitle("Overlap Type");
@@ -4375,6 +4769,26 @@ TList * AliAnaInsideClusterInvariantMass::GetCreateOutputObjects()
   }// MC analysis, check overlaps
   
   
+  if(IsDataMC())
+  {
+    for(Int_t inlm = 0; inlm < 3; inlm++)
+    {
+      fhAsyMCGenRecoDiffMCPi0[inlm]  = new TH2F(Form("hAsyMCGenRecoFracNLocMax%sMCPi0",snlm[inlm].Data()),
+                                                Form("Reconstructed - Generated asymmetry with NLM=%d vs E, MC Pi0",inlm),
+                                                nptbins,ptmin,ptmax,200,-1,1);
+      fhAsyMCGenRecoDiffMCPi0[inlm]->SetYTitle("A_{reco} - A_{gen}");
+      fhAsyMCGenRecoDiffMCPi0[inlm]->SetXTitle("E (GeV)");
+      outputContainer->Add(fhAsyMCGenRecoDiffMCPi0[inlm]) ;
+      
+      fhAsyMCGenRecoDiffMCPi0Conv[inlm]  = new TH2F(Form("hAsyMCGenRecoFracNLocMax%sMCPi0Conv",snlm[inlm].Data()),
+                                                Form("Reconstructed - Generated asymmetry  with NLM=%d vs E, MC Pi0Conv",inlm),
+                                                nptbins,ptmin,ptmax,200,-1,1);
+      fhAsyMCGenRecoDiffMCPi0Conv[inlm]->SetYTitle("A_{reco} - A_{gen}");
+      fhAsyMCGenRecoDiffMCPi0Conv[inlm]->SetXTitle("E (GeV)");
+      outputContainer->Add(fhAsyMCGenRecoDiffMCPi0Conv[inlm]) ;
+    }
+  }
+  
   return outputContainer ;
   
 }
@@ -4678,8 +5092,8 @@ void  AliAnaInsideClusterInvariantMass::MakeAnalysisFillHistograms()
       // For cluster with MC pi0 and more than 1 maxima
       
       if(fFillMCOverlapHisto)
-        CheckLocalMaximaMCOrigin(cluster, mcindex,noverlaps);
-                                 //mass, l0, l1, l2);
+        CheckLocalMaximaMCOrigin(cluster, mcindex,noverlaps,e1,e2,mass);
+                                 //l0, l1, l2);
       
       //
       
index 61a7b83..ead9f47 100755 (executable)
@@ -30,8 +30,9 @@ class AliAnaInsideClusterInvariantMass : public AliAnaCaloTrackCorrBaseClass {
   AliAnaInsideClusterInvariantMass() ; // default ctor
   virtual ~AliAnaInsideClusterInvariantMass() { ; } //virtual dtor
   
-  void         CheckLocalMaximaMCOrigin(AliVCluster* cluster, const Int_t mcindex, const Int_t noverlaps);
-                                        //Float_t mass, Float_t m02, TLorentzVector l1, TLorentzVector l2);
+  void         CheckLocalMaximaMCOrigin(AliVCluster* cluster, const Int_t mcindex, const Int_t noverlaps,
+                                        const Float_t e1,     const Float_t e2,    const Float_t mass);
+                                        //, Float_t m02, TLorentzVector l1, TLorentzVector l2);
   
   TObjString * GetAnalysisCuts();
   
@@ -244,6 +245,9 @@ class AliAnaInsideClusterInvariantMass : public AliAnaCaloTrackCorrBaseClass {
   TH2F       * fhAsyMCGenRecoNLocMax2EbinPi0[4] ;       //! Generated vs reconstructed asymmetry of splitted clusters from pi0 when 2  local max, 4 E bins, neutral clusters
   TH2F       * fhAsyMCGenRecoNLocMaxNEbinPi0[4] ;       //! Generated vs reconstructed asymmetry of splitted clusters from pi0 when >2 local max, 4 E bins, neutral clusters
   
+  TH2F       * fhAsyMCGenRecoDiffMCPi0[3];              //! reconstructed-generated asymmetry of splitted clusters vs E from pi0, for 3 NLM cases
+  TH2F       * fhAsyMCGenRecoDiffMCPi0Conv[3];          //! reconstructed-generated asymmetry of splitted clusters vs E from converted pi0, for 3 NLM cases
+  
   TH2F       * fhMassDispEtaNLocMax1[8][2]  ;           //! Mass of 2 highest energy cells when 1 local max, vs M02, for E > 8 GeV, 1-6 for different MC particle types 
   TH2F       * fhMassDispEtaNLocMax2[8][2]  ;           //! Mass of 2 cells local maxima, vs M02, for E > 8 GeV,  1-6 for different MC particle types
   TH2F       * fhMassDispEtaNLocMaxN[8][2]  ;           //! Mass of >2 cells local maxima, vs M02, for E > 8 GeV, 1-6 for different MC particle types  
@@ -565,6 +569,41 @@ class AliAnaInsideClusterInvariantMass : public AliAnaCaloTrackCorrBaseClass {
   TH2F       * fhMCPi0DecayPhotonAdjacentOverlap;       //! E vs NLM when cluster originated in pi0 merging and MC photon decay hit adjacen cells, not 2 LM, overlap
   TH2F       * fhMCPi0DecayPhotonHitNoLMOverlap;        //! E vs NLM when cluster originated in pi0 merging and MC photon decay do not hit the cell local maximas, overlap
 
+  TH2F       * fhMCPi0DecayPhotonHitHighLMDiffELM1[3];             //! E vs Ephoton-Esplit cluster when cluster originated in pi0 merging and MC photon decay hit the cell local maxima
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMDiffELM1[3];             //! E vs Ephoton-Esplit cluster when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMDiffELM1[3];            //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMDiffELM1[3];            //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high
+  TH2F       * fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[3];      //! E vs Ephoton-Esplit cluster when cluster originated in pi0 merging and MC photon decay hit the cell local maxima
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[3];      //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima, overlap
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[3];     //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high, overlap
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[3];     //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high, overlap
+  TH2F       * fhMCPi0DecayPhotonHitHighLMDiffELM2[3];             //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the cell local maxima
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMDiffELM2[3];             //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMDiffELM2[3];            //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMDiffELM2[3];            //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high
+  
+  TH2F       * fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[3];      //! E vs Ephoton-Esplit cluster when cluster originated in pi0 merging and MC photon decay hit the cell local maxima
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[3];      //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima, overlap
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[3];     //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high, overlap
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[3];     //! E vs Ephoton-Esplit when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high, overlap
+  
+  TH2F       * fhMCPi0DecayPhotonHitHighLMMass[3];                 //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the cell local maxima
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMMass[3];                 //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMMass[3];                //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMMass[3];                //! E vs Mass when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high
+  TH2F       * fhMCPi0DecayPhotonAdjacentMass[3];                  //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit adjacen cells, not 2 LM
+  TH2F       * fhMCPi0DecayPhotonHitNoLMMass[3];                   //! E vs Mass when cluster originated in pi0 merging and MC photon decay do not hit the cell local maximas
+               
+  TH2F       * fhMCPi0DecayPhotonHitHighLMOverlapMass[3];          //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the cell local maxima, overlap
+  TH2F       * fhMCPi0DecayPhotonAdjHighLMOverlapMass[3];          //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the adjacent cell local maxima, overlap
+  TH2F       * fhMCPi0DecayPhotonHitOtherLMOverlapMass[3];         //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit the cell local maximas, not high, overlap
+  TH2F       * fhMCPi0DecayPhotonAdjOtherLMOverlapMass[3];         //! E vs Mass when cluster originated in pi0 merging and MC photon decay do not hit the adjacent cell local maximas, not high, overlap
+  TH2F       * fhMCPi0DecayPhotonAdjacentOverlapMass[3];           //! E vs Mass when cluster originated in pi0 merging and MC photon decay hit adjacen cells, not 2 LM, overlap
+  TH2F       * fhMCPi0DecayPhotonHitNoLMOverlapMass[3];            //! E vs Mass when cluster originated in pi0 merging and MC photon decay do not hit the cell local maximas, overlap
+
+  
   TH2F       * fhMCEOverlapType;                        //! what particles overlap with pi0, neutral clusters
   TH2F       * fhMCEOverlapTypeMatch;                   //! what particles overlap with pi0, charged clusters
   
index 4416977..f305455 100755 (executable)
@@ -2843,14 +2843,8 @@ void  AliAnaPi0EbE::MakeShowerShapeIdentification()
       //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
       if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Origin of candidate %d\n",tag);
     }
-    
-    //Skip matched clusters with tracks
-    if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
-    {
-      FillRejectedClusterHistograms(mom,tag);
-      continue ;
-    }
-    
+            
+
     //Check PID
     //PID selection or bit setting
     Int_t    nMaxima = 0 ;
@@ -2865,16 +2859,18 @@ void  AliAnaPi0EbE::MakeShowerShapeIdentification()
                                                                                    mass,angle,l1,l2,absId1,absId2,
                                                                                    distbad1,distbad2,fidcut1,fidcut2) ;
     
+    
     if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - PDG of identified particle %d\n",idPartType);
     
     
     // Skip events where one of the new clusters (lowest energy) is close to an EMCal border or a bad channel
     if( (fCheckSplitDistToBad) &&
-        (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
+       (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
     {
       if(GetDebug() > 1)
         printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d \n",
                calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2);
+      
       continue ;
     }
     
@@ -2892,6 +2888,13 @@ void  AliAnaPi0EbE::MakeShowerShapeIdentification()
     if(GetDebug() > 1)
       printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - NLM %d accepted \n",nMaxima);
     
+    //Skip matched clusters with tracks
+    if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
+    {
+      FillRejectedClusterHistograms(mom,tag);
+      continue ;
+    }
+
     Float_t e1 = l1.Energy();
     Float_t e2 = l2.Energy();
     TLorentzVector l12 = l1+l2;
index 4087230..196f0e0 100644 (file)
@@ -157,12 +157,12 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
   // Split cluster analysis
   if(kCalorimeter == "EMCAL")
   {
-    maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, cluster splitting   
-    maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,cone, pth), n++);       // Pi0 isolation, cluster splits   
+    maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, cluster splitting
+    maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,cone, pth), n++);       // Pi0 isolation, cluster splits
     maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kFALSE), n++); // Pi0 hadron correlation
     maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
     //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS",  partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, split cluster  
-    //maker->AddAnalysis(ConfigureInClusterIMAnalysis(0.5,3), n++); 
+    maker->AddAnalysis(ConfigureInClusterIMAnalysis(kTRUE , kTRUE ), n++);
   }
   
   // Invariant mass analysis
@@ -212,6 +212,8 @@ AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString  data
   
   if(kPrint) maker->Print("");
   
+  if(kSimulation) maker->SwitchOffDataControlHistograms();
+  
   printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
  
   // Create task
@@ -269,6 +271,10 @@ AliCaloTrackReader * ConfigureReader()
   
   reader->SetDebug(kDebug);//10 for lots of messages
   
+  
+  //reader->SwitchOffTriggerClusterTimeRecal() ;
+
+  
   /*
    // Event rejection cuts for jet-jet simulations
    reader->SetPtHardAndJetPtComparison(kTRUE);
@@ -312,7 +318,7 @@ AliCaloTrackReader * ConfigureReader()
     reader->SwitchOffUseTrackTimeCut();
     reader->SwitchOffUseParametrizedTimeCut();
     reader->SwitchOffUseEMCALTimeCut();
-    reader->SetEMCALTimeCut(-1000,1000); // Open time cut
+    reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
   }
   else
   {
@@ -323,7 +329,7 @@ AliCaloTrackReader * ConfigureReader()
       reader->SwitchOnUseParametrizedTimeCut();
       
       //Absolute window
-      reader->SetEMCALTimeCut(-20,20);
+      reader->SetEMCALTimeCut(-25,20);
       
       //Parametrization
       if     (kRunNumber >= 151636 && kRunNumber <= 155384 )
@@ -347,7 +353,7 @@ AliCaloTrackReader * ConfigureReader()
     {
       reader->SwitchOffUseParametrizedTimeCut();
       reader->SwitchOffUseEMCALTimeCut();
-      reader->SetEMCALTimeCut(-1000,1000); // Open time cut
+      reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
     }
   }
   
@@ -356,6 +362,19 @@ AliCaloTrackReader * ConfigureReader()
 
   // Tracks
   reader->SwitchOnCTS();
+  reader->SwitchOffRejectNoTrackEvents();
+
+  reader->SwitchOffRecalculateVertexBC();
+  reader->SwitchOffVertexBCEventSelection();
+  
+  reader->SwitchOffUseTrackTimeCut();
+  reader->SetTrackTimeCut(0,50);
+  
+  reader->SwitchOffUseTrackDCACut();
+  //reader->SetTrackDCACut(0,0.0105);
+  //reader->SetTrackDCACut(1,0.035);
+  //reader->SetTrackDCACut(2,1.1);
+  
   if(kInputDataType=="ESD")
   {
     gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
@@ -403,6 +422,8 @@ AliCaloTrackReader * ConfigureReader()
     reader->SwitchOffClusterRecalculation();
   }  
   
+  if(!kNonLinearity) reader->SwitchOffClusterELinearityCorrection();
+  
   //if(kCalorimeter == "EMCAL") {
     reader->SwitchOnEMCALCells();  
     reader->SwitchOnEMCAL();
@@ -425,6 +446,19 @@ AliCaloTrackReader * ConfigureReader()
   // Event selection
   //-----------------
   
+  //reader->RejectFastClusterEvents()  ;
+
+  // Event triggered selection settings
+  reader->SwitchOnTriggerPatchMatching();
+  reader->SwitchOnBadTriggerEventsRemoval();
+  
+  reader->SetTriggerPatchTimeWindow(8,9);
+  if     (kRunNumber < 146861) reader->SetEventTriggerThreshold(3.);
+  else if(kRunNumber < 154000) reader->SetEventTriggerThreshold(4.);
+  else if(kRunNumber < 165000) reader->SetEventTriggerThreshold(5.5);
+  else                         reader->SetEventTriggerThreshold(8); // CAREFUL!
+  //redefine for other periods, triggers
+
   //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
   
   // For mixing with AliAnaParticleHadronCorrelation switch it off
@@ -432,9 +466,9 @@ AliCaloTrackReader * ConfigureReader()
   {
     reader->SwitchOffEventTriggerAtSE();
     UInt_t mask =  SetTriggerMaskFromName();
-    reader->SetEventTriggerMaks(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
-    //reader->SetMixEventTriggerMaks(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
-    reader->SetMixEventTriggerMaks(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
+    reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
+    //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
+    reader->SetMixEventTriggerMask(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
     
     printf("---Trigger selection done in AliCaloTrackReader!!!\n");
   }
@@ -459,7 +493,7 @@ AliCaloTrackReader * ConfigureReader()
   {
     // Centrality
     reader->SetCentralityClass("V0M");
-    reader->SetCentralityOpt(10);  // 10 (c= 0-10, 10-20 ...), 20  (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
+    reader->SetCentralityOpt(100);  // 10 (c= 0-10, 10-20 ...), 20  (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
     reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
     
     // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
@@ -492,6 +526,12 @@ AliCalorimeterUtils* ConfigureCaloUtils()
   {
     cu->SetLocalMaximaCutE(0.1);
     cu->SetLocalMaximaCutEDiff(0.03);
+    if(kName.Contains("150"))
+    {
+      printf("Reclusterize with 150 threshold, set PbPb settings\n");
+      cu->SetLocalMaximaCutE(0.2);
+      cu->SetLocalMaximaCutEDiff(0.03);
+    }
   }
   else 
   {
@@ -523,10 +563,12 @@ AliCalorimeterUtils* ConfigureCaloUtils()
   ConfigureEMCALRecoUtils(recou,
                           kSimulation,                             
                           kExotic,
-                          kNonLinearity,
+                          kTRUE,//kNonLinearity,
                           kCalibE, 
                           kBadMap,
-                          kCalibT);   
+                          kCalibT);
+  //recou->SetExoticCellDiffTimeCut(50.);
+
   
   if( kNonLinearity ) 
   { 
@@ -565,14 +607,14 @@ AliAnaPhoton* ConfigurePhotonAnalysis()
     ana->SetNCellCut(2);// At least 3 cells
     ana->SetMinPt(0.3);
     ana->SetMinDistanceToBadChannel(2, 4, 5);
-    ana->SetTimeCut(-2000,2000); // open cut
+    ana->SetTimeCut(-1e10,1e10); // open cut
   }
   else 
   {//EMCAL
     ana->SetNCellCut(1);// At least 2 cells
     ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
     ana->SetMaxEnergy(1000); 
-    ana->SetTimeCut(-1000,1000); // open cut, usual time window of [425-825] ns if time recalibration is off 
+    ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off 
     // restrict to less than 100 ns when time calibration is on 
     ana->SetMinDistanceToBadChannel(2, 4, 6); 
     
@@ -610,8 +652,9 @@ AliAnaPhoton* ConfigurePhotonAnalysis()
   if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
       
   ana->SwitchOffFillShowerShapeHistograms();  // Filled before photon shower shape selection
-  ana->SwitchOffFillPileUpHistograms();
-  
+  if(!kSimulation)ana->SwitchOnFillPileUpHistograms();
+  //if(!kSimulation) ana->SwitchOnFillEMCALBCHistograms();
+
   // Input / output delta AOD settings
   
   if(!kData.Contains("delta")) 
@@ -663,15 +706,13 @@ AliAnaElectron* ConfigureElectronAnalysis()
   
   //Electron selection cuts with tracks
   ana->SetEOverP(0.85, 1.2);
+
   // TO DO, find a more suitable way to set this
-  if(kSimulation)
-  { // LHC11a
-    ana->SetdEdxCut(76, 85);
-  }
-  else // LHC11c
-  {
-    ana->SetdEdxCut(56, 64);
-  }
+  if     (kRunNumber < 146861) ana->SetdEdxCut(72, 90);
+  else if(kRunNumber < 154000) ana->SetdEdxCut(54, 70);
+  else                         ana->SetdEdxCut(74, 90);
+  
+  if(kSimulation)  ana->SetdEdxCut(80, 100);
   
   ana->SetCalorimeter(kCalorimeter);
   
@@ -768,46 +809,103 @@ AliAnaRandomTrigger* ConfigureRandomTriggerAnalysis(TString detector = "")
 }
 
 //__________________________________________________________________________________________
-AliAnaInsideClusterInvariantMass* ConfigureInClusterIMAnalysis(Float_t l0min, Float_t l0max)
+AliAnaInsideClusterInvariantMass* ConfigureInClusterIMAnalysis(Bool_t useSS = kTRUE, Bool_t useAsy = kFALSE)
 {
   AliAnaInsideClusterInvariantMass *ana = new AliAnaInsideClusterInvariantMass();
   ana->SetDebug(kDebug); //10 for lots of messages
   
   // selection cuts
   
-  ana->SetMinEnergy(5); 
-  ana->SetMaxEnergy(200.);   
-  ana->SetMinNCells(3);
-  ana->SetM02Cut(l0min,l0max);
+  ana->SetMinEnergy(6);
+  ana->SetMaxEnergy(200.);
+  ana->SetMinNCells(6); // check same as in calopid
+  
   ana->SetCalorimeter(kCalorimeter);
+  ana->SwitchOnSplitClusterDistToBad();
+  
+  ana->SwitchOffFillSSWeightHistograms() ;
+  ana->SetNWeightForShowerShape(0);
+  //ana->SetWeightForShowerShape(0, 4.6);
+  
+  ana->SwitchOnFillNCellHistograms();
+  ana->SwitchOffFillEbinHistograms();
+  if(!useSS && !useAsy) ana->SwitchOnFillEbinHistograms();
+  
+  if(!kTM)
+  {
+    ana->SwitchOnFillTMHistograms();
+    ana->SwitchOnFillTMResidualHistograms();
+  }
+  else
+  {
+    ana->SwitchOffFillTMHistograms();
+    ana->SwitchOffFillTMResidualHistograms();
+  }
+  
+  //printf("Set correction slope for SS weight \n");
+  //ana->SetWCorrectionParameter(0.07);
+  //ana->SetNECellCutForShowerShape(0);
+  //ana->SetECellCutForShowerShape(0, 0.07);
+  //ana->SetECellCutForShowerShape(1, 0.1);
+  //ana->SetECellCutForShowerShape(2, 0.2);
+  
+  if(kSimulation)
+  {
+    ana->SwitchOnFillMCPrimaryHistograms() ;
+    ana->SwitchOffFillMCOverlapHistograms() ; // Off when possible
+    if(!useSS && !useAsy) ana->SwitchOnFillMCOverlapHistograms() ;
+  }
   
-  //ana->AddToHistogramsName(Form("AnaInClusterIM_%1.2f_%1.2f_",l0min,l0max));
-  ana->AddToHistogramsName("AnaInClusterIM_");
-
-  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
-    
   AliCaloPID* caloPID = ana->GetCaloPID();
   caloPID->SetEMCALDEtaCut(0.025);
   caloPID->SetEMCALDPhiCut(0.030);
-  caloPID->SetClusterSplittingM02Cut(0,100); // Do the selection in the analysis class and not in the PID method to fill SS histograms
-
+  caloPID->SetClusterSplittingM02Cut(0,100000); // use parametrized cut, not fixed
+  
   caloPID->SetPi0MassRange(0.11, 0.18);
   caloPID->SetEtaMassRange(0.40, 0.60);
   caloPID->SetPhotonMassRange(0.00, 0.08);
   
-  caloPID->SwitchOnSplitAsymmetryCut() ;
-  if(kCollisions=="PbPb") // pp default
+  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
+  
+  caloPID->SetClusterSplittingMinNCells(6);
+  
+  if(kCollisions=="PbPb" || kName.Contains("150"))
   {
-    caloPID->SetAsymmetryMinimumSelectionParameters(0,0,-0.66   );
-    caloPID->SetAsymmetryMinimumSelectionParameters(0,1, 0.131  );
-    caloPID->SetAsymmetryMinimumSelectionParameters(0,2,-0.0028 );
-    
-    caloPID->SetAsymmetryMinimumSelectionParameters(1,0,-1.31    );
-    caloPID->SetAsymmetryMinimumSelectionParameters(1,1, 0.26    );
-    caloPID->SetAsymmetryMinimumSelectionParameters(1,2,-0.0079  );
-    caloPID->SetAsymmetryMinimumSelectionParameters(1,3, 0.000038);
+    caloPID->SetClusterSplittingMinNCells(4);
+    ana->SetMinNCells(4);
+    caloPID->SetPi0MassShiftHighECell(0.005);
+    if(kCollisions=="PbPb") ana->SwitchOnFillHighMultHistograms();
+  }
+  
+  ana->AddToHistogramsName("AnaInClusterIM_");
+  
+  if(useAsy)
+  {
+    caloPID->SwitchOnSplitAsymmetryCut() ;
+  }
+  else
+  {
+    printf("InClusterIM: Do not apply Asy cut on merged pi0 in cluster analysis \n");
+    caloPID->SwitchOffSplitAsymmetryCut() ;
+    ana->AddToHistogramsName("AnaInClusterIM_OpenAsy_");
+  }
+  
+  if(!useSS)
+  {
+    printf("InClusterIM: Do not apply SS cut on merged pi0 in cluster analysis \n");
+    caloPID->SwitchOffSplitShowerShapeCut() ;
+    ana->AddToHistogramsName("AnaInClusterIM_OpenSS_");
+  }
+  else  caloPID->SwitchOnSplitShowerShapeCut() ;
+  
+  if(!useAsy && !useSS)
+  {
+    printf("InClusterIM: Do not apply SS and Asy cut on merged pi0 in cluster analysis \n");
+    ana->AddToHistogramsName("AnaInClusterIM_OpenSS_OpenAsy_");
   }
   
+  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
+  
   ConfigureMC(ana);
   
   if(kPrint) ana->Print("");
@@ -828,98 +926,42 @@ AliAnaChargedParticles* ConfigureChargedAnalysis()
   ana->SetMinPt(0.5);
   ana->SwitchOnFiducialCut();
   ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
-  ana->SwitchOffFillPileUpHistograms();
-
+  
+  ana->SwitchOnFillVertexBC0Histograms() ;
+  if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
+  
   // Input / output delta AOD settings
   
-  if(!kData.Contains("delta")) 
+  if(!kData.Contains("delta"))
   {
     ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
     ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
     //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
   }
-  else 
+  else
     ana->SetInputAODName(Form("Hadron%s",kName.Data()));
   printf("Set Hadron%s\n",kName.Data());
+  
   //Set Histograms name tag, bins and ranges
   
   ana->AddToHistogramsName("AnaHadrons_");
   SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
-
+  
   ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
   ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
   
   ConfigureMC(ana);
   
   if(kPrint) ana->Print("");
-   
-  return ana;
-  
-}
-
-
-//_______________________________
-AliAnaPi0* ConfigurePi0Analysis()
-{
-  
-  AliAnaPi0 *ana = new AliAnaPi0();
-  
-  ana->SetDebug(kDebug);//10 for lots of messages
-  
-  // Input delta AOD settings
-  ana->SetInputAODName(Form("Photon%s",kName.Data()));
-  
-  // Calorimeter settings
-  ana->SetCalorimeter(kCalorimeter);
-  if(kCalorimeter=="PHOS") ana->SetNumberOfModules(3); //PHOS first year
-  else 
-  {                   
-    if     (kYears == 2010) ana->SetNumberOfModules( 4); // EMCAL first year
-    else if(kYears == 2011) ana->SetNumberOfModules(10); // Second year
-    else                    ana->SetNumberOfModules(12);
-  }
-  
-  //settings for pp collision mixing
-  ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
-  
-  // Cuts 
-  if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(70);
-  
-  if     (kCollisions=="pp"  ) 
-  {
-    ana->SetNCentrBin(1);
-    ana->SetNZvertBin(10);
-    ana->SetNRPBin(1);
-    ana->SetNMaxEvMix(100);    
-    ana->SwitchOnSMCombinations();
-  }
-  else if(kCollisions=="PbPb") 
-  {
-    ana->SetNCentrBin(10);
-    ana->SetNZvertBin(10);
-    ana->SetNRPBin(4);
-    ana->SetNMaxEvMix(10);
-    ana->SwitchOffSMCombinations();
-  }
-
-  ana->SwitchOffMultipleCutAnalysis();
-
-  //Set Histograms name tag, bins and ranges
-  
-  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
-  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
-
-  ConfigureMC(ana);
-  
-  if(kPrint) ana->Print("");
   
   return ana;
   
 }
 
+
 //_____________________________________________________
-AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle, 
-                                      Int_t analysis)
+AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
+                                      Int_t analysis, Bool_t useSS = kTRUE, Bool_t useAsy = kTRUE)
 {
   
   AliAnaPi0EbE *ana = new AliAnaPi0EbE();
@@ -933,23 +975,35 @@ AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
   if(kCollisions=="pp") ana->SetMinPt(0.5);
   else                  ana->SetMinPt(1.0);
   
-  if(kCalorimeter=="EMCAL")ana->SetPairTimeCut(20); // More strict than in pi0 inv mass analysis
+  if(kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
   
+  ana->SetMinDistanceToBadChannel(2, 4, 6);
+  ana->SwitchOnSplitClusterDistToBad();
+
+  ana->SwitchOnSelectedClusterHistoFill();
+
   ana->SetCalorimeter(kCalorimeter);
+  ana->SetTimeCut(-1e10,1e10); // Open time cut
   
   // Input / output delta AOD settings
   
   ana->SetInputAODName(Form("Photon%s",kName.Data()));
-  if(!kInputDataType.Contains("delta")) 
+  if(!kInputDataType.Contains("delta"))
   {
     ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
     ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+    
   }
-  else  
+  else
     ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
   
+  
   if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
-    
+  
+  //Set Histograms name tag, bins and ranges
+  
+  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
+  
   if(analysis!=AliAnaPi0EbE::kSSCalo)
   {
     AliNeutralMesonSelection *nms = ana->GetNeutralMesonSelection();
@@ -957,12 +1011,15 @@ AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
     
     // Tighten a bit mass cut with respect to default window
     if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
-    if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);    
+    if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
     
-    nms->SwitchOffAngleSelection(); 
+    //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
+    //else nms->SwitchOnAngleSelection();
+    
+    nms->SwitchOffAngleSelection();
     if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
       nms->SetSideBandCutRanges(-1,0,0.180,0.220);
-
+    
     nms->KeepNeutralMesonSelectionHistos(kTRUE);
     //nms->SetAngleMaxParam(2,0.2);
     nms->SetHistoERangeAndNBins(0, 20, 80) ;
@@ -970,49 +1027,92 @@ AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
   }
   else
   { // cluster splitting settings
-    ana->SetMinEnergy(5); 
-    ana->SetMaxEnergy(200.);   
-    ana->SetTimeCut(-1000,1000); // Open time cut
+    ana->SetMinEnergy(6);
+    ana->SetMaxEnergy(200.);
+    
+    ana->SetNLMMinEnergy(0, 10);
+    ana->SetNLMMinEnergy(1, 6);
+    ana->SetNLMMinEnergy(2, 6);
     
     // NLM cut, used in all, exclude clusters with more than 2 maxima
     ana->SetNLMCut(1, 2) ;
     
     AliCaloPID* caloPID = ana->GetCaloPID();
+    
+    caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
+    
+    if(!useSS)
+    {
+      printf("Do not apply SS cut on merged pi0 analysis \n");
+      caloPID->SwitchOffSplitShowerShapeCut() ;
+      ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
+      ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
+      caloPID->SetClusterSplittingM02Cut(0.1,10000); 
+    }
+    else
+    {
+      caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
+      caloPID->SwitchOnSplitShowerShapeCut() ;
+    }
+    
+    if(useAsy) caloPID->SwitchOnSplitAsymmetryCut() ;
+    else
+    {
+      caloPID->SwitchOffSplitAsymmetryCut() ;
+      if(!useSS)
+      {
+        ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
+        ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
+      }
+      else
+      {
+        ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
+        ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
+      }
+    }
+    
+    //For Pi0 only if  SwitchOnSimpleSplitMassCut()
     caloPID->SetPi0MassRange(0.10, 0.18);
     caloPID->SetEtaMassRange(0.40, 0.60);
     caloPID->SetPhotonMassRange(0.00, 0.08);
-    caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
     
-    caloPID->SwitchOnSplitAsymmetryCut() ;
-    if(kCollisions=="PbPb") // pp default
+    caloPID->SetClusterSplittingMinNCells(6);
+    
+    //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
+    //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
+    //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
+    
+    if(kCollisions=="PbPb" || kName.Contains("150"))
     {
-      caloPID->SetAsymmetryMinimumSelectionParameters(0,0,-0.66   );
-      caloPID->SetAsymmetryMinimumSelectionParameters(0,1, 0.131  );
-      caloPID->SetAsymmetryMinimumSelectionParameters(0,2,-0.0028 );
-      
-      caloPID->SetAsymmetryMinimumSelectionParameters(1,0,-1.31    );
-      caloPID->SetAsymmetryMinimumSelectionParameters(1,1, 0.26    );
-      caloPID->SetAsymmetryMinimumSelectionParameters(1,2,-0.0079  );
-      caloPID->SetAsymmetryMinimumSelectionParameters(1,3, 0.000038);
+      caloPID->SetClusterSplittingMinNCells(4);
+      caloPID->SetPi0MassShiftHighECell(0.005);
     }
   }
   
-  ana->SwitchOffSelectedClusterHistoFill();
   ana->SwitchOffFillWeightHistograms();
-  ana->SwitchOffFillPileUpHistograms();
-
-  if(!kTM) ana->SwitchOnTMHistoFill();
-  else     ana->SwitchOffTMHistoFill();
+  if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
   
-  //Set Histograms name tag, bins and ranges
+  if(kTM)
+  {
+    //printf("--->>>REMOVE MATCHED Pi0\n");
+    ana->SwitchOnTrackMatchRejection() ;
+    ana->SwitchOffTMHistoFill() ;
+  }
+  else
+  {
+    //printf("---->>>ACCEPT MATCHED Pi0\n");
+    ana->SwitchOffTrackMatchRejection() ;
+    ana->SwitchOnTMHistoFill() ;
+  }
   
-  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
   SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
   
-  ConfigureMC(ana);
+  //ana->SwitchOnFillEMCALBCHistograms();
   
   if(kPrint) ana->Print("");
   
+  ConfigureMC(ana);
+  
   return  ana;
   
 }
@@ -1057,7 +1157,7 @@ AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString particle="Photon",
   else      ana->SwitchOffTMHistoFill();
   
   ana->SwitchOffSSHistoFill();
-  ana->SwitchOffFillPileUpHistograms();
+  if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
 
   //Do settings for main isolation cut class
   AliIsolationCut * ic =  ana->GetIsolationCut();      
@@ -1331,7 +1431,7 @@ AliAnaCalorimeterQA* ConfigureQAAnalysis()
   ana->SetDebug(kDebug); //10 for lots of messages
   ana->SetCalorimeter(kCalorimeter);
   
-  ana->SetTimeCut(-1000,1000); // Open time cut
+  ana->SetTimeCut(-1e10,1e10); // Open time cut
   
   // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
   if(kCalorimeter=="PHOS"  && kTrig=="PHOS")
@@ -1441,14 +1541,14 @@ void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges)
   histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
 
   // QA, electron, charged
-  histoRanges->SetHistoPOverERangeAndNBins(0,10.,100);
-  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
+  histoRanges->SetHistoPOverERangeAndNBins(0,  2.5 ,500);
+  histoRanges->SetHistodEdxRangeAndNBins  (0.,250.0,500);
   
   // QA
   histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
   histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
   histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
-  histoRanges->SetHistoNClusterCellRangeAndNBins(0,500,500);
+  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
   histoRanges->SetHistoZRangeAndNBins(-400,400,200);
   histoRanges->SetHistoRRangeAndNBins(400,450,25);
   histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
@@ -1513,7 +1613,7 @@ UInt_t SetTriggerMaskFromName()
   else if(kTrig=="Central")
   {
     printf("CaloTrackCorr trigger Central\n");
-    return AliVEvent::kCentral;
+    return (AliVEvent::kCentral  | AliVEvent::kMB);
   }
   else if(kTrig=="CentralEGA")
   {
@@ -1523,12 +1623,12 @@ UInt_t SetTriggerMaskFromName()
   else if(kTrig=="SemiCentral")
   {
     printf("CaloTrackCorr trigger SemiCentral\n");
-    return AliVEvent::kSemiCentral;
+    return (AliVEvent::kSemiCentral | AliVEvent::kMB);
   }
   else if(kTrig=="SemiOrCentral")
   {
     printf("CaloTrackCorr trigger SemiCentral Or Central\n");
-    return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
-  }    
+    return (AliVEvent::kSemiCentral | AliVEvent::kCentral  | AliVEvent::kMB);
+  }
 }