source: trunk/Mars/mhcalib/MHCalibrationChargeCam.h@ 18716

Last change on this file since 18716 was 8366, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 6.5 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 MExtractedSignalCam;
18class MCalibrationChargePix;
19class MHCalibrationChargePix;
20class MPedestalSubtractedEvt;
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
89 MPedestalSubtractedEvt *fRawEvt; //! Raw event data
90 MExtractedSignalCam *fSignal; //!
91
92 Bool_t SetupHists(const MParList *pList);
93 Bool_t ReInitHists(MParList *pList);
94 Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
95
96 void InitHiGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
97 void InitLoGainArrays( const Int_t npix, const Int_t nareas, const Int_t nsectors );
98
99 void FinalizeAbsTimes (MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad,
100 Int_t first, Int_t last);
101 Bool_t FinalizeHists();
102 void FinalizeBadPixels();
103
104 void DrawDataCheckPixel(MHCalibrationChargePix &pix, const Float_t refline);
105 void DisplayRefLines ( const TH1F *hist, const Float_t refline) const;
106
107 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print);
108
109public:
110
111 MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
112 ~MHCalibrationChargeCam() {}
113
114 // Clone
115 TObject *Clone(const char *name="") const;
116
117 // Draw
118 void Draw(const Option_t *opt);
119
120 void SetAbsHistName ( const char *name ) { fAbsHistName = name; }
121 void SetAbsHistTitle ( const char *name ) { fAbsHistTitle = name; }
122 void SetAbsHistXTitle ( const char *name ) { fAbsHistXTitle = name; }
123 void SetAbsHistYTitle ( const char *name ) { fAbsHistYTitle = name; }
124
125 void SetBinningLoGain(Int_t n, Axis_t lo, Axis_t up) { fLoGainNbins=n; fLoGainFirst=lo; fLoGainLast=up; }
126
127 void SetNumLoGainBlackoutLimit( const Float_t f=fgNumLoGainBlackoutLimit ) { fNumLoGainBlackoutLimit = f; }
128
129 void SetReferenceFile ( const TString ref=fgReferenceFile ) { fReferenceFile = ref; }
130
131 void SetTimeLowerLimit( const Float_t f=fgTimeLowerLimit ) { fTimeLowerLimit = f; }
132 void SetTimeUpperLimit( const Float_t f=fgTimeUpperLimit ) { fTimeUpperLimit = f; }
133
134 // MHCamEvent
135 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; }
136 void DrawPixelContent( Int_t num ) const;
137
138 ClassDef(MHCalibrationChargeCam, 3) // Histogram class for Charge Camera Calibration
139};
140
141#endif
Note: See TracBrowser for help on using the repository browser.