1 | #ifndef MARS_MHCalibrationChargeCam
|
---|
2 | #define MARS_MHCalibrationChargeCam
|
---|
3 |
|
---|
4 | #ifndef ROOT_TObjArray
|
---|
5 | #include <TObjArray.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MH
|
---|
9 | #include "MH.h"
|
---|
10 | #endif
|
---|
11 | #ifndef MARS_MCamEvent
|
---|
12 | #include "MCamEvent.h"
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | class TText;
|
---|
16 | class MRawEvtData;
|
---|
17 | class MGeomCam;
|
---|
18 | class MBadPixelsCam;
|
---|
19 | class MBadPixelsPix;
|
---|
20 | class MCalibrationChargeCam;
|
---|
21 | class MCalibrationChargePix;
|
---|
22 | class MHCalibrationChargeHiGainPix;
|
---|
23 | class MHCalibrationChargeLoGainPix;
|
---|
24 | class MHCalibrationChargeCam : public MH, public MCamEvent
|
---|
25 | {
|
---|
26 | private:
|
---|
27 |
|
---|
28 | static const Float_t fgNumHiGainSaturationLimit; // The default number of fNumHiGainSaturationLimit
|
---|
29 | static const Float_t fgNumLoGainSaturationLimit; // The default number of fNumLoGainSaturationLimit
|
---|
30 |
|
---|
31 | Float_t fNumHiGainSaturationLimit; // The rel. number of saturated higain FADC slices in the whole run upon which the pixel is called saturated
|
---|
32 | Float_t fNumLoGainSaturationLimit; // The rel. number of saturated logain FADC slices in the whole run upon which the pixel is called saturated
|
---|
33 |
|
---|
34 | TObjArray *fHiGainArray; //-> Array of MHCalibrationChargePix with hists
|
---|
35 | TObjArray *fLoGainArray; //-> Array of MHCalibrationChargePix with hists
|
---|
36 | MHCalibrationChargeHiGainPix *fAverageHiGainInnerPix; //-> One MHCalibrationChargeHiGainPix with the average of all inner pixels
|
---|
37 | MHCalibrationChargeLoGainPix *fAverageLoGainInnerPix; //-> One MHCalibrationChargeLoGainPix with the average of all inner pixels
|
---|
38 | MHCalibrationChargeHiGainPix *fAverageHiGainOuterPix; //-> One MHCalibrationChargeHiGainPix with the average of all outer pixels
|
---|
39 | MHCalibrationChargeLoGainPix *fAverageLoGainOuterPix; //-> One MHCalibrationChargeLoGainPix with the average of all outer pixels
|
---|
40 |
|
---|
41 | MCalibrationChargeCam *fCam; //! Class holding the results
|
---|
42 | MRawEvtData *fRawEvt; //! Raw event data (time slices)
|
---|
43 | MGeomCam *fGeom; //! MAGIC geometry
|
---|
44 | MBadPixelsCam *fBadPixels; //! Bad Pixels
|
---|
45 |
|
---|
46 | Int_t fNumInnerPixels;
|
---|
47 | Int_t fNumOuterPixels;
|
---|
48 | Int_t fNumExcluded;
|
---|
49 |
|
---|
50 | Bool_t fAverageInnerSat;
|
---|
51 | Bool_t fAverageOuterSat;
|
---|
52 |
|
---|
53 | Float_t fAverageInnerPixSigma;
|
---|
54 | Float_t fAverageOuterPixSigma;
|
---|
55 |
|
---|
56 | Float_t fAverageInnerPixSigmaErr;
|
---|
57 | Float_t fAverageOuterPixSigmaErr;
|
---|
58 |
|
---|
59 | Float_t fAverageInnerPixRelSigma;
|
---|
60 | Float_t fAverageOuterPixRelSigma;
|
---|
61 |
|
---|
62 | Float_t fAverageInnerPixRelSigmaErr;
|
---|
63 | Float_t fAverageOuterPixRelSigmaErr;
|
---|
64 |
|
---|
65 | void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
66 | void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
67 | void FinalizeAveragePix (MCalibrationChargePix &pix, Int_t npix,
|
---|
68 | Float_t &sigma, Float_t &sigmaerr,
|
---|
69 | Float_t &relsigma, Float_t &relsigmaerr,
|
---|
70 | Bool_t &b);
|
---|
71 | void DrawAverageSigma(Bool_t sat, Bool_t inner,
|
---|
72 | Float_t sigma, Float_t sigmaerr,
|
---|
73 | Float_t relsigma, Float_t relsigmaerr) const;
|
---|
74 |
|
---|
75 | public:
|
---|
76 |
|
---|
77 | MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
78 | ~MHCalibrationChargeCam();
|
---|
79 |
|
---|
80 | void SetNumHiGainSaturationLimit( const Float_t lim=fgNumHiGainSaturationLimit) { fNumHiGainSaturationLimit = lim; }
|
---|
81 | void SetNumLoGainSaturationLimit( const Float_t lim=fgNumLoGainSaturationLimit) { fNumLoGainSaturationLimit = lim; }
|
---|
82 |
|
---|
83 | Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; }
|
---|
84 | Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; }
|
---|
85 |
|
---|
86 | MHCalibrationChargeHiGainPix &operator[](UInt_t i);
|
---|
87 | const MHCalibrationChargeHiGainPix &operator[](UInt_t i) const;
|
---|
88 |
|
---|
89 | MHCalibrationChargeLoGainPix &operator()(UInt_t i);
|
---|
90 | const MHCalibrationChargeLoGainPix &operator()(UInt_t i) const;
|
---|
91 |
|
---|
92 | MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() { return *fAverageHiGainInnerPix; }
|
---|
93 | const MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() const { return *fAverageHiGainInnerPix; }
|
---|
94 |
|
---|
95 | MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() { return *fAverageLoGainInnerPix; }
|
---|
96 | const MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() const { return *fAverageLoGainInnerPix; }
|
---|
97 |
|
---|
98 | MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() { return *fAverageHiGainOuterPix; }
|
---|
99 | const MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() const { return *fAverageHiGainOuterPix; }
|
---|
100 |
|
---|
101 | MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() { return *fAverageLoGainOuterPix; }
|
---|
102 | const MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() const { return *fAverageLoGainOuterPix; }
|
---|
103 |
|
---|
104 | Bool_t SetupFill(const MParList *pList);
|
---|
105 | Bool_t ReInit ( MParList *pList);
|
---|
106 | Bool_t Fill (const MParContainer *par, const Stat_t w=1);
|
---|
107 | Bool_t Finalize ( );
|
---|
108 |
|
---|
109 | // Draw
|
---|
110 | void Draw(const Option_t *opt);
|
---|
111 |
|
---|
112 | Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
113 | void DrawPixelContent( Int_t num ) const;
|
---|
114 |
|
---|
115 | ClassDef(MHCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
116 | };
|
---|
117 |
|
---|
118 | #endif
|
---|
119 |
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|