Ignore:
Timestamp:
01/14/04 14:03:26 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.cc

    r2749 r2801  
    216216          fSignalCam->GetNumUsedHiGainFADCSlices()*fHeaderFadc->GetPedestal(i);
    217217
     218        //
     219        // In some cases, depending on the camera simulation parameters, one can have
     220        // very little or no noise in the FADC. In the case the rms of pedestal is zero,
     221        // the pixel will be cleaned out later in the image cleaning. To avoid this problem,
     222        // we set a default value of 0.01 ADC counts for the RMS per slice:
     223        //
     224
    218225        const Float_t pedestrms  = sigpix.IsLoGainUsed()?
    219           sqrt((Double_t)(fSignalCam->GetNumUsedLoGainFADCSlices())) * fHeaderFadc->GetPedestalRmsLow(i) :
    220           sqrt((Double_t)(fSignalCam->GetNumUsedHiGainFADCSlices())) * fHeaderFadc->GetPedestalRmsHigh(i);
     226          sqrt((Double_t)(fSignalCam->GetNumUsedLoGainFADCSlices())) * TMath::Max(0.01, fHeaderFadc->GetPedestalRmsLow(i)) :
     227          sqrt((Double_t)(fSignalCam->GetNumUsedHiGainFADCSlices())) * TMath::Max(0.01, fHeaderFadc->GetPedestalRmsHigh(i));
    221228
    222229        calpix.SetPedestal(pedestmean, pedestrms);
Note: See TracChangeset for help on using the changeset viewer.