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