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 | static const Float_t fgPheFFactorRelErrLimit; // The rel. limit for acceptance of a calculated number of phe's w.r.t the mean number (in sigma of the error)
|
---|
29 |
|
---|
30 | Float_t fAverageQE; // The average quantum efficieny (see Class description)
|
---|
31 | Float_t fAverageQEVar; // The error of the average quantum efficieny (see Class description)
|
---|
32 |
|
---|
33 | Float_t fConvFFactorRelVarLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
---|
34 | Float_t fPheFFactorRelVarLimit; // The rel. limit for acceptance of a calculated number of phe's w.r.t the mean number (in variances of the error).
|
---|
35 |
|
---|
36 | Int_t fNumPixels;
|
---|
37 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
38 |
|
---|
39 | MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events
|
---|
40 | MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events
|
---|
41 |
|
---|
42 | MBadPixelsPix *fAverageInnerBadPix; //-> Average Pixel of all events
|
---|
43 | MBadPixelsPix *fAverageOuterBadPix; //-> Average Pixel of all events
|
---|
44 |
|
---|
45 | TH1D* fOffsets; //!
|
---|
46 | TH1D* fSlopes; //!
|
---|
47 |
|
---|
48 | TH2D* fOffvsSlope; //!
|
---|
49 |
|
---|
50 | UInt_t fNumExcludedPixels;
|
---|
51 |
|
---|
52 | Byte_t fFlags;
|
---|
53 |
|
---|
54 | enum { kFFactorMethodValid, kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
---|
55 |
|
---|
56 | Float_t fMeanFluxPhesInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
57 | Float_t fMeanFluxPhesInnerPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
---|
58 | Float_t fMeanFluxPhesOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
59 | Float_t fMeanFluxPhesOuterPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
---|
60 |
|
---|
61 | Float_t fMeanFluxPhotonsInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
62 | Float_t fMeanFluxPhotonsInnerPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
---|
63 | Float_t fMeanFluxPhotonsOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
---|
64 | Float_t fMeanFluxPhotonsOuterPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
---|
65 |
|
---|
66 | public:
|
---|
67 |
|
---|
68 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
69 | ~MCalibrationChargeCam();
|
---|
70 |
|
---|
71 | void Clear( Option_t *o="" );
|
---|
72 | void InitSize( const UInt_t i );
|
---|
73 |
|
---|
74 | // Setters
|
---|
75 | void SetAverageQE( const Float_t qe= gkAverageQE,
|
---|
76 | const Float_t err=gkAverageQEErr) { fAverageQE = qe;
|
---|
77 | fAverageQEVar = err*err; }
|
---|
78 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
---|
79 | void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelVarLimit = f*f; }
|
---|
80 | void SetPheFFactorRelErrLimit ( const Float_t f=fgPheFFactorRelErrLimit ) { fPheFFactorRelVarLimit = f*f; }
|
---|
81 |
|
---|
82 | void SetFFactorMethodValid( const Bool_t b = kTRUE );
|
---|
83 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
84 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
---|
85 |
|
---|
86 | // Getters
|
---|
87 | Int_t GetSize() const;
|
---|
88 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
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 | Float_t GetMeanFluxPhesInnerPixel() const { return fMeanFluxPhesInnerPixel; }
|
---|
96 | Float_t GetMeanFluxPhesInnerPixelErr() const;
|
---|
97 | Float_t GetMeanFluxPhesOuterPixel() const { return fMeanFluxPhesOuterPixel; }
|
---|
98 | Float_t GetMeanFluxPhesOuterPixelErr() const;
|
---|
99 |
|
---|
100 | Float_t GetMeanFluxPhotonsInnerPixel() const { return fMeanFluxPhotonsInnerPixel; }
|
---|
101 | Float_t GetMeanFluxPhotonsInnerPixelErr() const;
|
---|
102 | Float_t GetMeanFluxPhotonsOuterPixel() const { return fMeanFluxPhotonsOuterPixel; }
|
---|
103 | Float_t GetMeanFluxPhotonsOuterPixelErr() const;
|
---|
104 |
|
---|
105 | Bool_t IsBlindPixelMethodValid() const;
|
---|
106 | Bool_t IsPINDiodeMethodValid() const;
|
---|
107 |
|
---|
108 | // Others
|
---|
109 | MCalibrationChargePix &operator[](UInt_t i);
|
---|
110 | const MCalibrationChargePix &operator[](UInt_t i) const;
|
---|
111 |
|
---|
112 | MCalibrationChargePix *GetAverageInnerPix() { return fAverageInnerPix; }
|
---|
113 | const MCalibrationChargePix *GetAverageInnerPix() const { return fAverageInnerPix; }
|
---|
114 |
|
---|
115 | MCalibrationChargePix *GetAverageOuterPix() { return fAverageOuterPix; }
|
---|
116 | const MCalibrationChargePix *GetAverageOuterPix() const { return fAverageOuterPix; }
|
---|
117 |
|
---|
118 | MBadPixelsPix *GetAverageInnerBadPix() { return fAverageInnerBadPix; }
|
---|
119 | const MBadPixelsPix *GetAverageInnerBadPix() const { return fAverageInnerBadPix; }
|
---|
120 |
|
---|
121 | MBadPixelsPix *GetAverageOuterBadPix() { return fAverageOuterBadPix; }
|
---|
122 | const MBadPixelsPix *GetAverageOuterBadPix() const { return fAverageOuterBadPix; }
|
---|
123 |
|
---|
124 | // Prints
|
---|
125 | void Print(Option_t *o="") const;
|
---|
126 |
|
---|
127 | // Draws
|
---|
128 | void DrawPixelContent(Int_t num) const;
|
---|
129 | // void DrawHiLoFits();
|
---|
130 |
|
---|
131 | // Others
|
---|
132 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
133 |
|
---|
134 | Bool_t CalcMeanFluxPhotonsFFactorMethod(const MGeomCam &geom, MBadPixelsCam &bad);
|
---|
135 |
|
---|
136 | void ApplyPINDiodeCalibration(const MGeomCam &geom,
|
---|
137 | const MBadPixelsCam &bad,
|
---|
138 | const MCalibrationChargePINDiode &pindiode);
|
---|
139 | void ApplyBlindPixelCalibration(const MGeomCam &geom,
|
---|
140 | const MBadPixelsCam &bad,
|
---|
141 | const MCalibrationChargeBlindPix &blindpix);
|
---|
142 | void ApplyFFactorCalibration(const MGeomCam &geom, const MBadPixelsCam &bad);
|
---|
143 |
|
---|
144 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
145 | };
|
---|
146 |
|
---|
147 | #endif
|
---|