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 |
|
---|
11 | class TH1D;
|
---|
12 | class TH2D;
|
---|
13 | class TClonesArray;
|
---|
14 |
|
---|
15 | class MCalibrationPix;
|
---|
16 | class MCalibrationBlindPix;
|
---|
17 | class MCalibrationPINDiode;
|
---|
18 |
|
---|
19 | class MCalibrationCam : public MParContainer, public MCamEvent
|
---|
20 | {
|
---|
21 | private:
|
---|
22 |
|
---|
23 | static const Int_t gkBlindPixelId;
|
---|
24 | static const Int_t gkPINDiodeId;
|
---|
25 |
|
---|
26 | Int_t fNumPixels;
|
---|
27 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
28 |
|
---|
29 | MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
|
---|
30 | MCalibrationPINDiode *fPINDiode; //-> Pointer to the PIN Diode with fit results
|
---|
31 |
|
---|
32 | MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
|
---|
33 |
|
---|
34 | TH1D* fOffsets; //!
|
---|
35 | TH1D* fSlopes; //!
|
---|
36 |
|
---|
37 | TH2D* fOffvsSlope; //!
|
---|
38 |
|
---|
39 | Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
|
---|
40 | Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
---|
41 | Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
|
---|
42 | Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
---|
43 |
|
---|
44 | UInt_t fNumExcludedPixels;
|
---|
45 |
|
---|
46 | Byte_t fFlags;
|
---|
47 |
|
---|
48 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid,
|
---|
49 | kNumPhotInsidePlexiglassAvailable, kNumPhotOutsidePlexiglassAvailable };
|
---|
50 |
|
---|
51 | public:
|
---|
52 |
|
---|
53 | enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
|
---|
54 |
|
---|
55 | private:
|
---|
56 |
|
---|
57 | CalibrationColor_t fColor;
|
---|
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 InitSize(const UInt_t i);
|
---|
66 |
|
---|
67 | // Setters
|
---|
68 | void SetColor(const CalibrationColor_t color) { fColor = color; }
|
---|
69 | void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
|
---|
70 |
|
---|
71 | void SetBlindPixelMethodValid(const Bool_t b = kTRUE);
|
---|
72 | void SetPINDiodeMethodValid(const Bool_t b = kTRUE);
|
---|
73 |
|
---|
74 | void SetGeomCam(MGeomCam *geom) { fGeomCam = geom; }
|
---|
75 |
|
---|
76 | // Getters
|
---|
77 | Int_t GetSize() const;
|
---|
78 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
79 |
|
---|
80 | MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
---|
81 | MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
|
---|
82 | MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
|
---|
83 | MCalibrationPINDiode *GetPINDiode() { return fPINDiode; }
|
---|
84 |
|
---|
85 | Float_t GetMeanPhotInsidePlexiglass() const { return fMeanPhotInsidePlexiglass; }
|
---|
86 | Float_t GetMeanPhotErrInsidePlexiglass() const { return fMeanPhotErrInsidePlexiglass; }
|
---|
87 | Float_t GetMeanPhotOutsidePlexiglass() const { return fMeanPhotOutsidePlexiglass; }
|
---|
88 | Float_t GetMeanPhotErrOutsidePlexiglass() const { return fMeanPhotErrOutsidePlexiglass; }
|
---|
89 |
|
---|
90 | Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
91 | Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
92 | Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
93 | Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
94 |
|
---|
95 | Bool_t IsPixelUsed(Int_t idx) const;
|
---|
96 | Bool_t IsPixelFitted(Int_t idx) const;
|
---|
97 |
|
---|
98 | Bool_t IsBlindPixelMethodValid() const;
|
---|
99 | Bool_t IsPINDiodeMethodValid() const;
|
---|
100 |
|
---|
101 | Bool_t IsNumPhotInsidePlexiglassAvailable() const;
|
---|
102 | Bool_t IsNumPhotOutsidePlexiglassAvailable() const;
|
---|
103 |
|
---|
104 | // Others
|
---|
105 | MCalibrationPix &operator[](Int_t i);
|
---|
106 | MCalibrationPix &operator[](Int_t i) const;
|
---|
107 |
|
---|
108 | void CutEdges();
|
---|
109 | Bool_t CheckBounds(Int_t i) const;
|
---|
110 |
|
---|
111 | // Prints
|
---|
112 | void Print(Option_t *o="") const;
|
---|
113 |
|
---|
114 | // Draws
|
---|
115 | void DrawPixelContent(Int_t num) const;
|
---|
116 | void DrawHiLoFits();
|
---|
117 |
|
---|
118 | // Others
|
---|
119 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
120 |
|
---|
121 | Bool_t CalcNumPhotInsidePlexiglass();
|
---|
122 | Bool_t CalcNumPhotOutsidePlexiglass();
|
---|
123 |
|
---|
124 | ClassDef(MCalibrationCam, 1) // Container for calibration information of the camera
|
---|
125 | };
|
---|
126 |
|
---|
127 | #endif
|
---|
128 |
|
---|