Put 0.1 as minimal value of the gas gain (Raphaelle)
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2011 08:02:54 +0000 (08:02 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2011 08:02:54 +0000 (08:02 +0000)
TRD/AliTRDCalibraFit.cxx
TRD/AliTRDPreprocessorOffline.cxx

index f423656..eb9c4de 100644 (file)
@@ -1944,6 +1944,7 @@ AliTRDCalDet *AliTRDCalibraFit::CreateDetObjectGain(const TObjArray *vectorFit,
       } // Row
       if(count > 0) mean = mean/count;
     }
+    if(mean < 0.1) mean = 0.1;
     object->SetValue(detector,mean);
   }
  
index f44bea6..cc252ca 100644 (file)
@@ -711,8 +711,16 @@ Bool_t AliTRDPreprocessorOffline::AnalyzeChamberStatus()
      Float_t gaininit = fCalDetGainUsed->GetValue(det);
      Float_t gainout = calDetGain->GetValue(det);
 
-     if(TMath::Abs(gainout-1.0) > 0.000001) calDetGain->SetValue(det,gaininit*gainout);
-     else calDetGain->SetValue(det,mean);
+     if(TMath::Abs(gainout-1.0) > 0.000001) {
+       Double_t newgain = gaininit*gainout;
+       if(newgain < 0.1) newgain = 0.1;
+       calDetGain->SetValue(det,newgain);
+     }
+     else {
+       Double_t newgain = mean;
+       if(newgain < 0.1) newgain = 0.1;
+       calDetGain->SetValue(det,newgain);
+     }
    }
 
 
@@ -742,6 +750,7 @@ Bool_t AliTRDPreprocessorOffline::AnalyzeChamberStatus()
 
      Float_t gain = calDetGain->GetValue(det);
      if(vdriftout > 0.0) gain = gain*vdriftinit/vdriftout;
+     if(gain < 0.1) gain = 0.1;
      calDetGain->SetValue(det,gain);
 
 
@@ -1058,5 +1067,3 @@ Int_t AliTRDPreprocessorOffline::GetFirstRun(TString name) const
 
 }
 
-
-