Added protection against zero calibration coefficients.
authorpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2007 20:24:54 +0000 (20:24 +0000)
committerpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2007 20:24:54 +0000 (20:24 +0000)
PHOS/AliPHOSPreprocessor.cxx

index 7a36d7a..7fc4170 100644 (file)
@@ -171,7 +171,10 @@ UInt_t AliPHOSPreprocessor::Process(TMap* /*valueSet*/)
          //TODO: dead channels exclusion!
          if(histo) {
            coeff = histo->GetMean()/refMean;
-           calibData.SetADCchannelEmc(mod+1,col+1,row+1,0.001/coeff);
+           if(coeff>0)
+             calibData.SetADCchannelEmc(mod+1,col+1,row+1,0.001/coeff);
+           else 
+             calibData.SetADCchannelEmc(mod+1,col+1,row+1,0.001);
            AliInfo(Form("mod %d col %d row %d  coeff %f\n",mod,col,row,coeff));
          }
          else