]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSReconstructor.cxx
changed range for plot in GammaConv task
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructor.cxx
index 990c5513a3e5c1a1166360864302d6cf88a9a229..6841990dab93a4a81202fd9b6e23c330e99ee0a2 100644 (file)
@@ -93,7 +93,7 @@ AliPHOSReconstructor::AliPHOSReconstructor() :
 AliPHOSReconstructor::~AliPHOSReconstructor()
 {
   // dtor
-  delete fGeom;
+  //  delete fGeom; // RS: fGeom is a static object owned by AliPHOSGeometry::fGeom, don't delete
   delete fClusterizer;
   delete fTSM;
   delete fPID;
@@ -272,9 +272,11 @@ 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) ;
       phsCells.SetCell(idignew,dig->GetId(), Calibrate(dig->GetEnergy(),dig->GetId()),
-                                             CalibrateT(dig->GetTime(),dig->GetId()),
-                                             dig->GetPrimary(1)) ;
+                                             CalibrateT(dig->GetTime(),dig->GetId(),dig->IsLG()),
+                                             primary,0.,!dig->IsLG()) ;
+                                            
       idignew++;
     }
   }
@@ -382,7 +384,7 @@ void AliPHOSReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
     delete [] fracList;
     delete [] absIdList;
   }
-  fgDigitsArray ->Clear();
+  fgDigitsArray ->Clear("C");
   fgEMCRecPoints->Clear("C");
   recParticles  ->Clear();
 
@@ -510,7 +512,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() ;
@@ -525,7 +527,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 ;
   }
 }