1 | #ifndef MARS_MCalibrationCam
|
---|
2 | #define MARS_MCalibrationCam
|
---|
3 |
|
---|
4 | #ifndef MARS_MCamEvent
|
---|
5 | #include "MCamEvent.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MCalibrationPix
|
---|
9 | #include "MCalibrationPix.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MCalibrationBlindPix
|
---|
13 | #include "MCalibrationBlindPix.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifndef MARS_MCalibrationPINDiode
|
---|
17 | #include "MCalibrationPINDiode.h"
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | #ifndef ROOT_TClonesArray
|
---|
21 | #include <TClonesArray.h>
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #ifndef ROOT_TH1F
|
---|
25 | #include <TH1F.h>
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #ifndef ROOT_TH1D
|
---|
29 | #include <TH1D.h>
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | class MGeomCam;
|
---|
33 | class MCalibrationPix;
|
---|
34 | class MCalibrationBlindPix;
|
---|
35 | class MCalibrationPINDiode;
|
---|
36 |
|
---|
37 | class MCalibrationCam : public MCamEvent
|
---|
38 | {
|
---|
39 | private:
|
---|
40 |
|
---|
41 | Int_t fNumPixels;
|
---|
42 | TClonesArray *fPixels; //! FIXME: Change TClonesArray away from a pointer?
|
---|
43 |
|
---|
44 | MCalibrationBlindPix *fBlindPixel; //! containing blind pixel data with fitresults
|
---|
45 | MCalibrationPINDiode *fPINDiode; //! containing PIN Diode data with fit results
|
---|
46 |
|
---|
47 | Bool_t fMeanNrPhotAvailable;
|
---|
48 | Float_t fMeanNrPhotInnerPix; // The mean number of photons in an inner pixel
|
---|
49 | Float_t fMeanNrPhotInnerPixErr; // The uncertainty about the number of photons in an inner pixel
|
---|
50 |
|
---|
51 | TH1F* fHChargeAllPixels;
|
---|
52 | TH1F* fHChargeErrAllPixels;
|
---|
53 | TH1F* fHChargeSigmaAllPixels;
|
---|
54 | TH1F* fHChargeProbAllPixels;
|
---|
55 |
|
---|
56 | TH1F* fHTimeAllPixels;
|
---|
57 | TH1F* fHTimeSigmaAllPixels;
|
---|
58 | TH1F* fHTimeProbAllPixels;
|
---|
59 |
|
---|
60 | TH1F* fHPedAllPixels;
|
---|
61 | TH1F* fHPedRMSAllPixels;
|
---|
62 |
|
---|
63 | TH1F* fHSigmaPerChargeAllPixels;
|
---|
64 | TH1F* fHPhEAllPixels;
|
---|
65 |
|
---|
66 | TH1F* fHConvPhEperFADCAllPixels;
|
---|
67 | TH1F* fHConvPhperFADCAllPixels;
|
---|
68 |
|
---|
69 | TH1D* fOffsets;
|
---|
70 | TH1D* fSlopes;
|
---|
71 |
|
---|
72 |
|
---|
73 | public:
|
---|
74 |
|
---|
75 | enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
|
---|
76 |
|
---|
77 | private:
|
---|
78 |
|
---|
79 | CalibrationColor_t fColor;
|
---|
80 |
|
---|
81 | public:
|
---|
82 |
|
---|
83 | MCalibrationCam(const char *name=NULL, const char *title=NULL);
|
---|
84 | ~MCalibrationCam();
|
---|
85 |
|
---|
86 | void Clear(Option_t *o="");
|
---|
87 |
|
---|
88 | void InitSize(const Int_t i);
|
---|
89 | Int_t GetSize() const;
|
---|
90 |
|
---|
91 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
92 |
|
---|
93 | Bool_t IsPixelUsed(Int_t idx) const;
|
---|
94 | Bool_t IsPixelFitted(Int_t idx) const;
|
---|
95 |
|
---|
96 | MCalibrationPix &operator[](Int_t i);
|
---|
97 | MCalibrationPix &operator[](Int_t i) const;
|
---|
98 |
|
---|
99 | UShort_t FitCharge(Int_t i=-1);
|
---|
100 | UShort_t FitAllCharge();
|
---|
101 | UShort_t FitTime(Int_t i=-1);
|
---|
102 | UShort_t FitAllTime();
|
---|
103 |
|
---|
104 | Bool_t CheckBounds(Int_t i) const;
|
---|
105 |
|
---|
106 | void Print(Option_t *o="") const;
|
---|
107 |
|
---|
108 | void CutEdges();
|
---|
109 |
|
---|
110 | Bool_t CalcNrPhotInnerPixel();
|
---|
111 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
112 | void DrawPixelContent(Int_t num) const;
|
---|
113 |
|
---|
114 | MCalibrationPix *GetCalibrationPix(Int_t idx) const;
|
---|
115 | MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
---|
116 | MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
|
---|
117 |
|
---|
118 | void SetColor(CalibrationColor_t color) { fColor = color; }
|
---|
119 |
|
---|
120 | Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
121 | Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
122 | Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
123 | Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
---|
124 |
|
---|
125 | void DrawHiLoFits();
|
---|
126 |
|
---|
127 | ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
|
---|
128 | };
|
---|
129 |
|
---|
130 | #endif
|
---|
131 |
|
---|