Changeset 4781 for trunk


Ignore:
Timestamp:
08/27/04 20:54:37 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4780 r4781  
    3434   * mjobs/MJPedestal.h
    3535     - added function SetUseData() and IsUseData()
     36
     37   * mcalib/MCalibrationQEPix.cc
     38     - changed initialization of fNorm... variables from 1. to -1.
     39       Like this, an accidental not-filling of MCalibrationQECam will
     40       be recognized easier.
    3641
    3742   * mcalib/MCalibrationChargeCalc.cc
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4774 r4781  
    789789  const Float_t pedes  = ped.GetPedestal();
    790790  const Float_t prms   = ped.GetPedestalRms();
    791   const Float_t num    = TMath::Sqrt((Float_t)fPedestals->GetTotalEntries());
    792 
     791  const Int_t   num    = fPedestals->GetTotalEntries();
     792 
     793  //
     794  // RMS error set by PedCalcFromLoGain, 0 in case MPedCalcPedRun was used.
     795  //
     796  const Float_t prmserr = num>0 ? prms/TMath::Sqrt(2.*num) : ped.GetPedestalRmsError();
    793797
    794798  //
     
    797801  if (cal.IsHiGainSaturation())
    798802    {
    799       cal.SetPedestal(pedes* fNumLoGainSamples,
    800                       prms * fSqrtLoGainSamples,
    801                       prms * fNumLoGainSamples / num);
     803      cal.SetPedestal(pedes   * fNumLoGainSamples,
     804                      prms    * fSqrtLoGainSamples,
     805                      prmserr * fSqrtLoGainSamples);
    802806      cal.CalcLoGainPedestal((Float_t)fNumLoGainSamples, aidx);
    803807    }
    804808  else
    805809    {
    806       cal.SetPedestal(pedes* fNumHiGainSamples,
    807                       prms * fSqrtHiGainSamples,
    808                       prms * fNumHiGainSamples / num);
     810      cal.SetPedestal(pedes   * fNumHiGainSamples,
     811                      prms    * fSqrtHiGainSamples,
     812                      prmserr * fSqrtHiGainSamples);
    809813    }
    810814 
Note: See TracChangeset for help on using the changeset viewer.