]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALClusterizer.cxx
updates/fixes from Rachid
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizer.cxx
index 6b3122cc5f0c2b10263be62fab1e8fe00963138e..dd9b375f4169648eb36c3c5d0cc2ea394bf0ba5e 100644 (file)
@@ -176,6 +176,7 @@ void AliEMCALClusterizer::DeleteRecPoints()
       AliDebug(2, "Deleting fRecPoints.");
       fRecPoints->Delete();
       delete fRecPoints;
+      fRecPoints = 0;
     }
 }
 
@@ -188,6 +189,7 @@ void AliEMCALClusterizer::DeleteDigits()
       AliDebug(2, "Deleting fDigitsArr.");
       fDigitsArr->Clear("C");
       delete fDigitsArr;
+      fDigitsArr = 0;
     }
 }
 
@@ -197,6 +199,13 @@ void AliEMCALClusterizer::Calibrate(Float_t & amp, Float_t & time, const Int_t a
   // Convert digitized amplitude into energy, calibrate time
   // Calibration parameters are taken from OCDB : OCDB/EMCAL/Calib/Data
 
+  //Check if time is too large or too small, indication of a noisy channel, remove in this case
+  if(time > fTimeMax || time < fTimeMin) {
+    amp  = 0 ;
+    time = 0 ;
+    return ;
+  }  
+  
   //Return energy with default parameters if calibration is not available
   if (!fCalibData && !fCaloPed) {
     if (fIsInputCalibrated == kTRUE)
@@ -247,14 +256,8 @@ void AliEMCALClusterizer::Calibrate(Float_t & amp, Float_t & time, const Int_t a
       return ;
     }
   }
-  //Check if time is too large or too small, indication of a noisy channel, remove in this case
-  if(time > fTimeMax || time < fTimeMin) {
-    amp  = 0 ;
-    time = 0 ;
-    return ;
-  }
     
-  if (fIsInputCalibrated||!fCalibData)
+  if (fIsInputCalibrated || !fCalibData)
   {
     AliDebug(10, Form("Input already calibrated!"));
     return ;