source: trunk/MagicSoft/Mars/mcalib/MCalibrateData.h@ 4661

Last change on this file since 4661 was 4632, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 4.1 KB
Line 
1#ifndef MARS_MCalibrateData
2#define MARS_MCalibrateData
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MCalibrateData //
7// //
8// Integrates the desired ADC time slices of one pixel and apply //
9// calibration constants //
10// //
11// Differences between MCalibrateData and MCalibrate : //
12// in MCalibrateData //
13// - in ReInit the MPedPhot container is filled using //
14// - the pedstals/slice from MPedestalCam //
15// - the number of used FADC slices from MExtractedSignalCam //
16// - the photon/ADC conversion factor from MCalibrationCam //
17// //
18/////////////////////////////////////////////////////////////////////////////
19#ifndef MARS_MTask
20#include "MTask.h"
21#endif
22
23class MGeomCam;
24class MBadPixelsCam;
25class MPedestalCam;
26class MCalibrationChargeCam;
27class MCalibrationQECam;
28class MExtractedSignalCam;
29
30class MPedPhotCam;
31class MCerPhotEvt;
32
33class MCalibrateData : public MTask
34{
35private:
36 static const TString fgNamePedADCContainer; //! "MPedestalCam"
37 static const TString fgNamePedPhotContainer; //! "MPedPhotCam"
38
39 MGeomCam *fGeomCam; //! Camera geometry container
40 MPedestalCam *fPedestal; //! Pedestals/slice [ADC counts]
41 MBadPixelsCam *fBadPixels; //! Bad Pixels information
42 MCalibrationChargeCam *fCalibrations; //! Calibration constants
43 MCalibrationQECam *fQEs; //! Quantum efficiencies
44 MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts
45
46 MPedPhotCam *fPedPhot; //! Pedestals/(used slices) [photons]
47 MCerPhotEvt *fCerPhotEvt; //! Cerenkov Photon Event used for calculation
48
49 UShort_t fCalibrationMode; // Flag defining the calibration mode (CalibrationMode_t)
50 Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run
51
52 TString fNamePedADCContainer; // name of fPedestal
53 TString fNamePedPhotContainer; // name of fPedPhot
54
55 Bool_t CalibratePedestal();
56 void CalibrateData();
57
58 Bool_t GetConversionFactor(UInt_t, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &);
59
60 Int_t PreProcess(MParList *pList);
61 Bool_t ReInit(MParList *pList);
62 Int_t Process();
63 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
64 void StreamPrimitive(ofstream &out) const;
65
66public:
67
68 enum CalibrationMode_t
69 {
70 kSkip = 0,
71 kNone = 1,
72 kFlatCharge = 2,
73 kBlindPixel = 3,
74 kFfactor = 4,
75 kPinDiode = 5,
76 kCombined = 6,
77 kDummy = 7
78 };
79
80 static const CalibrationMode_t kDefault = kFfactor;
81
82 enum PedestalType_t
83 {
84 kNo = BIT(0),
85 kRun = BIT(1),
86 kEvent = BIT(2)
87 };
88
89 MCalibrateData(CalibrationMode_t calmode=kDefault,
90 const char *name=NULL, const char *title=NULL);
91
92 void EnablePedestalType(PedestalType_t i) { fPedestalFlag |= i; }
93 void SetPedestalFlag(PedestalType_t i=kRun) { fPedestalFlag = i; }
94 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag & i; }
95
96 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; }
97
98 void SetNamePedADCContainer(const char *name=fgNamePedADCContainer.Data())
99 {
100 fNamePedADCContainer = name;
101 }
102 void SetNamePedPhotContainer(const char *name=fgNamePedPhotContainer.Data())
103 {
104 fNamePedPhotContainer = name;
105 }
106
107 ClassDef(MCalibrateData, 0) // Task to calibrate FADC counts into Cherenkov photons
108};
109
110#endif /* MCalibrateData */
111
112
113
114
115
116
Note: See TracBrowser for help on using the repository browser.