Changeset 3554 for trunk/MagicSoft


Ignore:
Timestamp:
03/19/04 18:57:35 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3553 r3554  
    4343   * mcalib/MCalibrationQEPix.[h,cc]
    4444     - replace DefinePixId by SetPixId
     45   
     46   * mcalib/MCalibrationChargeCalc.[h,cc]
     47     - added MCalibrationQECam
     48
     49
    4550 2004/03/18: Raquel de los Reyes
    4651
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3511 r3554  
    4444//               MHCalibrationChargeCam
    4545//
    46 //   PstProcess:  Fit results from MHCalibrationChargeCam are retrieved
     46//   PostProcess:  Fit results from MHCalibrationChargeCam are retrieved
    4747//                and used for the calculation of the reduced sigma,
    4848//                the F-Factor method, the blind pixel method (photon flux
     
    6262//  Output Containers:
    6363//   MCalibrationCam
     64//   MCalibrationQECam
    6465//   MBadPixelsCam
    6566//
     
    202203#include "MBadPixelsPix.h"
    203204
     205#include "MCalibrationQECam.h"
     206#include "MCalibrationQEPix.h"
     207
    204208
    205209ClassImp(MCalibrationChargeCalc);
     
    212216//
    213217MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title)
    214     : fPedestals(NULL), fCam(NULL),
     218    : fPedestals(NULL), fCam(NULL), fQECam(NULL),
    215219      fRawEvt(NULL), fRunHeader(NULL), fGeom(NULL),
    216220      fBadPixels(NULL), fEvtTime(NULL),
     
    237241    fNumHiGainSamples  = 0.;
    238242    fNumLoGainSamples  = 0.;
     243    fSqrtHiGainSamples = 0.;
     244    fSqrtLoGainSamples = 0.;
    239245    fConversionHiLo    = 0;
     246    SkipQualityChecks      ( kFALSE );
     247    SkipHiLoGainCalibration( kFALSE );   
    240248
    241249}
     
    252260//
    253261//  - MCalibrationCam
     262//  - MCalibrationQECam
    254263//
    255264// The following output containers are only searched, but not created
     
    259268Int_t MCalibrationChargeCalc::PreProcess(MParList *pList)
    260269{
    261 
    262     fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    263     if (!fRawEvt)
     270 
     271  fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     272  if (!fRawEvt)
    264273    {
    265274      *fLog << err << "MRawEvtData not found... aborting." << endl;
    266275      return kFALSE;
    267276    }
    268 
    269     fCam = (MCalibrationChargeCam*)pList->FindCreateObj("MCalibrationChargeCam");
    270     if (!fCam)
    271         return kFALSE;
    272 
    273     fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
    274     if (!fPINDiode)
    275         return kFALSE;
    276 
    277     fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindCreateObj("MCalibrationChargeBlindPix");
    278     if (!fBlindPixel)
    279         return kFALSE;
    280 
    281     fEvtTime = (MTime*)pList->FindObject("MTime");
    282 
    283     fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
    284     if (!fPedestals)
    285     {
    286         *fLog << err << "MPedestalCam not found... aborting" << endl;
    287         return kFALSE;
    288     }
    289 
    290     fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
    291     if (!fSignals)
    292     {
    293         *fLog << err << "MExtractedSignalCam not found... aborting" << endl;
    294         return kFALSE;
    295     }
    296 
    297     return kTRUE;
     277 
     278  fCam = (MCalibrationChargeCam*)pList->FindCreateObj("MCalibrationChargeCam");
     279  if (!fCam)
     280    return kFALSE;
     281 
     282  fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam");
     283  if (!fQECam)
     284    return kFALSE;
     285 
     286  fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
     287  if (!fPINDiode)
     288    return kFALSE;
     289 
     290  fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindCreateObj("MCalibrationChargeBlindPix");
     291  if (!fBlindPixel)
     292    return kFALSE;
     293 
     294  fEvtTime = (MTime*)pList->FindObject("MTime");
     295 
     296  fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
     297  if (!fPedestals)
     298    {
     299      *fLog << err << "MPedestalCam not found... aborting" << endl;
     300      return kFALSE;
     301    }
     302 
     303  fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
     304  if (!fSignals)
     305    {
     306      *fLog << err << "MExtractedSignalCam not found... aborting" << endl;
     307      return kFALSE;
     308    }
     309 
     310  return kTRUE;
    298311}
    299312
     
    303316// The ReInit searches for the following input containers:
    304317//  - MRawRunHeader
     318//  - MGeomCam
     319//  - MBadPixelsCam
     320//
     321// It retrieves the following variables from MExtractedSignalCam:
     322//
     323//  fNumHiGainSamples
     324//  fNumLoGainSamples
     325//
     326//  fFirstUsedSliceHiGain
     327//  fLastUsedSliceHiGain
     328//  fFirstUsedSliceLoGain
     329//  fLastUsedSliceLoGain
     330//
     331// It defines the PixId of every pixel in MCalibrationChargeCam and MCalibrationQECam
     332// It sets all pixels excluded which have the flag fBadBixelsPix::IsBad() set.
    305333//
    306334Bool_t MCalibrationChargeCalc::ReInit(MParList *pList )
     
    337365  for (UInt_t i=0; i<npixels; i++)
    338366    {
    339       MCalibrationChargePix &pix = (*fCam)[i];
     367      MCalibrationChargePix &pix = (*fCam)      [i];
     368      MCalibrationQEPix     &pqe = (*fQECam)    [i];
    340369      MBadPixelsPix         &bad = (*fBadPixels)[i];
    341370
    342       pix.DefinePixId(i);
     371      pix.SetPixId(i);
     372      pqe.SetPixId(i);
    343373
    344374      if (bad.IsBad())
    345375      {
    346376          pix.SetExcluded();
     377          pqe.SetExcluded();
    347378          continue;
    348379      }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r3447 r3554  
    2121class MCalibrationChargeBlindPix;
    2222class MCalibrationChargeCam;
     23class MCalibrationQECam;
    2324class MGeomCam;
    2425class MExtractedSignalCam;
     
    2930private:
    3031
    31   MPedestalCam               *fPedestals;                 //! Pedestals of all pixels in the camera
    32   MCalibrationChargeCam      *fCam;                       // Calibration events of all pixels in the camera
    33   MRawEvtData                *fRawEvt;                    //! raw event data (time slices)
    34   MRawRunHeader              *fRunHeader;                 //! RunHeader information
    35   MGeomCam                   *fGeom;                      //! Geometry information
    36   MBadPixelsCam              *fBadPixels;                 //! Bad Pixels information
     32  MPedestalCam               *fPedestals;     //! Pedestals of all pixels in the camera
     33  MCalibrationChargeCam      *fCam;           // Calibration events of all pixels in the camera
     34  MCalibrationQECam          *fQECam;         // Derived Quantum efficiency of all pixels in the camera 
     35  MRawEvtData                *fRawEvt;        //! raw event data (time slices)
     36  MRawRunHeader              *fRunHeader;     //! RunHeader information
     37  MGeomCam                   *fGeom;          //! Geometry information
     38  MBadPixelsCam              *fBadPixels;     //! Bad Pixels information
    3739 
    38   MTime                      *fEvtTime;                   //! Time of the event
     40  MTime                      *fEvtTime;       //! Time of the event
    3941
    40   MExtractedSignalCam        *fSignals;                   // Extracted signal of all pixels in the camera
    41   MCalibrationChargePINDiode *fPINDiode;                  // Calibration results of the PIN Diode
    42   MCalibrationChargeBlindPix *fBlindPixel;                // Calibration results of the Blind Pixel
     42  MExtractedSignalCam        *fSignals;       // Extracted signal of all pixels in the camera
     43  MCalibrationChargePINDiode *fPINDiode;      // Calibration results of the PIN Diode
     44  MCalibrationChargeBlindPix *fBlindPixel;    // Calibration results of the Blind Pixel
    4345
    4446  Float_t  fNumHiGainSamples;
     
    4850 
    4951  Float_t fConversionHiLo;
    50   Int_t   fFlags;                                // Flag for the fits used
     52  Int_t   fFlags;                              // Flag for the fits used
    5153
    5254  enum  { kUseQualityChecks,
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3551 r3554  
    217217  fTotalFFactorCombinedMethod       =  -1.;
    218218
    219 }
    220 
    221 
    222 void MCalibrationChargePix::DefinePixId(Int_t i)
    223 {
    224   fPixId = i;
    225219}
    226220
  • trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h

    r3321 r3554  
    4848  Bool_t IsQEValid()          const;
    4949
    50   void   SetPixId(const Int_t i)     { fPixId = i; }
     50  void SetPixId(const Int_t i)     { fPixId = i; }
    5151
    5252  // Miscellaneous
Note: See TracChangeset for help on using the changeset viewer.