Ignore:
Timestamp:
05/22/04 17:28:39 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4129 r4130  
    757757{
    758758
     759  /*
    759760  const Float_t mean    = cal.IsHiGainSaturation() ? cal.GetConvertedLoGainMean()    : cal.GetMean();
    760761  const Float_t meanerr = cal.IsHiGainSaturation() ? cal.GetConvertedLoGainMeanErr() : cal.GetMeanErr();
    761762  const Float_t sigma   = cal.IsHiGainSaturation() ? cal.GetConvertedLoGainSigma()   : cal.GetSigma();
    762 
    763   if (mean < fChargeLimit*cal.GetPedRms())
    764     {
    765       *fLog << warn << GetDescriptor() << ": Fitted Charge: " << mean << " is smaller than "
     763  */
     764  if (cal.GetMean() < fChargeLimit*cal.GetPedRms())
     765    {
     766      *fLog << warn << GetDescriptor() << ": Fitted Charge: " << cal.GetMean() << " is smaller than "
    766767            << fChargeLimit << " Pedestal RMS: " <<  cal.GetPedRms() << " in Pixel  " << cal.GetPixId() << endl;
    767768      bad.SetUncalibrated( MBadPixelsPix::kChargeIsPedestal);
    768769    }
    769770 
    770    if (mean < fChargeRelErrLimit*meanerr)
    771     {
    772       *fLog << warn << GetDescriptor() << ": Fitted Charge: " << mean << " is smaller than "
    773             << fChargeRelErrLimit << "* its error: " << meanerr
     771   if (cal.GetMean() < fChargeRelErrLimit*cal.GetMeanErr())
     772    {
     773      *fLog << warn << GetDescriptor() << ": Fitted Charge: " << cal.GetMean() << " is smaller than "
     774            << fChargeRelErrLimit << "* its error: " << cal.GetMeanErr()
    774775            << " in Pixel  " << cal.GetPixId() << endl;
    775776      bad.SetUncalibrated( MBadPixelsPix::kChargeRelErrNotValid );
    776777    }
    777778
    778   if (sigma < cal.GetPedRms())
    779     {
    780       *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge: " << sigma
     779  if (cal.GetSigma() < cal.GetPedRms())
     780    {
     781      *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge: " << cal.GetSigma()
    781782            << " smaller than Pedestal RMS: " << cal.GetPedRms() << " in Pixel  " << cal.GetPixId() << endl;
    782783      bad.SetUncalibrated( MBadPixelsPix::kChargeSigmaNotValid );
     
    15281529}
    15291530
     1531// --------------------------------------------------------------------------
     1532//
     1533// Set the path for output file
     1534//
     1535void MCalibrationChargeCalc::SetOutputPath(const char *path)
     1536{
     1537  fOutputPath = path;
     1538  if (fOutputPath.EndsWith("/"))
     1539    fOutputPath = fOutputPath(0, fOutputPath.Length()-1);
     1540}
     1541
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r3991 r4130  
    6666  MCalibrationCam::PulserColor_t fPulserColor; // Calibration LEDs colour
    6767
     68  TString fOutputPath;                         // Path to the output file
     69 
    6870  // Pointers
    6971  MBadPixelsCam              *fBadPixels;      //  Bad Pixels
     
    110112  void SetLambdaErrLimit    ( const Float_t f=fgLambdaErrLimit         ) { fLambdaErrLimit    = f;   }
    111113  void SetLambdaCheckLimit  ( const Float_t f=fgLambdaCheckLimit       ) { fLambdaCheckLimit  = f;   }
     114  void SetOutputPath        ( const char   *path="."                   );
    112115  void SetPheErrLimit       ( const Float_t f=fgPheErrLimit            ) { fPheErrLimit       = f;   } 
    113116  void SetPulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col; }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3991 r4130  
    214214  return fConversionHiLoVar / (fConversionHiLo * fConversionHiLo);
    215215}
     216
     217// --------------------------------------------------------------------------
     218//
     219// Get the relative variance of the electronics pedestal RMS
     220// - If aidx is 0, return rel. variance of gkElectronicPedRmsInner
     221// - If aidx is 1, return rel. variance of gkElectronicPedRmsOuter
     222//
     223const Float_t MCalibrationChargePix::GetElectronicPedRmsRelVar(const Int_t aidx) const
     224{
     225
     226  if (aidx == 0)
     227    return gkElectronicPedRmsErr * gkElectronicPedRmsErr / gkElectronicPedRmsInner / gkElectronicPedRmsInner;
     228
     229  if (aidx == 1)
     230    return gkElectronicPedRmsErr * gkElectronicPedRmsErr / gkElectronicPedRmsOuter / gkElectronicPedRmsOuter;
     231
     232  return -1.;
     233}
    216234 
    217235
     
    783801    return;
    784802
    785   const Float_t elecPedRms     = (aidx > 0 ? gkElectronicPedRmsOuter : gkElectronicPedRmsInner )
    786                                * TMath::Sqrt(logainsamples);
    787   const Float_t elecPedRmsVar  = gkElectronicPedRmsErr * gkElectronicPedRmsErr * logainsamples;
     803  const Float_t elecPedRms     = (aidx == 0 ? gkElectronicPedRmsInner : gkElectronicPedRmsOuter )
     804                               * TMath::Sqrt(logainsamples) / fConversionHiLo;
     805  const Float_t elecPedRmsVar  = ( GetElectronicPedRmsRelVar(aidx) + GetConversionHiLoRelVar() )
     806                               * elecPedRms * elecPedRms;
    788807 
    789808  Float_t pedRmsSquare      = fPedRms * fPedRms;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3991 r4130  
    4444  enum  { kFFactorMethodValid   };          // Possible bits to be set
    4545
     46  const Float_t GetElectronicPedRmsRelVar(const Int_t aidx) const;
    4647  const Float_t GetConversionHiLoRelVar()  const;
    4748  const Float_t GetFFactorRelVar()     const;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r4127 r4130  
    7272using namespace std;
    7373
    74 const Float_t MCalibrationRelTimeCalc::fgRelTimeResolutionLimit = 0.5;
     74const Float_t MCalibrationRelTimeCalc::fgRelTimeResolutionLimit = 0.75;
    7575// --------------------------------------------------------------------------
    7676//
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h

    r4127 r4130  
    3232private:
    3333
    34   static const Float_t fgRelTimeResolutionLimit; //! Default for fRelTimeResolutionLimit (now set to: 0.5)
     34  static const Float_t fgRelTimeResolutionLimit; //! Default for fRelTimeResolutionLimit (now set to: 0.75)
    3535 
    3636  // Variables
Note: See TracChangeset for help on using the changeset viewer.