Changeset 3698 for trunk/MagicSoft


Ignore:
Timestamp:
04/09/04 17:34:12 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3697 r3698  
    3131       MHCalibrationChargeCalc needs no pointer to the signal extractors
    3232       any more -> removed
     33
     34   * mcalib/MCalibrationChargePINDiode.[h,cc]   
     35   * mcalib/MCalibrationChargeBlindPix.[h,cc]   
     36   * mcalib/MCalibrationCam.[h,cc]     
     37     - put a default pulser color kNONE
    3338
    3439
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc

    r3697 r3698  
    7575//
    7676// Initializes:
    77 // - fPulserColor to kCT1
     77// - fPulserColor to kNONE
    7878// - fNumHiGainFADCSlices to 0.
    7979// - fNumLoGainFADCSlices to 0.
     
    8888//
    8989MCalibrationCam::MCalibrationCam(const char *name, const char *title)
    90     : fNumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(kCT1),
     90    : fNumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(kNONE),
    9191      fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL)
    9292{
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h

    r3697 r3698  
    2020public:
    2121
    22   enum PulserColor_t { kCT1=0, kGREEN=1, kBLUE=2, kUV=3 }; // Possible Pulser colours
     22  enum PulserColor_t { kCT1=0, kGREEN=1, kBLUE=2, kUV=3, kNONE=4 }; // Possible Pulser colours
    2323  static const Int_t gkNumPulserColors;                     // Number of Pulser colours (now set to: 4)
    2424 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc

    r3678 r3698  
    9898// - all flags to kFALSE
    9999// - all variables to -1.
     100// - the fColor to MCalibrationCam::kNONE
    100101//
    101102// Calls:
     
    126127  SetFluxInsidePlexiglassAvailable ( kFALSE );
    127128 
     129  SetColor(MCalibrationCam::kNONE);
     130
    128131  MCalibrationChargePix::Clear();
    129132}
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3697 r3698  
    114114//       - Tracing the atmospheric conditions   -> LIDAR
    115115//       - Tracing the observation zenith angle -> Drive System
    116 //   4) Some knowlegde about the impact parameter:
     116//
     117//    4) Some knowlegde about the impact parameter:
    117118//       - This is the only part which cannot be accomplished well with a
    118119//         single telescope. We would thus need to convolute the spectrum
     
    281282}
    282283
     284// --------------------------------------------------------------------------
     285//
     286// Sets:
     287// - all variables to 0.,
     288// - all flags to kFALSE
     289//
    283290void MCalibrationChargeCalc::Clear(const Option_t *o)
    284291{
     
    305312// cannot be found, the corresponding calibration part is only skipped.
    306313//
     314//  - MTime
     315//
     316Int_t MCalibrationChargeCalc::PreProcess(MParList *pList)
     317{
     318 
     319  //
     320  // Containers that have to be there.
     321  //
     322  fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
     323  if (!fPedestals)
     324    {
     325      *fLog << err << "MPedestalCam not found... aborting" << endl;
     326      return kFALSE;
     327    }
     328 
     329  //
     330  // Containers that are created in case that they are not there.
     331  //
     332  fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam");
     333  if (!fQECam)
     334    {
     335      *fLog << err << "Cannot find nor create MCalibrationQECam... aborting" << endl;
     336      return kFALSE;
     337    }
     338
     339  fBadPixels = (MBadPixelsCam*)pList->FindCreateObj("MBadPixelsCam");
     340  if (!fBadPixels)
     341    {
     342      *fLog << err << "Could not find or create MBadPixelsCam ... aborting." << endl;
     343      return kFALSE;
     344    }
     345
     346 
     347  fEvtTime = (MTime*)pList->FindObject("MTime");
     348 
     349  return kTRUE;
     350}
     351
     352
     353// --------------------------------------------------------------------------
     354//
     355// Search for the following input containers and abort if not existing:
     356//  - MGeomCam
     357//  - MCalibrationChargeCam
     358//
     359// Search for the following input containers and give a warning if not existing:
    307360//  - MCalibrationChargeBlindPix
    308361//  - MCalibrationChargePINDiode
    309 //  - MTime
    310362//
    311363// Sets the pulser colour in:
    312364//
    313365// - MCalibrationChargeCam
    314 // - MCalibrationChargeBlindPix
    315 // - MCalibrationChargePINDiode
    316 //
    317 Int_t MCalibrationChargeCalc::PreProcess(MParList *pList)
    318 {
    319  
    320   //
    321   // Containers that have to be there.
    322   //
    323   fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam");
    324   if (!fPedestals)
    325     {
    326       *fLog << err << "MPedestalCam not found... aborting" << endl;
    327       return kFALSE;
    328     }
    329  
    330   //
    331   // Containers that are created in case that they are not there.
    332   //
    333   fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam");
    334   if (!fQECam)
    335     {
    336       *fLog << err << "Cannot find nor create MCalibrationQECam... aborting" << endl;
    337       return kFALSE;
    338     }
    339 
    340   fBadPixels = (MBadPixelsCam*)pList->FindCreateObj("MBadPixelsCam");
    341   if (!fBadPixels)
    342     {
    343       *fLog << err << "Could not find or create MBadPixelsCam ... aborting." << endl;
    344       return kFALSE;
    345     }
    346 
    347  
    348   fEvtTime = (MTime*)pList->FindObject("MTime");
    349  
    350   //
    351   // Initialize the pulser colours
    352   //
    353   fCam->SetPulserColor( fPulserColor );
    354 
    355   if (fBlindPixel)
    356     fBlindPixel->SetColor( fPulserColor );
    357  
    358   if (fPINDiode)
    359     fPINDiode->SetColor( fPulserColor );
    360  
    361   return kTRUE;
    362 }
    363 
    364 
    365 // --------------------------------------------------------------------------
    366 //
    367 // The ReInit searches for the following input containers:
    368 //  - MGeomCam
    369 //  - MCalibrationChargeCam
     366// - MCalibrationChargeBlindPix (if existing)
     367// - MCalibrationChargePINDiode (if existing)
    370368//
    371369// It retrieves the following variables from MCalibrationChargeCam:
     
    409407  fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindObject("MCalibrationChargeBlindPix");
    410408  if (!fBlindPixel)
    411     {
    412       *fLog << warn << GetDescriptor()
    413             << ": MCalibrationChargeBlindPix not found... no blind pixel method! " << endl;
    414       return kFALSE;
    415     }
    416  
    417   fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode");
     409    *fLog << warn << GetDescriptor()
     410          << ": MCalibrationChargeBlindPix not found... no blind pixel method! " << endl;
     411 
     412  fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode");
    418413  if (!fPINDiode)
    419     {
    420       *fLog << warn << GetDescriptor()
    421             << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
    422       return kFALSE;
    423     }
     414    *fLog << warn << GetDescriptor()
     415          << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
     416
     417  //
     418  // Initialize the pulser colours
     419  //
     420  if (fPulserColor != fCam->GetPulserColor())
     421    {
     422      *fLog << err << GetDescriptor() << ": Pulser colour has changed w.r.t. last file."
     423            << "This feature is not yet implemented, sorry ... aborting " << endl;
     424      return kFALSE;
     425    }
     426
     427  fCam->SetPulserColor( fPulserColor );
     428
     429  if (fBlindPixel)
     430    fBlindPixel->SetColor( fPulserColor );
     431 
     432  if (fPINDiode)
     433    fPINDiode->SetColor( fPulserColor );
     434 
    424435
    425436  fNumHiGainSamples  =  fCam->GetNumHiGainFADCSlices();
     
    448459     
    449460    }
    450 
    451   if (fPulserColor != fCam->GetPulserColor())
    452     {
    453       *fLog << err << GetDescriptor() << ": Pulser colour has changed w.r.t. last file."
    454             << "This feature is not yet implemented, sorry ... aborting " << endl;
    455       return kFALSE;
    456     }
    457  
    458461
    459462  return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc

    r3678 r3698  
    114114  SetChargeFitValid     ( kFALSE );
    115115  SetTimeFitValid       ( kFALSE );
     116  SetColor              ( MCalibrationCam::kNONE);
    116117   
    117118  fAbsTimeMean              =  -1.;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h

    r3678 r3698  
    6262  ~MCalibrationChargePINDiode() {}
    6363 
    64   void Clear(Option_t *o="");
     64  void   Clear(Option_t *o="");
     65  Bool_t CalcFluxOutsidePlexiglass();
     66
     67  // Getters
     68  Float_t GetAbsTimeMean                  () const { return fAbsTimeMean;           }
     69  Float_t GetAbsTimeRms                   () const { return fAbsTimeRms;            }
     70  MCalibrationCam::PulserColor_t GetColor () const { return fColor;                 }
     71  Float_t GetFluxOutsidePlexiglass        () const { return fFluxOutsidePlexiglass; }
     72  Float_t GetFluxOutsidePlexiglassErr     () const;
     73  Float_t GetFluxOutsidePlexiglassRelVar  () const; 
     74  Float_t GetNumPhotons                   () const { return fNumPhotons;            }
     75  Float_t GetNumPhotonsErr                () const;
     76  Float_t GetNumPhotonsRelVar             () const;
     77  Float_t GetPed                          () const { return fPed;                   }
     78  Float_t GetPedRms                       () const { return fPedRms;                }
     79
     80  Bool_t  IsChargeFitValid                () const;
     81  Bool_t  IsTimeFitValid                  () const;
     82  Bool_t  IsOscillating                   () const;
     83  Bool_t  IsFluxOutsidePlexiglassAvailable() const;
    6584 
    6685  // Setters
    67   void SetAbsTimeMean        ( const Float_t f )                      { fAbsTimeMean        = f;   }
    68   void SetAbsTimeRms         ( const Float_t f )                      { fAbsTimeRms         = f;   }
     86  void SetAbsTimeMean        ( const Float_t f      )                 { fAbsTimeMean        = f;   }
     87  void SetAbsTimeRms         ( const Float_t f      )                 { fAbsTimeRms         = f;   }
    6988  void SetChargeToPhotons    ( const Float_t f=fgChargeToPhotons    ) { fChargeToPhotons    = f;   } 
    7089  void SetChargeToPhotonsErr ( const Float_t f=fgChargeToPhotonsErr ) { fChargeToPhotonsVar = f*f; } 
    7190  void SetColor              ( const MCalibrationCam::PulserColor_t color) { fColor = color;   }
    7291  void SetPedestal           (       Float_t ped, Float_t pedrms    );
    73   void SetRmsChargeMean      ( const Float_t f )                      { fRmsChargeMean      = f;   }
    74   void SetRmsChargeMeanErr   ( const Float_t f )                      { fRmsChargeMeanErr   = f;   }
    75   void SetRmsChargeSigma     ( const Float_t f )                      { fRmsChargeSigma     = f;   }
    76   void SetRmsChargeSigmaErr  ( const Float_t f )                      { fRmsChargeSigmaErr  = f;   }
     92  void SetRmsChargeMean      ( const Float_t f      )                 { fRmsChargeMean      = f;   }
     93  void SetRmsChargeMeanErr   ( const Float_t f      )                 { fRmsChargeMeanErr   = f;   }
     94  void SetRmsChargeSigma     ( const Float_t f      )                 { fRmsChargeSigma     = f;   }
     95  void SetRmsChargeSigmaErr  ( const Float_t f      )                 { fRmsChargeSigmaErr  = f;   }
    7796  void SetOscillating        ( const Bool_t b=kTRUE );
    7897  void SetChargeFitValid     ( const Bool_t b=kTRUE );
    7998  void SetTimeFitValid       ( const Bool_t b=kTRUE );
    8099  void SetFluxOutsidePlexiglassAvailable ( const Bool_t b = kTRUE );
    81 
    82   // Getters
    83   Float_t GetFluxOutsidePlexiglass      () const { return fFluxOutsidePlexiglass; }
    84   Float_t GetFluxOutsidePlexiglassErr   () const;
    85   Float_t GetFluxOutsidePlexiglassRelVar() const; 
    86 
    87   // Pedestals
    88   Float_t GetAbsTimeMean  ()     const { return fAbsTimeMean; }
    89   Float_t GetAbsTimeRms   ()     const { return fAbsTimeRms;  }
    90   Float_t GetNumPhotons   ()     const { return fNumPhotons;  }
    91   Float_t GetNumPhotonsErr()     const;
    92   Float_t GetNumPhotonsRelVar()  const;
    93   Float_t GetPed()               const { return fPed;         }
    94   Float_t GetPedRms()            const { return fPedRms;      }
    95 
    96   Bool_t  IsChargeFitValid()     const;
    97   Bool_t  IsTimeFitValid()       const;
    98   Bool_t  IsOscillating()        const;
    99   Bool_t  IsFluxOutsidePlexiglassAvailable() const;
    100  
    101   Bool_t  CalcFluxOutsidePlexiglass();
    102100
    103101  ClassDef(MCalibrationChargePINDiode, 1)       // Container Charge Calibration Results PIN Diode
Note: See TracChangeset for help on using the changeset viewer.