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 | static const Int_t fgPulserFrequency; // The default pulser frequency
|
---|
31 |
|
---|
32 | Float_t fNumHiGainSaturationLimit; // Rel. number sat. higain FADC slices upon which the pixel is called saturated
|
---|
33 | Float_t fNumLoGainSaturationLimit; // Rel. number sat. logain FADC slices upon which the pixel is called saturated
|
---|
34 | Int_t fPulserFrequency; // The pulser frequency
|
---|
35 |
|
---|
36 | TObjArray *fHiGainArray; //-> Array of MHCalibrationChargePix with hists
|
---|
37 | TObjArray *fLoGainArray; //-> Array of MHCalibrationChargePix with hists
|
---|
38 | MHCalibrationChargeHiGainPix *fAverageHiGainInnerPix; //-> HiGain Average of all inner pixels
|
---|
39 | MHCalibrationChargeLoGainPix *fAverageLoGainInnerPix; //-> LoGain Average of all inner pixels
|
---|
40 | MHCalibrationChargeHiGainPix *fAverageHiGainOuterPix; //-> HiGain Average of all outer pixels
|
---|
41 | MHCalibrationChargeLoGainPix *fAverageLoGainOuterPix; //-> LoGain Average of all outer pixels
|
---|
42 |
|
---|
43 | MCalibrationChargeCam *fCam; //! Cam holding the results
|
---|
44 | MRawEvtData *fRawEvt; //! Raw event data (time slices)
|
---|
45 | MGeomCam *fGeom; //! MAGIC geometry
|
---|
46 | MBadPixelsCam *fBadPixels; //! Bad Pixels
|
---|
47 |
|
---|
48 | Int_t fNumInnerPixels;
|
---|
49 | Int_t fNumOuterPixels;
|
---|
50 | Int_t fNumExcluded;
|
---|
51 |
|
---|
52 | Bool_t fAverageInnerSat;
|
---|
53 | Bool_t fAverageOuterSat;
|
---|
54 |
|
---|
55 | Float_t fAverageInnerPixSigma;
|
---|
56 | Float_t fAverageOuterPixSigma;
|
---|
57 |
|
---|
58 | Float_t fAverageInnerPixSigmaErr;
|
---|
59 | Float_t fAverageOuterPixSigmaErr;
|
---|
60 |
|
---|
61 | Float_t fAverageInnerPixRelSigma;
|
---|
62 | Float_t fAverageOuterPixRelSigma;
|
---|
63 |
|
---|
64 | Float_t fAverageInnerPixRelSigmaErr;
|
---|
65 | Float_t fAverageOuterPixRelSigmaErr;
|
---|
66 |
|
---|
67 | void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
68 | void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
69 | void FinalizeAveragePix (MCalibrationChargePix &pix, Int_t npix,
|
---|
70 | Float_t &sigma, Float_t &sigmaerr,
|
---|
71 | Float_t &relsigma, Float_t &relsigmaerr,
|
---|
72 | Bool_t &b);
|
---|
73 | void DrawAverageSigma(Bool_t sat, Bool_t inner,
|
---|
74 | Float_t sigma, Float_t sigmaerr,
|
---|
75 | Float_t relsigma, Float_t relsigmaerr) const;
|
---|
76 |
|
---|
77 | public:
|
---|
78 |
|
---|
79 | MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
80 | ~MHCalibrationChargeCam();
|
---|
81 |
|
---|
82 | void SetNumHiGainSaturationLimit( const Float_t lim=fgNumHiGainSaturationLimit) { fNumHiGainSaturationLimit = lim; }
|
---|
83 | void SetNumLoGainSaturationLimit( const Float_t lim=fgNumLoGainSaturationLimit) { fNumLoGainSaturationLimit = lim; }
|
---|
84 | void SetPulserFrequency ( const Int_t f=fgPulserFrequency) { fPulserFrequency = f; }
|
---|
85 |
|
---|
86 | Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; }
|
---|
87 | Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; }
|
---|
88 |
|
---|
89 | MHCalibrationChargeHiGainPix &operator[](UInt_t i);
|
---|
90 | const MHCalibrationChargeHiGainPix &operator[](UInt_t i) const;
|
---|
91 |
|
---|
92 | MHCalibrationChargeLoGainPix &operator()(UInt_t i);
|
---|
93 | const MHCalibrationChargeLoGainPix &operator()(UInt_t i) const;
|
---|
94 |
|
---|
95 | MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() { return *fAverageHiGainInnerPix; }
|
---|
96 | const MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() const { return *fAverageHiGainInnerPix; }
|
---|
97 |
|
---|
98 | MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() { return *fAverageLoGainInnerPix; }
|
---|
99 | const MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() const { return *fAverageLoGainInnerPix; }
|
---|
100 |
|
---|
101 | MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() { return *fAverageHiGainOuterPix; }
|
---|
102 | const MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() const { return *fAverageHiGainOuterPix; }
|
---|
103 |
|
---|
104 | MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() { return *fAverageLoGainOuterPix; }
|
---|
105 | const MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() const { return *fAverageLoGainOuterPix; }
|
---|
106 |
|
---|
107 | Bool_t SetupFill(const MParList *pList);
|
---|
108 | Bool_t ReInit ( MParList *pList);
|
---|
109 | Bool_t Fill (const MParContainer *par, const Stat_t w=1);
|
---|
110 | Bool_t Finalize ( );
|
---|
111 |
|
---|
112 | // Draw
|
---|
113 | void Draw(const Option_t *opt);
|
---|
114 |
|
---|
115 | Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
116 | void DrawPixelContent( Int_t num ) const;
|
---|
117 |
|
---|
118 | ClassDef(MHCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
119 | };
|
---|
120 |
|
---|
121 | #endif
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 |
|
---|