Overflow protection + add pad relative gain (M.Ivanov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Mar 2006 13:56:10 +0000 (13:56 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Mar 2006 13:56:10 +0000 (13:56 +0000)
TRD/AliTRDdigitizer.cxx

index 529fb0b6825d97d58d177f9fcea88a6cb2f9e8e5..087c53690f526019a338da0e3ed0fa6059fae34d 100644 (file)
@@ -996,6 +996,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
 
           // The time bin (always positive), with t0 correction
           Double_t timeBinIdeal = drifttime * samplingRate + t0;
+         if (TMath::Abs(timeBinIdeal)>nTimeTotal*2) timeBinIdeal = nTimeTotal*2; //???MI????
           Int_t    timeBinTruncated = (Int_t) timeBinIdeal;
           // The distance of the position to the middle of the timebin
           Double_t timeOffset = ((Float_t) timeBinTruncated + 0.5 - timeBinIdeal) / samplingRate;
@@ -1155,6 +1156,8 @@ Bool_t AliTRDdigitizer::MakeDigits()
               Float_t signalAmp = signals->GetDataUnchecked(iRow,iCol,iTime);
               // Pad and time coupling
               signalAmp *= coupling;
+             Float_t padgain = calibration->GetGainFactor(iDet, iCol, iRow);
+             signalAmp *= padgain;
               // Add the noise, starting from minus ADC baseline in electrons
               Double_t baselineEl = simParam->GetADCbaseline() * (simParam->GetADCinRange()
                                                            / simParam->GetADCoutRange())