1 | #ifndef MARS_MCalibrationCam
|
---|
2 | #define MARS_MCalibrationCam
|
---|
3 |
|
---|
4 | #ifndef MARS_MCamEvent
|
---|
5 | #include "MCamEvent.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TH1D;
|
---|
9 | class TH2D;
|
---|
10 | class TClonesArray;
|
---|
11 |
|
---|
12 | class MCalibrationPix;
|
---|
13 | class MCalibrationBlindPix;
|
---|
14 | class MCalibrationPINDiode;
|
---|
15 |
|
---|
16 | class MCalibrationCam : public MCamEvent
|
---|
17 | {
|
---|
18 | private:
|
---|
19 |
|
---|
20 | Int_t fNumPixels;
|
---|
21 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
22 |
|
---|
23 | MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
|
---|
24 | MCalibrationPINDiode *fPINDiode; //-> Pointer to the PIN Diode with fit results
|
---|
25 |
|
---|
26 | Bool_t fNumPhotInsidePlexiglassAvailable; // TRUE: Blind Pixel could have been fitted well
|
---|
27 | Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
|
---|
28 | Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
---|
29 |
|
---|
30 | Bool_t fNumPhotOutsidePlexiglassAvailable; // TRUE: PIN Diode could have been fitted well
|
---|
31 | Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
|
---|
32 | Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
---|
33 |
|
---|
34 | TH1D* fOffsets; //!
|
---|
35 | TH1D* fSlopes; //!
|
---|
36 |
|
---|
37 | TH2D* fOffvsSlope; //!
|
---|
38 |
|
---|
39 | UInt_t fNumExcludedPixels;
|
---|
40 |
|
---|
41 | Byte_t fFlags;
|
---|
42 |
|
---|
43 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid };
|
---|
44 |
|
---|
45 | public:
|
---|
46 |
|
---|
47 | enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
|
---|
48 |
|
---|
49 | private:
|
---|
50 |
|
---|
51 | CalibrationColor_t fColor;
|
---|
52 |
|
---|
53 | public:
|
---|
54 |
|
---|
55 | MCalibrationCam(const char *name=NULL, const char *title=NULL);
|
---|
56 | ~MCalibrationCam();
|
---|
57 |
|
---|
58 | void Clear(Option_t *o="");
|
---|
59 | void InitSize(const UInt_t i);
|
---|
60 |
|
---|
61 | // Setters
|
---|
62 | void SetColor(const CalibrationColor_t color) { fColor = color; }
|
---|
63 | void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
|
---|
64 | void SetBlindPixelMethodValid(const Bool_t b = kTRUE);
|
---|
65 | void SetPINDiodeMethodValid(const Bool_t b = kTRUE);
|
---|
66 |
|
---|
67 | // Getters
|
---|
68 | Int_t GetSize() const;
|
---|
69 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
70 |
|
---|
71 | MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
---|
72 | MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
|
---|
73 | MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
|
---|
74 | MCalibrationPINDiode *GetPINDiode() { return fPINDiode; }
|
---|
75 |
|
---|
76 | Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
77 | Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
78 | Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
79 | Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
80 |
|
---|
81 | Bool_t IsPixelUsed(Int_t idx) const;
|
---|
82 | Bool_t IsPixelFitted(Int_t idx) const;
|
---|
83 |
|
---|
84 | Bool_t IsBlindPixelMethodValid() const;
|
---|
85 | Bool_t IsPINDiodeMethodValid() const;
|
---|
86 |
|
---|
87 | // Others
|
---|
88 | MCalibrationPix &operator[](Int_t i);
|
---|
89 | MCalibrationPix &operator[](Int_t i) const;
|
---|
90 |
|
---|
91 | void CutEdges();
|
---|
92 | Bool_t CheckBounds(Int_t i) const;
|
---|
93 |
|
---|
94 | // Prints
|
---|
95 | void Print(Option_t *o="") const;
|
---|
96 |
|
---|
97 | // Draws
|
---|
98 | void DrawPixelContent(Int_t num) const;
|
---|
99 | void DrawHiLoFits();
|
---|
100 |
|
---|
101 | // Others
|
---|
102 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
103 |
|
---|
104 | Bool_t CalcNumPhotInsidePlexiglass();
|
---|
105 | Bool_t CalcNumPhotOutsidePlexiglass();
|
---|
106 |
|
---|
107 | ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
|
---|
108 | };
|
---|
109 |
|
---|
110 | #endif
|
---|
111 |
|
---|