| 1 | #ifndef MARS_MCalibrationCam
|
|---|
| 2 | #define MARS_MCalibrationCam
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MParContainer
|
|---|
| 5 | #include "MParContainer.h"
|
|---|
| 6 | #endif
|
|---|
| 7 | #ifndef MARS_MCamEvent
|
|---|
| 8 | #include "MCamEvent.h"
|
|---|
| 9 | #endif
|
|---|
| 10 | #ifndef ROOT_TArrayI
|
|---|
| 11 | #include <TArrayI.h>
|
|---|
| 12 | #endif
|
|---|
| 13 | #ifndef ROOT_TArrayF
|
|---|
| 14 | #include <TArrayF.h>
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | class TOrdCollection;
|
|---|
| 18 |
|
|---|
| 19 | class MCalibrationPix;
|
|---|
| 20 | class MBadPixelsPix;
|
|---|
| 21 | class MBadPixelsCam;
|
|---|
| 22 | class MGeomCam;
|
|---|
| 23 | class MCalibrationCam : public MParContainer, public MCamEvent
|
|---|
| 24 | {
|
|---|
| 25 | public:
|
|---|
| 26 |
|
|---|
| 27 | enum PulserColor_t {
|
|---|
| 28 | kCT1 =0,
|
|---|
| 29 | kGREEN=1,
|
|---|
| 30 | kBLUE =2,
|
|---|
| 31 | kUV =3,
|
|---|
| 32 | kNONE =4
|
|---|
| 33 | }; //! Possible Pulser colours
|
|---|
| 34 | static const Int_t gkNumPulserColors; //! Number of Pulser colours (now set to: 4)
|
|---|
| 35 |
|
|---|
| 36 | protected:
|
|---|
| 37 |
|
|---|
| 38 | TArrayI fNumUnsuitable; // Number uncalibrated Pixels per area index
|
|---|
| 39 | TArrayI fNumUnreliable; // Number unreliable Pixels per area index
|
|---|
| 40 |
|
|---|
| 41 | TArrayF fNumHiGainFADCSlices; // Number High-Gain FADC slices used by extractor
|
|---|
| 42 | TArrayF fNumLoGainFADCSlices; // Number Low -Gain FADC slices used by extractor
|
|---|
| 43 |
|
|---|
| 44 | PulserColor_t fPulserColor; // Colour of the pulsed LEDs
|
|---|
| 45 |
|
|---|
| 46 | TOrdCollection *fPixels; //-> Array of MCalibrationPix, one per pixel
|
|---|
| 47 | TOrdCollection *fAverageAreas; // Array of MCalibrationPix, one per pixel area
|
|---|
| 48 | TOrdCollection *fAverageSectors; // Array of MCalibrationPix, one per camera sector
|
|---|
| 49 | TOrdCollection *fAverageBadAreas; // Array of MBadPixelsPix, one per pixel area
|
|---|
| 50 | TOrdCollection *fAverageBadSectors; // Array of MBadPixelsPix, one per camera sector
|
|---|
| 51 |
|
|---|
| 52 | virtual void Add(const UInt_t a, const UInt_t b);
|
|---|
| 53 | virtual void AddArea(const UInt_t a, const UInt_t b);
|
|---|
| 54 | virtual void AddSector(const UInt_t a, const UInt_t b);
|
|---|
| 55 |
|
|---|
| 56 | void InitAverageSectors ( const UInt_t i );
|
|---|
| 57 | virtual void InitAverageAreas ( const UInt_t i );
|
|---|
| 58 |
|
|---|
| 59 | public:
|
|---|
| 60 |
|
|---|
| 61 | MCalibrationCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 62 | ~MCalibrationCam();
|
|---|
| 63 |
|
|---|
| 64 | void Clear ( Option_t *o="");
|
|---|
| 65 | void Copy(TObject& object) const;
|
|---|
| 66 |
|
|---|
| 67 | void DrawPixelContent( Int_t num) const;
|
|---|
| 68 |
|
|---|
| 69 | // Getters
|
|---|
| 70 | const Int_t GetAverageAreas () const;
|
|---|
| 71 | MCalibrationPix &GetAverageArea ( const UInt_t i );
|
|---|
| 72 | const MCalibrationPix &GetAverageArea ( const UInt_t i ) const;
|
|---|
| 73 | MBadPixelsPix &GetAverageBadArea ( const UInt_t i );
|
|---|
| 74 | const MBadPixelsPix &GetAverageBadArea ( const UInt_t i ) const;
|
|---|
| 75 | const Int_t GetAverageSectors () const;
|
|---|
| 76 | MCalibrationPix &GetAverageSector ( const UInt_t i );
|
|---|
| 77 | const MCalibrationPix &GetAverageSector ( const UInt_t i ) const;
|
|---|
| 78 | MBadPixelsPix &GetAverageBadSector ( const UInt_t i );
|
|---|
| 79 | const MBadPixelsPix &GetAverageBadSector ( const UInt_t i ) const;
|
|---|
| 80 | const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const;
|
|---|
| 81 | const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const;
|
|---|
| 82 | const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const;
|
|---|
| 83 | const Int_t GetNumUnreliable ( const Int_t aidx=-1) const;
|
|---|
| 84 |
|
|---|
| 85 | Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam,
|
|---|
| 86 | Int_t type=0 ) const;
|
|---|
| 87 | const PulserColor_t GetPulserColor () const { return fPulserColor; }
|
|---|
| 88 | const Int_t GetSize () const;
|
|---|
| 89 |
|
|---|
| 90 | MCalibrationPix &operator[] ( UInt_t i );
|
|---|
| 91 | const MCalibrationPix &operator[] ( UInt_t i ) const;
|
|---|
| 92 |
|
|---|
| 93 | // Inits
|
|---|
| 94 | void Init ( const MGeomCam &geom );
|
|---|
| 95 | void InitSize ( const UInt_t i );
|
|---|
| 96 |
|
|---|
| 97 | // Setters
|
|---|
| 98 | void SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
|
|---|
| 99 | void SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
|
|---|
| 100 | void SetNumUnsuitable ( const UInt_t i, const Int_t aidx );
|
|---|
| 101 | void SetNumUnreliable ( const UInt_t i, const Int_t aidx );
|
|---|
| 102 | virtual void SetPulserColor( const PulserColor_t col=kCT1 ) { fPulserColor = col; }
|
|---|
| 103 |
|
|---|
| 104 | ClassDef(MCalibrationCam, 5) // Base class Container for Calibration Results Camera
|
|---|
| 105 | };
|
|---|
| 106 |
|
|---|
| 107 | #endif
|
|---|