Changeset 3731


Ignore:
Timestamp:
04/14/04 14:53:17 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3730 r3731  
    2323   * htmldoc/images/RelTimeClasses.gif
    2424     - two schemes used in the class descriptions
     25
     26   * mcalib/MHCalibrationCam.[h,cc]
     27     - included function GetAverageAreas() and GetAverageSectors() like
     28       in MCalibrationCam
     29
     30   * mjobs/MJCalibration.[h,cc]
     31     - included calibration of rel.Times, to be chosen with a flag
     32       RelTimeCalibration()
    2533
    2634
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc

    r3723 r3731  
    172172// --------------------------------------------------------------------------
    173173//
     174// Returns the current size of the TObjArray fAverageHiGainAreas
     175// independently if the MHGausEvents is filled with values or not.
     176//
     177const Int_t MHCalibrationCam::GetAverageAreas() const
     178{
     179  return fAverageHiGainAreas->GetEntries();
     180}
     181
     182// --------------------------------------------------------------------------
     183//
    174184// Get i-th High Gain pixel Area (area number)
    175185//
     
    204214{
    205215  return *static_cast<MHGausEvents*>(fAverageLoGainAreas->UncheckedAt(i));
     216}
     217
     218// --------------------------------------------------------------------------
     219//
     220// Returns the current size of the TObjArray fAverageHiGainSectors
     221// independently if the MHGausEvents is filled with values or not.
     222//
     223const Int_t MHCalibrationCam::GetAverageSectors() const
     224{
     225  return fAverageHiGainSectors->GetEntries();
    206226}
    207227
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h

    r3670 r3731  
    4444protected:
    4545
    46   Int_t   fAverageNbins;                // Number of bins for the average histograms
    47   Int_t   fPulserFrequency;             // Light pulser frequency
     46  TArrayI    fAverageAreaNum;           // Number of pixels in average pixels per area
     47  TArrayF    fAverageAreaRelSigma;      // Re-normalized relative sigmas in average pixels per area
     48  TArrayF    fAverageAreaRelSigmaVar;   // Variance Re-normalized relative sigmas in average pixels per area
     49  TArrayI    fAverageAreaSat;           // Number of saturated slices in average pixels per area
     50  TArrayF    fAverageAreaSigma;         // Re-normalized sigmas in average pixels per area
     51  TArrayF    fAverageAreaSigmaVar;      // Variance Re-normalized sigmas in average pixels per area
     52  Int_t      fAverageNbins;             // Number of bins for the average histograms
     53  TObjArray *fAverageHiGainAreas;       //-> Array of calibration pixels, one per pixel area
     54  TObjArray *fAverageHiGainSectors;     //-> Array of calibration pixels, one per camera sector
     55  TObjArray *fAverageLoGainAreas;       //-> Array of calibration pixels, one per pixel area
     56  TObjArray *fAverageLoGainSectors;     //-> Array of calibration pixels, one per camera sector
     57  TArrayI    fAverageSectorNum;         // Number of pixels in average pixels per sector
    4858 
     59  MBadPixelsCam    *fBadPixels;         //!  Bad Pixels storage container
     60  MCalibrationCam  *fCam;               //!  Calibration Cam with the results
     61  MGeomCam         *fGeom;              //!  Camera geometry
     62
    4963  TObjArray *fHiGainArray;              //-> Array of calibration pixels, one per pixel
    5064  TObjArray *fLoGainArray;              //-> Array of calibration pixels, one per pixel
    51   TObjArray *fAverageHiGainAreas;       //-> Array of calibration pixels, one per pixel area
    52   TObjArray *fAverageLoGainAreas;       //-> Array of calibration pixels, one per pixel area
    53   TObjArray *fAverageHiGainSectors;     //-> Array of calibration pixels, one per camera sector
    54   TObjArray *fAverageLoGainSectors;     //-> Array of calibration pixels, one per camera sector
    5565
    56   MGeomCam         *fGeom;              //!  Camera geometry
    57   MBadPixelsCam    *fBadPixels;         //!  Bad Pixels storage container
    58   MCalibrationCam  *fCam;               //!  Calibration Cam with the results
    59 
    60   TArrayI fAverageAreaNum;              // Number of pixels in average pixels per area
    61   TArrayI fAverageAreaSat;              // Number of saturated slices in average pixels per area
    62   TArrayF fAverageAreaSigma;            // Re-normalized sigmas in average pixels per area
    63   TArrayF fAverageAreaSigmaVar;         // Variance Re-normalized sigmas in average pixels per area
    64   TArrayF fAverageAreaRelSigma;         // Re-normalized relative sigmas in average pixels per area
    65   TArrayF fAverageAreaRelSigmaVar;      // Variance Re-normalized relative sigmas in average pixels per area
    66   TArrayI fAverageSectorNum;            // Number of pixels in average pixels per sector
     66  Int_t      fPulserFrequency;          // Light pulser frequency
    6767
    6868  virtual Bool_t SetupHists(const MParList *pList);
     
    7272  virtual void   FinalizeBadPixels();
    7373 
    74   void InitHists(MHGausEvents &hist, MBadPixelsPix &bad, const Int_t i);
    75 
     74  void CalcAverageSigma();
     75 
     76  void DrawAverageSigma(Bool_t sat, Bool_t inner,
     77                        Float_t sigma, Float_t sigmaerr,
     78                        Float_t relsigma, Float_t relsigmaerr) const;
     79 
    7680  void FitHiGainArrays(MCalibrationCam &calcam, MBadPixelsCam &badcam,
    77                        MBadPixelsPix::UncalibratedType_t fittyp,
    78                        MBadPixelsPix::UncalibratedType_t osctyp);
    79  
    80   void FitLoGainArrays(MCalibrationCam &calcam, MBadPixelsCam &badcam,
    8181                       MBadPixelsPix::UncalibratedType_t fittyp,
    8282                       MBadPixelsPix::UncalibratedType_t osctyp);
     
    8888                      MBadPixelsPix::UncalibratedType_t osctyp);
    8989 
     90  void FitLoGainArrays(MCalibrationCam &calcam, MBadPixelsCam &badcam,
     91                       MBadPixelsPix::UncalibratedType_t fittyp,
     92                       MBadPixelsPix::UncalibratedType_t osctyp);
     93 
    9094  void FitLoGainHists(MHGausEvents &hist,
    9195                      MCalibrationPix &pix,
     
    9498                      MBadPixelsPix::UncalibratedType_t osctyp);
    9599
    96   void CalcAverageSigma();
    97  
    98   void DrawAverageSigma(Bool_t sat, Bool_t inner,
    99                         Float_t sigma, Float_t sigmaerr,
    100                         Float_t relsigma, Float_t relsigmaerr) const;
    101  
     100  void InitHists(MHGausEvents &hist, MBadPixelsPix &bad, const Int_t i);
     101
    102102public:
    103103
    104104  MHCalibrationCam(const char *name=NULL, const char *title=NULL);
    105105  ~MHCalibrationCam();
    106 
    107   void SetAverageNbins(   const Int_t bins=fgAverageNbins ) { fAverageNbins = bins; }
    108   void SetPulserFrequency(const Int_t f=fgPulserFrequency) { fPulserFrequency = f; }
    109  
    110   MHGausEvents  &operator[](UInt_t i);
    111   const MHGausEvents  &operator[](UInt_t i) const;
    112  
    113   MHGausEvents  &operator()(UInt_t i);
    114   const MHGausEvents  &operator()(UInt_t i)  const;
    115  
    116   MHGausEvents  &GetAverageHiGainArea(UInt_t i);
    117   const MHGausEvents   &GetAverageHiGainArea(UInt_t i)  const;
    118 
    119   MHGausEvents  &GetAverageLoGainArea(UInt_t i);
    120   const MHGausEvents   &GetAverageLoGainArea(UInt_t i)  const;
    121 
    122   MHGausEvents  &GetAverageHiGainSector(UInt_t i);
    123   const MHGausEvents   &GetAverageHiGainSector(UInt_t i)  const;
    124 
    125   MHGausEvents  &GetAverageLoGainSector(UInt_t i);
    126   const MHGausEvents   &GetAverageLoGainSector(UInt_t i)  const;
    127106
    128107  virtual Bool_t SetupFill(const MParList *pList);
     
    133112  // Clone
    134113  TObject *Clone(const char *) const;
    135  
     114
    136115  // Draw
    137   virtual void Draw(const Option_t *opt);
     116  virtual void   Draw(const Option_t *opt);
    138117
    139118  virtual Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    140119  virtual void   DrawPixelContent( Int_t num )  const;   
    141120
     121  const Int_t          GetAverageAreas       ()          const; 
     122        MHGausEvents  &GetAverageHiGainArea  (UInt_t i);
     123  const MHGausEvents  &GetAverageHiGainArea  (UInt_t i)  const;
     124        MHGausEvents  &GetAverageLoGainArea  (UInt_t i);
     125  const MHGausEvents  &GetAverageLoGainArea  (UInt_t i)  const;
     126        MHGausEvents  &GetAverageHiGainSector(UInt_t i);
     127  const MHGausEvents  &GetAverageHiGainSector(UInt_t i)  const;
     128        MHGausEvents  &GetAverageLoGainSector(UInt_t i);
     129  const MHGausEvents  &GetAverageLoGainSector(UInt_t i)  const;
     130  const Int_t          GetAverageSectors     ()          const;
     131
     132        MHGausEvents  &operator[]            (UInt_t i);
     133  const MHGausEvents  &operator[]            (UInt_t i)  const;
     134        MHGausEvents  &operator()            (UInt_t i);
     135  const MHGausEvents  &operator()            (UInt_t i)  const;
     136 
     137  void SetAverageNbins(   const Int_t bins=fgAverageNbins ) { fAverageNbins = bins; }
     138  void SetPulserFrequency(const Int_t f=fgPulserFrequency)  { fPulserFrequency = f; }
     139 
    142140  ClassDef(MHCalibrationCam, 1) // Base Histogram class for Calibration Camera
    143141};
Note: See TracChangeset for help on using the changeset viewer.