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

Last change on this file since 8001 was 7188, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 6.9 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
27 static const Axis_t fgChargeHiGainFirst; //! First Bin of HiGain Histograms
28 static const Axis_t fgChargeHiGainLast; //! Last Bin of HiGain Histograms
29 static const Int_t fgChargeLoGainNbins; //! First Bin of LoGain Histograms
30 static const Axis_t fgChargeLoGainFirst; //! First Bin of LoGain Histograms
31 static const Axis_t fgChargeLoGainLast; //! Last Bin of LoGain Histograms
32 static const Float_t fgProbLimit; //! The default for fProbLimit
33
34 static const TString fgReferenceFile; //! default for fReferenceFile
35
36 static const TString gsHistName; //! Default Histogram names
37 static const TString gsHistTitle; //! Default Histogram titles
38 static const TString gsHistXTitle; //! Default Histogram x-axis titles
39 static const TString gsHistYTitle; //! Default Histogram y-axis titles
40
41 static const TString gsAbsHistName; //! Default Histogram names abs.times
42 static const TString gsAbsHistTitle; //! Default Histogram titles abs.times
43 static const TString gsAbsHistXTitle; //! Default Histogram x-axis titles abs.times
44 static const TString gsAbsHistYTitle; //! Default Histogram y-axis titles abs.times
45
46 static const Float_t fgNumHiGainSaturationLimit; //! Default for fNumHiGainSaturationLimit
47 static const Float_t fgNumLoGainSaturationLimit; //! Default for fNumLoGainSaturationLimit
48 static const Float_t fgNumLoGainBlackoutLimit; //! Default for fNumLoGainBlackoutLimit (now at: 0.05)
49
50 static const Float_t fgLoGainBlackoutLimit; //! Default for low-gain blackout limit (now at: 3.5)
51 static const Float_t fgLoGainPickupLimit; //! Default for low-gian pickup limit (now at: 3.5)
52
53 static const Float_t fgTimeLowerLimit; //! Default for fTimeLowerLimit
54 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit
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 fNumLoGainBlackoutLimit; // Rel. amount blackout logain events until pixel is declared unsuitable
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 TString fReferenceFile; // File name containing the reference values
68
69 Float_t fInnerRefCharge; // The reference mean arrival time inner pixels
70 Float_t fOuterRefCharge; // The reference mean arrival time outer pixels
71
72 MArrayD fSumhiarea ; //!
73 MArrayD fSumloarea ; //!
74 MArrayD fTimehiarea ; //!
75 MArrayD fTimeloarea ; //!
76 MArrayD fSumhisector; //!
77 MArrayD fSumlosector; //!
78 MArrayD fTimehisector; //!
79 MArrayD fTimelosector; //!
80
81 MArrayI fSathiarea ; //!
82 MArrayI fSatloarea ; //!
83 MArrayI fSathisector; //!
84 MArrayI fSatlosector; //!
85
86 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (in units of FADC slices)
87 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (in units of FADC slices)
88 Byte_t fFirstHiGain; // First used slice High Gain
89 Byte_t fLastHiGain; // Last used slice High Gain
90 Byte_t fFirstLoGain; // First used slice Low Gain
91 Byte_t fLastLoGain; // Last used slice Low Gain
92
93 MRawEvtData *fRawEvt; //! Raw event data
94
95 Bool_t SetupHists(const MParList *pList);
96 Bool_t ReInitHists(MParList *pList);
97 Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
98
99 void InitHiGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
100 void InitLoGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
101
102 void FinalizeAbsTimes (MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad,
103 Byte_t first, Byte_t last);
104 Bool_t FinalizeHists();
105 void FinalizeBadPixels();
106
107 void DrawDataCheckPixel(MHCalibrationChargePix &pix, const Float_t refline);
108 void DisplayRefLines ( const TH1F *hist, const Float_t refline) const;
109
110 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print);
111
112public:
113
114 MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
115 ~MHCalibrationChargeCam() {}
116
117 // Clone
118 TObject *Clone(const char *name="") const;
119
120 // Draw
121 void Draw(const Option_t *opt);
122
123 void SetAbsHistName ( const char *name ) { fAbsHistName = name; }
124 void SetAbsHistTitle ( const char *name ) { fAbsHistTitle = name; }
125 void SetAbsHistXTitle ( const char *name ) { fAbsHistXTitle = name; }
126 void SetAbsHistYTitle ( const char *name ) { fAbsHistYTitle = name; }
127
128 void SetLoGainNbins ( const Int_t i ) { fLoGainNbins = i; }
129 void SetLoGainFirst ( const Axis_t f ) { fLoGainFirst = f; }
130 void SetLoGainLast ( const Axis_t f ) { fLoGainLast = f; }
131
132 void SetNumLoGainBlackoutLimit( const Float_t f=fgNumLoGainBlackoutLimit ) { fNumLoGainBlackoutLimit = f; }
133
134 void SetReferenceFile ( const TString ref=fgReferenceFile ) { fReferenceFile = ref; }
135
136 void SetTimeLowerLimit( const Float_t f=fgTimeLowerLimit ) { fTimeLowerLimit = f; }
137 void SetTimeUpperLimit( const Float_t f=fgTimeUpperLimit ) { fTimeUpperLimit = f; }
138
139 // MHCamEvent
140 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; }
141 void DrawPixelContent( Int_t num ) const;
142
143 ClassDef(MHCalibrationChargeCam, 2) // Histogram class for Charge Camera Calibration
144};
145
146#endif
Note: See TracBrowser for help on using the repository browser.