source: trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h@ 5823

Last change on this file since 5823 was 5773, checked in by gaug, 20 years ago
*** empty log message ***
File size: 6.6 KB
Line 
1#ifndef MARS_MHCalibrationChargeCam
2#define MARS_MHCalibrationChargeCam
3
4#ifndef MARS_MHCalibrationCam
5#include "MHCalibrationCam.h"
6#endif
7
8#ifndef MARS_MArrayI
9#include "MArrayI.h"
10#endif
11
12#ifndef MARS_MArrayD
13#include "MArrayD.h"
14#endif
15
16class TH1F;
17class MRawEvtData;
18class MExtractedSignalCam;
19class MCalibrationChargePix;
20class MHCalibrationChargePix;
21
22class MHCalibrationChargeCam : public MHCalibrationCam
23{
24private:
25
26 static const Int_t fgChargeHiGainNbins; //! Nr. bins of HiGain Histograms (now set to: 550 )
27 static const Axis_t fgChargeHiGainFirst; //! First Bin of HiGain Histograms (now set to: -100.5)
28 static const Axis_t fgChargeHiGainLast; //! Last Bin of HiGain Histograms (now set to: 999.5)
29 static const Int_t fgChargeLoGainNbins; //! First Bin of LoGain Histograms (now set to: 325 )
30 static const Axis_t fgChargeLoGainFirst; //! First Bin of LoGain Histograms (now set to: -150.5)
31 static const Axis_t fgChargeLoGainLast; //! Last Bin of LoGain Histograms (now set to: 499.5)
32 static const Float_t fgProbLimit; //! The default for fProbLimit (now set to: 0.00001)
33
34 static const TString gsHistName; //! Default Histogram names
35 static const TString gsHistTitle; //! Default Histogram titles
36 static const TString gsHistXTitle; //! Default Histogram x-axis titles
37 static const TString gsHistYTitle; //! Default Histogram y-axis titles
38
39 static const TString gsAbsHistName; //! Default Histogram names abs.times
40 static const TString gsAbsHistTitle; //! Default Histogram titles abs.times
41 static const TString gsAbsHistXTitle; //! Default Histogram x-axis titles abs.times
42 static const TString gsAbsHistYTitle; //! Default Histogram y-axis titles abs.times
43
44 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.01)
45 static const Float_t fgNumLoGainSaturationLimit; //! The default for fNumLoGainSaturationLimit (now at: 0.005)
46 static const Float_t fgNumOverflowLimit; //! The default for fNumOverflowLimit (now at: 0.005)
47
48 static const Float_t fgTimeLowerLimit; //! Default for fTimeLowerLimit (now set to: 1.)
49 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit (now set to: 2.)
50
51 static const Float_t gkHiGainInnerRefLines[7]; //!
52 static const Float_t gkHiGainOuterRefLines[7]; //!
53 static const Float_t gkLoGainInnerRefLines[7]; //!
54 static const Float_t gkLoGainOuterRefLines[7]; //!
55
56 Int_t fLoGainNbins; // Number of LoGain bins
57 Axis_t fLoGainFirst; // Lower histogram limit low gain
58 Axis_t fLoGainLast; // Upper histogram limit low gain
59
60 Float_t fNumOverflowLimit; // Part of maximum allowed overflow events
61
62 TString fAbsHistName; // Histogram names abs.times
63 TString fAbsHistTitle; // Histogram titles abs. times
64 TString fAbsHistXTitle; // Histogram x-axis titles abs. times
65 TString fAbsHistYTitle; // Histogram y-axis titles abs. times
66
67 MArrayD fSumhiarea ; //!
68 MArrayD fSumloarea ; //!
69 MArrayD fTimehiarea ; //!
70 MArrayD fTimeloarea ; //!
71 MArrayD fSumhisector; //!
72 MArrayD fSumlosector; //!
73 MArrayD fTimehisector; //!
74 MArrayD fTimelosector; //!
75
76 MArrayI fSathiarea ; //!
77 MArrayI fSatloarea ; //!
78 MArrayI fSathisector; //!
79 MArrayI fSatlosector; //!
80
81 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (in units of FADC slices)
82 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (in units of FADC slices)
83 Byte_t fFirstHiGain; // First used slice High Gain
84 Byte_t fLastHiGain; // Last used slice High Gain
85 Byte_t fFirstLoGain; // First used slice Low Gain
86 Byte_t fLastLoGain; // Last used slice Low Gain
87
88 MRawEvtData *fRawEvt; //! Raw event data
89
90 Bool_t SetupHists(const MParList *pList);
91 Bool_t ReInitHists(MParList *pList);
92 Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
93
94 void InitHiGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
95 void InitLoGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
96
97 void FinalizeAbsTimes (MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad,
98 Byte_t first, Byte_t last);
99 Bool_t FinalizeHists();
100 void FinalizeBadPixels();
101
102 void DrawDataCheckPixel(MHCalibrationChargePix &pix, const Float_t refline[]);
103 void DisplayRefLines ( const TH1F *hist, const Float_t refline[]) const;
104
105 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print);
106
107public:
108
109 MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
110 ~MHCalibrationChargeCam() {}
111
112 // Clone
113 TObject *Clone(const char *name="") const;
114
115 void SetLoGainNbins ( const Int_t i ) { fLoGainNbins = i; }
116 void SetLoGainFirst ( const Axis_t f ) { fLoGainFirst = f; }
117 void SetLoGainLast ( const Axis_t f ) { fLoGainLast = f; }
118
119 void SetNumOverflowLimit ( const Float_t f=fgNumOverflowLimit ) { fNumOverflowLimit = f; }
120
121 void SetTimeLowerLimit ( const Float_t f=fgTimeLowerLimit ) { fTimeLowerLimit = f; }
122 void SetTimeUpperLimit ( const Float_t f=fgTimeUpperLimit ) { fTimeUpperLimit = f; }
123
124 void SetAbsHistName ( const char *name ) { fAbsHistName = name; }
125 void SetAbsHistTitle ( const char *name ) { fAbsHistTitle = name; }
126 void SetAbsHistXTitle( const char *name ) { fAbsHistXTitle = name; }
127 void SetAbsHistYTitle( const char *name ) { fAbsHistYTitle = name; }
128
129 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; }
130 void DrawPixelContent( Int_t num ) const;
131
132 // Draw
133 void Draw(const Option_t *opt);
134
135 ClassDef(MHCalibrationChargeCam, 1) // Histogram class for Charge Camera Calibration
136};
137
138#endif
Note: See TracBrowser for help on using the repository browser.