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

Last change on this file since 5817 was 5729, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.8 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 MGeomCam *fGeomCam; //! Camera geometry container
37 MBadPixelsCam *fBadPixels; //! Bad Pixels information
38 MCalibrationChargeCam *fCalibrations; //! Calibration constants
39 MCalibrationQECam *fQEs; //! Quantum efficiencies
40 MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts
41 MCerPhotEvt *fCerPhotEvt; //! Cerenkov Photon Event used for calculation
42
43 UShort_t fCalibrationMode; // Flag defining the calibration mode (CalibrationMode_t)
44 Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run
45
46 TList fNamesPedestal; // Names of input and output pedestal conatainer
47 TList fPedestalCams; //! List of pointers to input MPedestalCam
48 TList fPedPhotCams; //! List of pointers to corresponding output MPedPhotCam
49
50 Int_t Calibrate(Bool_t data, Bool_t pedestal) const;
51
52 Bool_t GetConversionFactor(UInt_t, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const;
53
54 Int_t PreProcess(MParList *pList);
55 Bool_t ReInit(MParList *pList);
56 Int_t Process();
57 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
58 void StreamPrimitive(ofstream &out) const;
59
60public:
61
62 enum CalibrationMode_t
63 {
64 kSkip = 0,
65 kNone = 1,
66 kFlatCharge = 2,
67 kBlindPixel = 3,
68 kFfactor = 4,
69 kPinDiode = 5,
70 kCombined = 6,
71 kDummy = 7
72 };
73
74 static const CalibrationMode_t kDefault = kFfactor;
75
76 enum PedestalType_t
77 {
78 kNo = BIT(0),
79 kRun = BIT(1),
80 kEvent = BIT(2)
81 };
82
83 MCalibrateData(CalibrationMode_t calmode=kDefault,
84 const char *name=NULL, const char *title=NULL);
85
86 void EnablePedestalType(PedestalType_t i) { fPedestalFlag |= i; }
87 void SetPedestalFlag(PedestalType_t i=kRun) { fPedestalFlag = i; }
88 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag&i ? kTRUE : kFALSE; }
89
90 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; }
91
92 void AddPedestal(const char *name="Cam");
93 void AddPedestal(const char *pedestal, const char *pedphot);
94
95 ClassDef(MCalibrateData, 0) // Task to calibrate FADC counts into Cherenkov photons
96};
97
98#endif /* MCalibrateData */
99
100
101
102
103
104
Note: See TracBrowser for help on using the repository browser.