Ignore:
Timestamp:
04/09/04 12:38:02 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r3688 r3692  
    251251//
    252252MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title)
    253     : fPedestals(NULL), fCam(NULL), fQECam(NULL),
    254       fRawEvt(NULL), fRunHeader(NULL), fGeom(NULL),
    255       fBadPixels(NULL), fEvtTime(NULL),
    256       fSignals(NULL), fSigBlind(NULL), fSigPIN(NULL),
    257       fPINDiode(NULL), fBlindPixel(NULL)
    258 {
     253    : fBadPixels(NULL), fCam(NULL), fBlindPixel(NULL), fPINDiode(NULL),
     254      fQECam(NULL), fSignals(NULL), fSigBlind(NULL), fSigPIN(NULL),
     255      fGeom(NULL), fPedestals(NULL), fRawEvt(NULL), fRunHeader(NULL),
     256      fEvtTime(NULL)
     257      {
    259258
    260259  fName  = name  ? name  : "MCalibrationChargeCalc";
     
    290289    fSqrtHiGainSamples       = 0.;
    291290    fSqrtLoGainSamples       = 0.;
    292     fConversionHiLo          = 0 ;
    293291    SkipQualityChecks      ( kFALSE );
    294292    SkipHiLoGainCalibration( kFALSE );   
     
    571569  if (cal.GetMeanErr() < fChargeErrLimit)
    572570    {
    573       *fLog << warn << GetDescriptor() << ": Sigma of Fitted Charge: " << cal.GetMeanErr()
     571      *fLog << warn << GetDescriptor() << ": Error of Fitted Charge: " << cal.GetMeanErr()
    574572            << " is smaller than " << fChargeErrLimit << " in Pixel  " << cal.GetPixId() << endl;
    575573      bad.SetUncalibrated( MBadPixelsPix::kChargeErrNotValid );
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r3679 r3692  
    4343private:
    4444
    45   static const Float_t fgChargeLimit;            //! Default for fChargeLimit            (now set to: 3.)
    46   static const Float_t fgChargeErrLimit;         //! Default for fChargeErrLimit         (now set to: 0.)
    47   static const Float_t fgChargeRelErrLimit;      //! Default for fChargeRelErrLimit      (now set to: 1.)
    48   static const Float_t fgLambdaCheckLimit;       //! Default for fLambdaCheckLimit       (now set to: 0.2)
    49   static const Float_t fgLambdaErrLimit;         //! Default for fLabmdaErrLimit         (now set to: 0.2)
    50   static const Float_t fgPheErrLimit;            //! Default for fPheErrLimit            (now set to: 5.)
    51   static const Float_t fgTimeLowerLimit;         //! Default for fTimeLowerLimit         (now set to: 1.)
    52   static const Float_t fgTimeUpperLimit;         //! Default for fTimeUpperLimit         (now set to: 2.)
    53  
    54   Float_t fChargeLimit;            // Limit (in units of PedRMS) for acceptance of mean charge
    55   Float_t fChargeErrLimit;         // Limit (in units of PedRMS) for acceptance of charge sigma square
    56   Float_t fChargeRelErrLimit;      // Limit (in units of Sigma of fitted charge) for acceptance of mean 
    57   Float_t fLambdaCheckLimit;       // Limit for rel. diff. lambda and lambdacheck blind pixel
    58   Float_t fLambdaErrLimit;         // Limit for acceptance of lambda error blind pixel
    59   Float_t fPheErrLimit;            // Limit for acceptance number phe's w.r.t area index mean (in sigmas)
    60   Float_t fTimeLowerLimit;         // Limit (in units of FADC slices) for dist. to first signal slice
    61   Float_t fTimeUpperLimit;         // Limit (in units of FADC slices) for dist. to last signal slice
     45  static const Float_t fgChargeLimit;          //! Default for fChargeLimit       (now set to: 3.)
     46  static const Float_t fgChargeErrLimit;       //! Default for fChargeErrLimit    (now set to: 0.)
     47  static const Float_t fgChargeRelErrLimit;    //! Default for fChargeRelErrLimit (now set to: 1.)
     48  static const Float_t fgLambdaCheckLimit;     //! Default for fLambdaCheckLimit  (now set to: 0.2)
     49  static const Float_t fgLambdaErrLimit;       //! Default for fLabmdaErrLimit    (now set to: 0.2)
     50  static const Float_t fgPheErrLimit;          //! Default for fPheErrLimit       (now set to: 5.)
     51  static const Float_t fgTimeLowerLimit;       //! Default for fTimeLowerLimit    (now set to: 1.)
     52  static const Float_t fgTimeUpperLimit;       //! Default for fTimeUpperLimit    (now set to: 2.)
    6253
    63   MPedestalCam               *fPedestals;     //! Pedestals of all pixels in the camera
    64   MCalibrationChargeCam      *fCam;           // Calibration events of all pixels in the camera
    65   MCalibrationQECam          *fQECam;         // Derived Quantum efficiency of all pixels in the camera 
    66   MRawEvtData                *fRawEvt;        //! raw event data (time slices)
    67   MRawRunHeader              *fRunHeader;     //! RunHeader information
    68   MGeomCam                   *fGeom;          //! Geometry information
    69   MBadPixelsCam              *fBadPixels;     //! Bad Pixels information
    70  
    71   MTime                      *fEvtTime;       //! Time of the event
     54  // Variables
     55  Float_t fChargeLimit;                        // Limit acceptance mean charge  (in units of PedRMS)
     56  Float_t fChargeErrLimit;                     // Limit acceptance charge error (in abs. numbers)
     57  Float_t fChargeRelErrLimit;                  // Limit acceptance rel. error mean (in abs. numbers)
     58  Int_t   fFlags;                              // Bit-field for the flags
     59  Float_t fLambdaCheckLimit;                   // Limit rel. diff. lambda and lambdacheck in Blind Pixel
     60  Float_t fLambdaErrLimit;                     // Limit acceptance lambda error in Blind Pixel
     61  Float_t fNumHiGainSamples;                   // Number High-Gain FADC slices used by extractor
     62  Float_t fNumLoGainSamples;                   // Number Low -Gain FADC slices used by extractor
     63  Float_t fPheErrLimit;                        // Limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
     64  Float_t fSqrtHiGainSamples;                  // Square root nr. High-Gain FADC slices used by extractor
     65  Float_t fSqrtLoGainSamples;                  // Square root nr. Low -Gain FADC slices used by extractor
     66  Float_t fTimeLowerLimit;                     // Limit dist. to first signal slice (in units of FADC slices)
     67  Float_t fTimeUpperLimit;                     // Limit dist. to last signal slice  (in units of FADC slices)
     68  MCalibrationCam::PulserColor_t fPulserColor; // Calibration LEDs colour
    7269
    73   MExtractedSignalCam        *fSignals;       //! Extracted signal of pixels in the camera
    74   MExtractedSignalBlindPixel *fSigBlind;      //! Extracted signal of Blind Pixel
    75   MExtractedSignalPINDiode   *fSigPIN;        //! Extracted signal of PIN Diode
     70  // Pointers
     71  MBadPixelsCam              *fBadPixels;      //  Bad Pixels
     72  MCalibrationChargeCam      *fCam;            //  Calibrated Charges of all pixels
     73  MCalibrationChargeBlindPix *fBlindPixel;     //  Calibrated Charges of the Blind Pixel
     74  MCalibrationChargePINDiode *fPINDiode;       //  Calibrated Charges of the PIN Diode
     75  MCalibrationQECam          *fQECam;          //  Calibrated Quantum Efficiencies of all pixels
     76  MExtractedSignalCam        *fSignals;        //! Extracted signal of all pixels
     77  MExtractedSignalBlindPixel *fSigBlind;       //! Extracted signal of Blind Pixel
     78  MExtractedSignalPINDiode   *fSigPIN;         //! Extracted signal of PIN Diode
     79  MGeomCam                   *fGeom;           //! Camera geometry
     80  MPedestalCam               *fPedestals;      //! Pedestals all pixels (calculated previously from ped.file)
     81  MRawEvtData                *fRawEvt;         //! Raw calibration event data
     82  MRawRunHeader              *fRunHeader;      //! RunHeader information
     83  MTime                      *fEvtTime;        //! Time of the event
    7684
    77   MCalibrationChargePINDiode *fPINDiode;      // Calibration results of the PIN Diode
    78   MCalibrationChargeBlindPix *fBlindPixel;    // Calibration results of the Blind Pixel
    79 
    80   Float_t  fNumHiGainSamples;
    81   Float_t  fNumLoGainSamples;
    82   Float_t  fSqrtHiGainSamples;
    83   Float_t  fSqrtLoGainSamples;
    84  
    85   Float_t fConversionHiLo;
    86   Int_t   fFlags;                              // Flag for the fits used
    87 
     85  // enums
    8886  enum  { kUseQualityChecks, kHiLoGainCalibration };
    8987
    90   MCalibrationCam::PulserColor_t fPulserColor;
     88  // functions
     89  void   FinalizePedestals      ( const MPedestalPix &ped, MCalibrationChargePix &cal,
     90                                  Float_t &avped, Float_t &avrms                      );
     91  void   FinalizeAvPedestals    ( MCalibrationChargePix &cal,
     92                                  Float_t avped, Float_t avrms, Int_t avnum);
     93  Bool_t FinalizeCharges        ( MCalibrationChargePix &cal, MBadPixelsPix &bad      );
     94  Bool_t FinalizePINDiode       ();
     95  Bool_t FinalizeBlindPixel     ();
     96  Bool_t FinalizeFFactorMethod  ();
     97  void   FinalizeBadPixels      ();
     98  void   FinalizeFFactorQECam   (); 
     99  void   FinalizeBlindPixelQECam();
     100  void   FinalizePINDiodeQECam  ();
    91101 
    92   Int_t  PreProcess(MParList *pList);
    93   Bool_t ReInit(MParList *pList);
    94   Int_t  Process();
     102  void   PrintUnsuitable  ( MBadPixelsPix::UnsuitableType_t typ  , const char *text) const;   
     103  void   PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
     104
     105  Int_t  PreProcess (MParList *pList);
     106  Bool_t ReInit     (MParList *pList);
     107  Int_t  Process    ();
    95108  Int_t  PostProcess();
    96 
    97   void   FinalizePedestals   ( const MPedestalPix &ped, MCalibrationChargePix &cal,
    98                                Float_t &avped, Float_t &avrms);
    99   void   FinalizeAvPedestals ( MCalibrationChargePix &cal, Float_t avped, Float_t avrms, Int_t avnum);
    100   Bool_t FinalizeCharges     ( MCalibrationChargePix &cal, MBadPixelsPix &bad );
    101   Bool_t FinalizePINDiode();
    102   Bool_t FinalizeBlindPixel();
    103   Bool_t FinalizeFFactorMethod();
    104   void   FinalizeBadPixels();
    105   void   FinalizeFFactorQECam(); 
    106   void   FinalizeBlindPixelQECam();
    107   void   FinalizePINDiodeQECam();
    108  
    109   void PrintUnsuitable(MBadPixelsPix::UnsuitableType_t typ, const char *text) const;   
    110   void PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
    111109
    112110public:
     
    116114  void Clear(const Option_t *o="");
    117115 
    118   void SetChargeLimit      ( const Float_t f=fgChargeLimit       ) { fChargeLimit       = f;   }
    119   void SetChargeErrLimit   ( const Float_t f=fgChargeErrLimit    ) { fChargeErrLimit    = f;   }
    120   void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelErrLimit = f;   }
    121   void SetPheErrLimit      ( const Float_t f=fgPheErrLimit       ) { fPheErrLimit       = f;   } 
    122   void SetLambdaErrLimit   ( const Float_t f=fgLambdaErrLimit    ) { fLambdaErrLimit    = f;   }
    123   void SetLambdaCheckLimit ( const Float_t f=fgLambdaCheckLimit  ) { fLambdaCheckLimit  = f;   }
    124   void SetPulserColor      ( MCalibrationCam::PulserColor_t col ) { fPulserColor       = col; }
    125   void SetTimeLowerLimit   ( const Float_t f=fgTimeLowerLimit    ) { fTimeLowerLimit    = f;   }
    126   void SetTimeUpperLimit   ( const Float_t f=fgTimeUpperLimit    ) { fTimeUpperLimit    = f;   }
     116  void SetChargeLimit       ( const Float_t f=fgChargeLimit            ) { fChargeLimit       = f;   }
     117  void SetChargeErrLimit    ( const Float_t f=fgChargeErrLimit         ) { fChargeErrLimit    = f;   }
     118  void SetChargeRelErrLimit ( const Float_t f=fgChargeRelErrLimit      ) { fChargeRelErrLimit = f;   }
     119  void SetLambdaErrLimit    ( const Float_t f=fgLambdaErrLimit         ) { fLambdaErrLimit    = f;   }
     120  void SetLambdaCheckLimit  ( const Float_t f=fgLambdaCheckLimit       ) { fLambdaCheckLimit  = f;   }
     121  void SetPheErrLimit       ( const Float_t f=fgPheErrLimit            ) { fPheErrLimit       = f;   } 
     122  void SetPulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col; }
     123  void SetTimeLowerLimit    ( const Float_t f=fgTimeLowerLimit         ) { fTimeLowerLimit    = f;   }
     124  void SetTimeUpperLimit    ( const Float_t f=fgTimeUpperLimit         ) { fTimeUpperLimit    = f;   }
    127125
    128   void SkipQualityChecks(Bool_t b=kTRUE)
    129       {b ? CLRBIT(fFlags, kUseQualityChecks)    : SETBIT(fFlags, kUseQualityChecks);}
    130   void SkipHiLoGainCalibration(Bool_t b=kTRUE)
    131       {b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration);}
     126  void SkipHiLoGainCalibration ( const Bool_t b=kTRUE )
     127      { b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration); }
     128  void SkipQualityChecks       ( const Bool_t b=kTRUE)
     129      { b ? CLRBIT(fFlags, kUseQualityChecks)    : SETBIT(fFlags, kUseQualityChecks);    }
    132130
    133   ClassDef(MCalibrationChargeCalc, 1)   // Task to fill the Calibration Containers from raw data
     131  ClassDef(MCalibrationChargeCalc, 1)   // Task calculating Calibration Containers and Quantum Efficiencies
    134132};
    135133
Note: See TracChangeset for help on using the changeset viewer.