Changeset 5851


Ignore:
Timestamp:
01/15/05 12:29:35 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5848 r5851  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     23 2005/01/16 Markus Gaug
     24
     25  * mhcalib/MHCalibrationCam.[h,cc]
     26    - finished event type recognition and rejection. Only used if
     27      SetInterlaced() is set.
    2228
    2329 2005/01/14 Hendrik Bartko
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r5802 r5851  
    8181
    8282#include "MRawRunHeader.h"
    83 #include "MRawEvtHeader.h"
     83#include "MTriggerPattern.h"
    8484
    8585ClassImp(MHCalibrationCam);
     
    121121       fColor(MCalibrationCam::kNONE), fIntensBad(NULL),
    122122       fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL),
    123        fRunHeader(NULL), fEvtHeader(NULL)
     123       fRunHeader(NULL), fTrigPattern(NULL), fInterlacedFlags(0),
     124       fMaskInterlaced(0)
    124125{
    125126
     
    514515  }
    515516
    516   fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
    517   if (!fEvtHeader)
    518   {
    519     if (IsInterlaced())
    520       {
    521         *fLog << err << GetDescriptor()
    522               << ": MRawEvtHeader not found... Cannot run interlaced calibration events." << endl;
    523         return kFALSE;
    524       }
    525   }
    526 
     517  if (IsInterlaced())
     518    {
     519      fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern");
     520      if (!fTrigPattern)
     521        {
     522          *fLog << err << "MTriggerPattern not found... abort." << endl;
     523          return kFALSE;
     524        }
     525      if (IsInterlacedTypePed())
     526        fMaskInterlaced |= MTriggerPattern::kPedestal;
     527      if (IsInterlacedTypeCal())
     528        fMaskInterlaced |= MTriggerPattern::kCalibration;
     529      if (IsInterlacedTypePin())
     530        fMaskInterlaced |= MTriggerPattern::kPinDiode;
     531    }
     532 
    527533  return SetupHists(pList);
    528534}
     
    858864
    859865  if (IsInterlaced())
    860     if (!(fEvtHeader->GetTriggerID() & BIT(1)))
     866    // check whether one of the bits in fMaskInterlaced is set in the trigger pattern
     867    if (!(fTrigPattern->GetPrescaled() & fMaskInterlaced))
    861868      return kTRUE;
    862869
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h

    r5802 r5851  
    2929class MGeomCam;
    3030class MRawRunHeader;
    31 class MRawEvtHeader;
     31class MTriggerPattern;
    3232class MCalibrationIntensityCam;
    3333class MCalibrationCam;
     
    5252protected:
    5353
    54   Int_t   fNbins;                        // Number of bins       
    55   Axis_t  fFirst;                        // Lower histogram limit
    56   Axis_t  fLast;                         // Upper histogram limit
    57 
    58   Float_t fProbLimit;                    // Limit for acceptance of probability of Gauss-Fit
    59  
    60   TString fHistName;                     //! Histogram names
    61   TString fHistTitle;                    //! Histogram titles
    62   TString fHistXTitle;                   //! Histogram x-axis titles
    63   TString fHistYTitle;                   //! Histogram y-axis titles
    64  
    65   Float_t fNumHiGainSaturationLimit;     // Rel. amount sat. higain FADC slices until pixel is called saturated
    66   Float_t fNumLoGainSaturationLimit;     // Rel. amount sat. logain FADC slices until pixel is called saturated
    67 
    68   MArrayI fRunNumbers;                   // Numbers of runs used
    69 
    70   MArrayF fAverageAreaRelSigma;          // Re-normalized relative sigmas in average pixels per area
    71   MArrayF fAverageAreaRelSigmaVar;       // Variance Re-normalized relative sigmas in average pixels per area
    72   MArrayI fAverageAreaSat;               // Number of saturated slices in average pixels per area
    73   MArrayF fAverageAreaSigma;             // Re-normalized sigmas in average pixels per area
    74   MArrayF fAverageAreaSigmaVar;          // Variance Re-normalized sigmas in average pixels per area
    75   MArrayI fAverageAreaNum;               // Number of pixels in average pixels per area
    76   MArrayI fAverageSectorNum;             // Number of pixels in average pixels per sector
    77 
    78   TOrdCollection *fAverageHiGainAreas;   // Array of calibration pixels, one per pixel area
    79   TOrdCollection *fAverageHiGainSectors; // Array of calibration pixels, one per camera sector
    80   TOrdCollection *fAverageLoGainAreas;   // Array of calibration pixels, one per pixel area
    81   TOrdCollection *fAverageLoGainSectors; // Array of calibration pixels, one per camera sector
    82 
    83   MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs
    84 
    85   MBadPixelsIntensityCam *fIntensBad;    //! Bad Pixels intensity calibration storage container 
    86   MBadPixelsCam    *fBadPixels;          //! Bad Pixels storage container
    87   MCalibrationIntensityCam *fIntensCam;  //! Intensity Calibration Cam with the results
    88   MCalibrationCam  *fCam;                //! Calibration Cam with the results
    89   MGeomCam         *fGeom;               //! Camera geometry
    90   MRawRunHeader    *fRunHeader;          //! Run Header
    91   MRawEvtHeader    *fEvtHeader;          //! Evt Header
    92  
    93   TOrdCollection *fHiGainArray;          // Array of calibration pixels, one per pixel
    94   TOrdCollection *fLoGainArray;          // Array of calibration pixels, one per pixel
    95 
    96   Int_t      fPulserFrequency;           // Light pulser frequency
     54  Int_t   fNbins;                         // Number of bins       
     55  Axis_t  fFirst;                         // Lower histogram limit
     56  Axis_t  fLast;                          // Upper histogram limit
     57 
     58  Float_t fProbLimit;                     // Limit for acceptance of probability of Gauss-Fit
     59 
     60  TString fHistName;                      //! Histogram names
     61  TString fHistTitle;                     //! Histogram titles
     62  TString fHistXTitle;                    //! Histogram x-axis titles
     63  TString fHistYTitle;                    //! Histogram y-axis titles
     64 
     65  Float_t fNumHiGainSaturationLimit;      // Rel. amount sat. higain FADC slices until pixel is called saturated
     66  Float_t fNumLoGainSaturationLimit;      // Rel. amount sat. logain FADC slices until pixel is called saturated
     67
     68  MArrayI fRunNumbers;                    // Numbers of runs used
     69
     70  MArrayF fAverageAreaRelSigma;           // Re-normalized relative sigmas in average pixels per area
     71  MArrayF fAverageAreaRelSigmaVar;        // Variance Re-normalized relative sigmas in average pixels per area
     72  MArrayI fAverageAreaSat;                // Number of saturated slices in average pixels per area
     73  MArrayF fAverageAreaSigma;              // Re-normalized sigmas in average pixels per area
     74  MArrayF fAverageAreaSigmaVar;           // Variance Re-normalized sigmas in average pixels per area
     75  MArrayI fAverageAreaNum;                // Number of pixels in average pixels per area
     76  MArrayI fAverageSectorNum;              // Number of pixels in average pixels per sector
     77
     78  TOrdCollection *fAverageHiGainAreas;    // Array of calibration pixels, one per pixel area
     79  TOrdCollection *fAverageHiGainSectors;  // Array of calibration pixels, one per camera sector
     80  TOrdCollection *fAverageLoGainAreas;    // Array of calibration pixels, one per pixel area
     81  TOrdCollection *fAverageLoGainSectors;  // Array of calibration pixels, one per camera sector
     82
     83  MCalibrationCam::PulserColor_t fColor;  // Colour of the pulsed LEDs
     84
     85  MBadPixelsIntensityCam *fIntensBad;     //! Bad Pixels intensity calibration storage container 
     86  MBadPixelsCam    *fBadPixels;           //! Bad Pixels storage container
     87  MCalibrationIntensityCam *fIntensCam;   //! Intensity Calibration Cam with the results
     88  MCalibrationCam  *fCam;                 //! Calibration Cam with the results
     89  MGeomCam         *fGeom;                //! Camera geometry
     90  MRawRunHeader    *fRunHeader;           //! Run Header
     91  MTriggerPattern  *fTrigPattern;         //! Trigger Pattern
     92 
     93  TOrdCollection *fHiGainArray;           // Array of calibration pixels, one per pixel
     94  TOrdCollection *fLoGainArray;           // Array of calibration pixels, one per pixel
     95
     96  Int_t  fPulserFrequency;                // Light pulser frequency
    9797
    9898  enum { kDebug, kLoGain, kAverageing,
    9999         kOscillations, kSizeCheck,
    100          kInterlaced };                  // Possible flags
    101  
    102   Byte_t     fFlags;                     // Bit-field to hold the flags
     100         kInterlaced  };                  // Possible global flags
     101   
     102  Byte_t  fFlags;                         // Bit-field to hold the global flags
     103 
     104  enum InterlacedMode_t
     105    {
     106      kInterlacedPed = BIT(0),
     107      kInterlacedCal = BIT(1),
     108      kInterlacedPin = BIT(2)
     109    };                                    // Possible interlaced event types to be treated
     110
     111  Byte_t  fInterlacedFlags;               // Bit-field to hold the interlaced flags
     112  Byte_t  fMaskInterlaced;                // Mask to define the interlaced event types
    103113 
    104114  virtual Bool_t SetupHists ( const MParList *pList ) { return kTRUE; }
     
    148158  Bool_t IsSizeCheck   () const  { return TESTBIT(fFlags,kSizeCheck);    }
    149159  Bool_t IsInterlaced  () const  { return TESTBIT(fFlags,kInterlaced);   }
    150  
    151   void   Remove(TOrdCollection *col);
    152  
    153   Int_t ReadEnv        ( const TEnv &env, TString prefix, Bool_t print);
     160
     161  Bool_t IsInterlacedTypePed() const { return TESTBIT(fInterlacedFlags,kInterlacedPed); }
     162  Bool_t IsInterlacedTypeCal() const { return TESTBIT(fInterlacedFlags,kInterlacedCal); }
     163  Bool_t IsInterlacedTypePin() const { return TESTBIT(fInterlacedFlags,kInterlacedPin); }
     164 
     165  void   Remove  ( TOrdCollection *col );
     166 
     167  Int_t  ReadEnv ( const TEnv &env, TString prefix, Bool_t print );
    154168
    155169public:
     
    164178
    165179  virtual void ResetHists();
    166  
     180
    167181  // Draw
    168182  void   Draw(const Option_t *opt);
     
    211225                                                                ? SETBIT(fFlags,kInterlaced)
    212226                                                                : CLRBIT(fFlags,kInterlaced); }
     227
     228  void SetInterlacedTypePed() { SETBIT(fInterlacedFlags,kInterlacedPed); }
     229  void SetInterlacedTypeCal() { SETBIT(fInterlacedFlags,kInterlacedCal); }
     230  void SetInterlacedTypePin() { SETBIT(fInterlacedFlags,kInterlacedPin); }
     231
    213232  void SetHistName  ( const char *name )  { fHistName  = name;  }
    214233  void SetHistTitle ( const char *name )  { fHistTitle = name;  }
     
    226245  void SetPulserFrequency         ( const Int_t f=fgPulserFrequency) { fPulserFrequency = f;     }
    227246 
    228   ClassDef(MHCalibrationCam, 2) // Base Histogram class for Calibration Camera
     247  ClassDef(MHCalibrationCam, 3) // Base Histogram class for Calibration Camera
    229248};
    230249
Note: See TracChangeset for help on using the changeset viewer.