]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AOD/AliAODCaloCells.h
Bug fixes in HGLG flags
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODCaloCells.h
index 0d64ba7b19220fd20dc88a82cb664dfcdc7881b3..0648f1292ae0fbbc35149f45fa5896f9e0c66c29 100644 (file)
@@ -123,7 +123,10 @@ Bool_t AliAODCaloCells::GetCellHighGain(Short_t cellNumber)
 
   Short_t pos = TMath::BinarySearch(fNCells, fCellNumber, cellNumber);
   if (pos>=0 && pos < fNCells && fCellNumber[pos] == cellNumber ) {
-    return fHGLG[pos];
+    if(fHGLG)
+      return fHGLG[pos];
+    else //old version of AOD, 
+      return !(fMCLabel[pos]==-2) ;
   } else {
     return 0.;
   }
@@ -157,7 +160,10 @@ Double_t AliAODCaloCells::GetAmplitude(Short_t pos) const
 Bool_t AliAODCaloCells::GetHighGain(Short_t pos) const 
 { 
   if (pos>=0 && pos<fNCells) {
-    return fHGLG[pos];
+    if(fHGLG)
+      return fHGLG[pos];
+    else //Old version of AOD store this flag in MCLabel
+      return !(fMCLabel[pos]==-2) ;
   } else {
     return 0.;
   }