]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Introduce a limit on the gain factor (Raphaelle)
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 13:39:20 +0000 (13:39 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 13:39:20 +0000 (13:39 +0000)
TRD/AliTRDPreprocessorOffline.cxx

index 4eaade574504de9e3dee644115a72f42fbda9f51..20490ece5049d2483da3ac189c1b3197f4b07a31 100644 (file)
@@ -714,11 +714,13 @@ Bool_t AliTRDPreprocessorOffline::AnalyzeChamberStatus()
      if(TMath::Abs(gainout-1.0) > 0.000001) {
        Double_t newgain = gaininit*gainout;
        if(newgain < 0.1) newgain = 0.1;
+       if(newgain > 1.9) newgain = 1.9;
        calDetGain->SetValue(det,newgain);
      }
      else {
        Double_t newgain = mean;
        if(newgain < 0.1) newgain = 0.1;
+       if(newgain > 1.9) newgain = 1.9;
        calDetGain->SetValue(det,newgain);
      }
    }
@@ -751,6 +753,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;
+     if(gain > 1.9) gain = 1.9;
      calDetGain->SetValue(det,gain);