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 | Int_t fNumPixels;
|
---|
25 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
26 | MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events
|
---|
27 | MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events
|
---|
28 |
|
---|
29 | MBadPixelsPix *fAverageInnerBadPix; //-> Average Pixel of all events
|
---|
30 | MBadPixelsPix *fAverageOuterBadPix; //-> Average Pixel of all events
|
---|
31 |
|
---|
32 | const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
|
---|
33 | const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
|
---|
34 |
|
---|
35 | const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
|
---|
36 | const MBadPixelsCam *fBadPixels; //! Bad Pixels cam, only for reading
|
---|
37 |
|
---|
38 | TH1D* fOffsets; //!
|
---|
39 | TH1D* fSlopes; //!
|
---|
40 |
|
---|
41 | TH2D* fOffvsSlope; //!
|
---|
42 |
|
---|
43 | UInt_t fNumExcludedPixels;
|
---|
44 |
|
---|
45 | Byte_t fFlags;
|
---|
46 |
|
---|
47 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
---|
48 |
|
---|
49 | public:
|
---|
50 |
|
---|
51 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
52 | ~MCalibrationChargeCam();
|
---|
53 |
|
---|
54 | void Clear( Option_t *o="" );
|
---|
55 | void InitSize( const UInt_t i );
|
---|
56 |
|
---|
57 | // Setters
|
---|
58 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
---|
59 | void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
|
---|
60 | void SetBadPixelsCam( const MBadPixelsCam *bad) { fBadPixels = bad; }
|
---|
61 |
|
---|
62 | void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
|
---|
63 | void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
|
---|
64 |
|
---|
65 | // Setters only for MC!!
|
---|
66 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
67 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
---|
68 |
|
---|
69 | // Getters
|
---|
70 | Int_t GetSize() const;
|
---|
71 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
72 |
|
---|
73 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
74 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
75 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
76 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
77 |
|
---|
78 | Bool_t IsBlindPixelMethodValid() const;
|
---|
79 | Bool_t IsPINDiodeMethodValid() const;
|
---|
80 |
|
---|
81 | // Others
|
---|
82 | MCalibrationChargePix &operator[](UInt_t i);
|
---|
83 | const MCalibrationChargePix &operator[](UInt_t i) const;
|
---|
84 |
|
---|
85 | MCalibrationChargePix *GetAverageInnerPix() { return fAverageInnerPix; }
|
---|
86 | const MCalibrationChargePix *GetAverageInnerPix() const { return fAverageInnerPix; }
|
---|
87 |
|
---|
88 | MCalibrationChargePix *GetAverageOuterPix() { return fAverageOuterPix; }
|
---|
89 | const MCalibrationChargePix *GetAverageOuterPix() const { return fAverageOuterPix; }
|
---|
90 |
|
---|
91 | MBadPixelsPix *GetAverageInnerBadPix() { return fAverageInnerBadPix; }
|
---|
92 | const MBadPixelsPix *GetAverageInnerBadPix() const { return fAverageInnerBadPix; }
|
---|
93 |
|
---|
94 | MBadPixelsPix *GetAverageOuterBadPix() { return fAverageOuterBadPix; }
|
---|
95 | const MBadPixelsPix *GetAverageOuterBadPix() const { return fAverageOuterBadPix; }
|
---|
96 |
|
---|
97 | // Prints
|
---|
98 | void Print(Option_t *o="") const;
|
---|
99 |
|
---|
100 | // Draws
|
---|
101 | void DrawPixelContent(Int_t num) const;
|
---|
102 | // void DrawHiLoFits();
|
---|
103 |
|
---|
104 | // Others
|
---|
105 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
106 |
|
---|
107 | void ApplyPINDiodeCalibration();
|
---|
108 | void ApplyBlindPixelCalibration();
|
---|
109 |
|
---|
110 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
111 | };
|
---|
112 |
|
---|
113 | #endif
|
---|
114 |
|
---|
115 |
|
---|
116 |
|
---|
117 |
|
---|
118 |
|
---|