1 | #ifndef MARS_MCalibrationChargeCam
|
---|
2 | #define MARS_MCalibrationChargeCam
|
---|
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 MCalibrationChargeBlindPix;
|
---|
16 | class MCalibrationChargePINDiode;
|
---|
17 | class MCalibrationChargePix;
|
---|
18 | class MBadPixelsPix;
|
---|
19 | class MBadPixelsCam;
|
---|
20 | class MCalibrationChargeCam : public MParContainer, public MCamEvent
|
---|
21 | {
|
---|
22 | private:
|
---|
23 |
|
---|
24 | static const Float_t gkAverageQE; // The average quantum efficieny agreed on for the first analysis
|
---|
25 | static const Float_t gkAverageQEErr; // The error of average quantum efficieny
|
---|
26 |
|
---|
27 | static const Float_t fgConvFFactorRelErrLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
---|
28 |
|
---|
29 | Float_t fAverageQE; // The average quantum efficieny (see Class description)
|
---|
30 | Float_t fAverageQEErr; // The error of the average quantum efficieny (see Class description)
|
---|
31 |
|
---|
32 | Float_t fConvFFactorRelErrLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
---|
33 |
|
---|
34 | Int_t fNumPixels;
|
---|
35 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
36 | MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events
|
---|
37 | MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events
|
---|
38 |
|
---|
39 | MBadPixelsPix *fAverageInnerBadPix; //-> Average Pixel of all events
|
---|
40 | MBadPixelsPix *fAverageOuterBadPix; //-> Average Pixel of all events
|
---|
41 |
|
---|
42 | const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
|
---|
43 | const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
|
---|
44 |
|
---|
45 | const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
|
---|
46 | const MBadPixelsCam *fBadPixels; //! Bad Pixels cam, only for reading
|
---|
47 |
|
---|
48 | TH1D* fOffsets; //!
|
---|
49 | TH1D* fSlopes; //!
|
---|
50 |
|
---|
51 | TH2D* fOffvsSlope; //!
|
---|
52 |
|
---|
53 | UInt_t fNumExcludedPixels;
|
---|
54 |
|
---|
55 | Byte_t fFlags;
|
---|
56 |
|
---|
57 | enum { kFFactorMethodValid, kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
---|
58 |
|
---|
59 | Float_t fMeanFluxPhesInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
60 | Float_t fMeanFluxPhesInnerPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
---|
61 | Float_t fMeanFluxPhesOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
62 | Float_t fMeanFluxPhesOuterPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
---|
63 |
|
---|
64 | Float_t fMeanFluxPhotonsInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
65 | Float_t fMeanFluxPhotonsInnerPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
---|
66 | Float_t fMeanFluxPhotonsOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
67 | Float_t fMeanFluxPhotonsOuterPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
---|
68 |
|
---|
69 | public:
|
---|
70 |
|
---|
71 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
72 | ~MCalibrationChargeCam();
|
---|
73 |
|
---|
74 | void Clear( Option_t *o="" );
|
---|
75 | void InitSize( const UInt_t i );
|
---|
76 |
|
---|
77 | // Setters
|
---|
78 | void SetAverageQE( const Float_t qe= gkAverageQE,
|
---|
79 | const Float_t err=gkAverageQEErr) { fAverageQE = qe;
|
---|
80 | fAverageQEErr = err; }
|
---|
81 | void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelErrLimit = f; }
|
---|
82 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
---|
83 | void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
|
---|
84 | void SetBadPixelsCam( const MBadPixelsCam *bad) { fBadPixels = bad; }
|
---|
85 |
|
---|
86 | void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
|
---|
87 | void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
|
---|
88 |
|
---|
89 | void SetFFactorMethodValid( const Bool_t b = kTRUE );
|
---|
90 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
91 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
---|
92 |
|
---|
93 | // Getters
|
---|
94 | Int_t GetSize() const;
|
---|
95 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
96 |
|
---|
97 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
98 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
99 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
100 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
101 |
|
---|
102 | Float_t GetMeanFluxPhesInnerPixel() const { return fMeanFluxPhesInnerPixel; }
|
---|
103 | Float_t GetMeanFluxPhesInnerPixelErr() const { return fMeanFluxPhesInnerPixelErr; }
|
---|
104 | Float_t GetMeanFluxPhesOuterPixel() const { return fMeanFluxPhesOuterPixel; }
|
---|
105 | Float_t GetMeanFluxPhesOuterPixelErr() const { return fMeanFluxPhesOuterPixelErr; }
|
---|
106 |
|
---|
107 | Float_t GetMeanFluxPhotonsInnerPixel() const { return fMeanFluxPhotonsInnerPixel; }
|
---|
108 | Float_t GetMeanFluxPhotonsInnerPixelErr() const { return fMeanFluxPhotonsInnerPixelErr; }
|
---|
109 | Float_t GetMeanFluxPhotonsOuterPixel() const { return fMeanFluxPhotonsOuterPixel; }
|
---|
110 | Float_t GetMeanFluxPhotonsOuterPixelErr() const { return fMeanFluxPhotonsOuterPixelErr; }
|
---|
111 |
|
---|
112 | Bool_t IsBlindPixelMethodValid() const;
|
---|
113 | Bool_t IsPINDiodeMethodValid() const;
|
---|
114 |
|
---|
115 | // Others
|
---|
116 | MCalibrationChargePix &operator[](UInt_t i);
|
---|
117 | const MCalibrationChargePix &operator[](UInt_t i) const;
|
---|
118 |
|
---|
119 | MCalibrationChargePix *GetAverageInnerPix() { return fAverageInnerPix; }
|
---|
120 | const MCalibrationChargePix *GetAverageInnerPix() const { return fAverageInnerPix; }
|
---|
121 |
|
---|
122 | MCalibrationChargePix *GetAverageOuterPix() { return fAverageOuterPix; }
|
---|
123 | const MCalibrationChargePix *GetAverageOuterPix() const { return fAverageOuterPix; }
|
---|
124 |
|
---|
125 | MBadPixelsPix *GetAverageInnerBadPix() { return fAverageInnerBadPix; }
|
---|
126 | const MBadPixelsPix *GetAverageInnerBadPix() const { return fAverageInnerBadPix; }
|
---|
127 |
|
---|
128 | MBadPixelsPix *GetAverageOuterBadPix() { return fAverageOuterBadPix; }
|
---|
129 | const MBadPixelsPix *GetAverageOuterBadPix() const { return fAverageOuterBadPix; }
|
---|
130 |
|
---|
131 | // Prints
|
---|
132 | void Print(Option_t *o="") const;
|
---|
133 |
|
---|
134 | // Draws
|
---|
135 | void DrawPixelContent(Int_t num) const;
|
---|
136 | // void DrawHiLoFits();
|
---|
137 |
|
---|
138 | // Others
|
---|
139 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
140 |
|
---|
141 | Bool_t CalcMeanFluxPhotonsFFactorMethod();
|
---|
142 |
|
---|
143 | void ApplyPINDiodeCalibration();
|
---|
144 | void ApplyBlindPixelCalibration();
|
---|
145 | void ApplyFFactorCalibration();
|
---|
146 |
|
---|
147 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
148 | };
|
---|
149 |
|
---|
150 | #endif
|
---|