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

Last change on this file since 4609 was 4603, checked in by gaug, 20 years ago
*** empty log message ***
File size: 4.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
37 static const TString fgNamePedADCRunContainer; //! "MPedestalCam"
38 static const TString fgNamePedADCEventContainer; //! "MPedestalCamFromData"
39 static const TString fgNamePedPhotRunContainer; //! "MPedPhotCam"
40 static const TString fgNamePedPhotEventContainer; //! "MPedPhotCamFromData"
41
42 MGeomCam *fGeomCam; //! Camera geometry container
43 MPedestalCam *fPedestal; //! Pedestals/slice [ADC counts]
44 MPedestalCam *fPedestalFromData; //! Pedestals/slice [ADC counts]
45 MBadPixelsCam *fBadPixels; //! Bad Pixels information
46 MCalibrationChargeCam *fCalibrations; //! Calibration constants
47 MCalibrationQECam *fQEs; //! Quantum efficiencies
48 MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts
49
50 MPedPhotCam *fPedPhot; // Pedestals/(used slices) [photons]
51 MPedPhotCam *fPedPhotFromData; // Pedestals/(used slices) [photons]
52 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation
53
54 UShort_t fCalibrationMode; // Flag defining the calibration mode (CalibrationMode_t)
55 Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run
56
57 TString fNamePedADCRunContainer; // name of fPedestal
58 TString fNamePedADCEventContainer; // name of fPedestalFromData
59 TString fNamePedPhotRunContainer; // name of fPedPhot
60 TString fNamePedPhotEventContainer; // name of fPedPhotFromData
61
62 Bool_t CalibratePedestal ( MPedestalCam *, MPedPhotCam * );
63
64 Bool_t GetConversionFactor(UInt_t,
65 Float_t &, Float_t &, Float_t &,
66 Float_t &, Float_t &);
67
68 Int_t PreProcess( MParList *pList );
69 Bool_t ReInit ( MParList *pList );
70 Int_t Process ( );
71
72 void StreamPrimitive( ofstream &out ) const;
73
74public:
75
76 enum CalibrationMode_t { kNone=0,kFlatCharge=1,
77 kBlindPixel=2,kFfactor=3,kPinDiode=4,kCombined=5, kDummy=6 };
78
79 static const CalibrationMode_t kDefault = kFfactor;
80
81 enum PedestalType_t {
82 kNo = BIT(0),
83 kRun = BIT(1),
84 kEvent = BIT(2)
85 };
86
87 MCalibrateData( CalibrationMode_t calmode=kDefault,
88 const char *name=NULL, const char *title=NULL);
89
90 void EnablePedestalType ( PedestalType_t i ) { fPedestalFlag |= i; }
91 void SetPedestalType ( PedestalType_t i=kRun ) { fPedestalFlag = i; }
92 Bool_t TestFlag ( PedestalType_t i ) const { return fPedestalFlag & i; }
93
94 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; }
95
96 void SetNamePedADCRunContainer ( const char *name=fgNamePedADCRunContainer ) {
97 fNamePedADCRunContainer = name; }
98 void SetNamePedADCEventContainer ( const char *name=fgNamePedADCEventContainer ) {
99 fNamePedADCEventContainer = name; }
100 void SetNamePedPhotRunContainer ( const char *name=fgNamePedPhotRunContainer ) {
101 fNamePedPhotRunContainer = name; }
102 void SetNamePedPhotEventContainer( const char *name=fgNamePedPhotEventContainer) {
103 fNamePedPhotEventContainer = name; }
104
105 ClassDef(MCalibrateData, 0) // Task to calibrate FADC counts into Cherenkov photons
106};
107
108#endif /* MCalibrateData */
109
110
111
112
113
114
Note: See TracBrowser for help on using the repository browser.