source: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h@ 3429

Last change on this file since 3429 was 3429, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.4 KB
Line 
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
15class MRawEvtData;
16class MGeomCam;
17class MBadPixelsCam;
18class MBadPixelsPix;
19class MCalibrationChargeCam;
20class MCalibrationChargePix;
21class MHCalibrationChargeHiGainPix;
22class MHCalibrationChargeLoGainPix;
23class MHCalibrationChargeCam : public MH, public MCamEvent
24{
25private:
26
27 static const Float_t fgNumHiGainSaturationLimit; // The default number of fNumHiGainSaturationLimit
28 static const Float_t fgNumLoGainSaturationLimit; // The default number of fNumLoGainSaturationLimit
29
30 Float_t fNumHiGainSaturationLimit; // The rel. number of saturated higain FADC slices in the whole run upon which the pixel is called saturated
31 Float_t fNumLoGainSaturationLimit; // The rel. number of saturated logain FADC slices in the whole run upon which the pixel is called saturated
32
33 TObjArray *fHiGainArray; //-> Array of MHCalibrationChargePix with hists
34 TObjArray *fLoGainArray; //-> Array of MHCalibrationChargePix with hists
35 MHCalibrationChargeHiGainPix *fAverageHiGainInnerPix; //-> One MHCalibrationChargeHiGainPix with the average of all inner pixels
36 MHCalibrationChargeLoGainPix *fAverageLoGainInnerPix; //-> One MHCalibrationChargeLoGainPix with the average of all inner pixels
37 MHCalibrationChargeHiGainPix *fAverageHiGainOuterPix; //-> One MHCalibrationChargeHiGainPix with the average of all outer pixels
38 MHCalibrationChargeLoGainPix *fAverageLoGainOuterPix; //-> One MHCalibrationChargeLoGainPix with the average of all outer pixels
39
40 MCalibrationChargeCam *fCam; //! Class holding the results
41 MRawEvtData *fRawEvt; //! Raw event data (time slices)
42 MGeomCam *fGeom; //! MAGIC geometry
43 MBadPixelsCam *fBadPixels; //! Bad Pixels
44
45 Int_t fNumInnerPixels;
46 Int_t fNumOuterPixels;
47 Int_t fNumExcluded;
48
49 void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
50 void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
51
52public:
53
54 MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
55 ~MHCalibrationChargeCam();
56
57 void SetNumHiGainSaturationLimit( const Float_t lim=fgNumHiGainSaturationLimit) { fNumHiGainSaturationLimit = lim; }
58 void SetNumLoGainSaturationLimit( const Float_t lim=fgNumLoGainSaturationLimit) { fNumLoGainSaturationLimit = lim; }
59
60 Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; }
61 Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; }
62
63 MHCalibrationChargeHiGainPix &operator[](UInt_t i);
64 const MHCalibrationChargeHiGainPix &operator[](UInt_t i) const;
65
66 MHCalibrationChargeLoGainPix &operator()(UInt_t i);
67 const MHCalibrationChargeLoGainPix &operator()(UInt_t i) const;
68
69 MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() { return *fAverageHiGainInnerPix; }
70 const MHCalibrationChargeHiGainPix &GetAverageHiGainInnerPix() const { return *fAverageHiGainInnerPix; }
71
72 MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() { return *fAverageLoGainInnerPix; }
73 const MHCalibrationChargeLoGainPix &GetAverageLoGainInnerPix() const { return *fAverageLoGainInnerPix; }
74
75 MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() { return *fAverageHiGainOuterPix; }
76 const MHCalibrationChargeHiGainPix &GetAverageHiGainOuterPix() const { return *fAverageHiGainOuterPix; }
77
78 MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() { return *fAverageLoGainOuterPix; }
79 const MHCalibrationChargeLoGainPix &GetAverageLoGainOuterPix() const { return *fAverageLoGainOuterPix; }
80
81 Bool_t SetupFill(const MParList *pList);
82 Bool_t ReInit ( MParList *pList);
83 Bool_t Fill (const MParContainer *par, const Stat_t w=1);
84 Bool_t Finalize ( );
85
86 // Draw
87 void Draw(const Option_t *opt);
88
89 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
90 void DrawPixelContent( Int_t num ) const;
91
92 ClassDef(MHCalibrationChargeCam, 1) // Container for calibration information of the camera
93};
94
95#endif
96
97
98
99
100
101
102
103
104
Note: See TracBrowser for help on using the repository browser.