]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSReconstructor.cxx
fix constness
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructor.cxx
index 3d928ee334485e0ed4e1273cd5d07bf81ec2518a..2ec509d2531ae03aacffa040e75441137a69de85 100644 (file)
@@ -272,8 +272,14 @@ void AliPHOSReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
     const AliPHOSDigit * dig = (const AliPHOSDigit*)fgDigitsArray->At(idig);
     if(dig->GetId() <= knEMC && 
        Calibrate(dig->GetEnergy(),dig->GetId()) > GetRecoParam()->GetEMCMinE() ){
+      Int_t primary = dig->GetPrimary(1) ;
+      //For real data always primary==-1, we use this field to mark cells with overflow
+      //in HG channel. This is not needed in MC simulations,
+      if(primary==-1 && dig->IsLG())
+       primary=-2 ;
       phsCells.SetCell(idignew,dig->GetId(), Calibrate(dig->GetEnergy(),dig->GetId()),
-                                             CalibrateT(dig->GetTime(),dig->GetId()));   
+                                             CalibrateT(dig->GetTime(),dig->GetId(),dig->IsLG()),
+                                             primary) ;
       idignew++;
     }
   }
@@ -381,7 +387,7 @@ void AliPHOSReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
     delete [] fracList;
     delete [] absIdList;
   }
-  fgDigitsArray ->Clear();
+  fgDigitsArray ->Clear("C");
   fgEMCRecPoints->Clear("C");
   recParticles  ->Clear();
 
@@ -509,7 +515,7 @@ Float_t AliPHOSReconstructor::Calibrate(Float_t amp, Int_t absId)const{
   }
 }
 //==================================================================================
-Float_t AliPHOSReconstructor::CalibrateT(Float_t time, Int_t absId)const{
+Float_t AliPHOSReconstructor::CalibrateT(Float_t time, Int_t absId,Bool_t isLG)const{
   // Calibrate EMC digit, i.e. multiply its Amp by a factor read from CDB
 
   const AliPHOSGeometry *geom = AliPHOSGeometry::GetInstance() ;
@@ -524,7 +530,10 @@ Float_t AliPHOSReconstructor::CalibrateT(Float_t time, Int_t absId)const{
     return 0. ;
   }
   else{ //EMC
-    time += fgCalibData->GetTimeShiftEmc(module,column,row);
+    if(isLG)
+      time += fgCalibData->GetLGTimeShiftEmc(module,column,row);
+    else
+      time += fgCalibData->GetTimeShiftEmc(module,column,row);
     return time ;
   }
 }