Changeset 4589 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 08/12/04 11:30:06 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r4581 r4589 4 4 ///////////////////////////////////////////////////////////////////////////// 5 5 // // 6 // MCalibrateData 6 // MCalibrateData // 7 7 // // 8 8 // Integrates the desired ADC time slices of one pixel and apply // 9 9 // calibration constants // 10 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 // // 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 // 18 17 // // 19 18 ///////////////////////////////////////////////////////////////////////////// … … 35 34 { 36 35 private: 37 MGeomCam *fCam;38 MPedestalCam *fPedestal; // Pedestals/slice [ADC counts]39 MPedestalCam *fPedestalFromData; // Pedestals/slice [ADC counts]40 MBadPixelsCam *fBadPixels; // Bad Pixels information41 MCalibrationChargeCam *fCalibrations; // Calibration constants42 MCalibrationQECam *fQEs; // Quantum efficiencies43 MExtractedSignalCam *fSignals; // Integrated charge in FADCs counts44 36 45 MPedPhotCam *fPedPhot; // Pedestals/(used slices) [photons] 46 MPedPhotCam *fPedPhotFromData;// Pedestals/(used slices) [photons] 47 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation 37 MGeomCam *fGeomCam; //! Camera geometry container 38 MPedestalCam *fPedestal; //! Pedestals/slice [ADC counts] 39 MPedestalCam *fPedestalFromData; //! Pedestals/slice [ADC counts] 40 MBadPixelsCam *fBadPixels; //! Bad Pixels information 41 MCalibrationChargeCam *fCalibrations; //! Calibration constants 42 MCalibrationQECam *fQEs; //! Quantum efficiencies 43 MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts 44 45 MPedPhotCam *fPedPhot; // Pedestals/(used slices) [photons] 46 MPedPhotCam *fPedPhotFromData; // Pedestals/(used slices) [photons] 47 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation 48 49 UShort_t fCalibrationMode; 50 Float_t fConversionHiLo; 51 Int_t fFlags; // Flags defining to calibrate the pedestal each event or each run 52 53 TString fNamePedADCRunContainer; // name of fPedestal 54 TString fNamePedADCEventContainer; // name of fPedestalFromData 55 TString fNamePedPhotRunContainer; // name of fPedPhot 56 TString fNamePedPhotEventContainer; // name of fPedPhotFromData 48 57 49 Float_t fNumUsedHiGainFADCSlices; 50 Float_t fNumUsedLoGainFADCSlices; 51 52 Float_t fConversionHiLo; 53 UShort_t fCalibrationMode; 54 55 Int_t fFlags; // Flags defining to calibrate the pedestal each event or each run 56 57 TString fNamePedADCRunContainer; // name of the 'MPedestalCam' container 58 TString fNamePedADCEventContainer; // name of the 'MPedestalCam' container 59 TString fNamePedPhotRunContainer; // name of the 'MPedestalCam' container 60 TString fNamePedPhotEventContainer; // name of the 'MPedestalCam' container 61 62 63 Bool_t CalibratePedestal(MPedestalCam *, MPedPhotCam *); 64 65 Bool_t GetConversionFactor(UInt_t, 58 Float_t fNumUsedHiGainFADCSlices; 59 Float_t fNumUsedLoGainFADCSlices; 60 61 Bool_t CalibratePedestal ( MPedestalCam *, MPedPhotCam * ); 62 63 Bool_t GetConversionFactor(UInt_t, 66 64 Float_t &, Float_t &, Float_t &, 67 65 Float_t &, Float_t &); 68 69 Int_t PreProcess(MParList *pList);70 Bool_t ReInit(MParList *pList);71 Int_t Process();72 66 67 Int_t PreProcess( MParList *pList ); 68 Bool_t ReInit ( MParList *pList ); 69 Int_t Process ( ); 70 73 71 public: 74 72 75 enum CalibrationMode_t {kNone=0,kFlatCharge=1,kBlindPixel,kFfactor,kPinDiode,kCombined, kDummy};76 static const CalibrationMode_t kDefault = kBlindPixel;73 enum CalibrationMode_t { kNone=0,kFlatCharge=1, 74 kBlindPixel,kFfactor,kPinDiode,kCombined, kDummy }; 77 75 78 enum PedestalType_t{ 79 kRun = BIT(0), 76 static const CalibrationMode_t kDefault = kFfactor; 77 78 enum PedestalType_t { 79 kRun = BIT(0), 80 80 kEvent = BIT(1) 81 81 }; 82 82 83 MCalibrateData( CalibrationMode_t calmode=kDefault, 84 const char *name=NULL, const char *title=NULL); 83 85 86 void DisablePedestalType( PedestalType_t i ) { fFlags &= ~i; } 87 void EnablePedestalType ( PedestalType_t i ) { fFlags |= i; } 88 void SetPedestalType ( PedestalType_t i ) { fFlags = i; } 89 Bool_t TestFlag ( PedestalType_t i ) const { return fFlags & i; } 84 90 85 MCalibrateData(CalibrationMode_t calmode = kDefault,const char *name=NULL, const char *title=NULL); 91 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; } 92 void SetConversionHiLo ( Float_t conv ) { fConversionHiLo = conv; } 86 93 87 void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }; 88 void SetCalibrationMode(CalibrationMode_t calmode=kDefault){ fCalibrationMode=calmode;}; 94 void SetNamePedADCRunContainer ( const char *name) { fNamePedADCRunContainer = name; } 95 void SetNamePedADCEventContainer ( const char *name) { fNamePedADCEventContainer = name; } 96 void SetNamePedPhotRunContainer ( const char *name) { fNamePedPhotRunContainer = name; } 97 void SetNamePedPhotEventContainer( const char *name) { fNamePedPhotEventContainer = name; } 89 98 90 void SetPedestalType(PedestalType_t i) { fFlags = i; } // Int_t f 91 void EnablePedestalType(PedestalType_t i) { fFlags |= i; } // Int_t f 92 void DisablePedestalType(PedestalType_t i) { fFlags &= ~i; } // Int_t f 93 Bool_t TestFlag(PedestalType_t i) const { return fFlags&i; } 94 95 96 void SetNamePedADCRunContainer(const char *name) { fNamePedADCRunContainer = name; } 97 void SetNamePedADCEventContainer(const char *name) { fNamePedADCEventContainer = name; } 98 99 void SetNamePedPhotRunContainer(const char *name) { fNamePedPhotRunContainer = name; } 100 void SetNamePedPhotEventContainer(const char *name) { fNamePedPhotEventContainer = name; } 101 102 103 ClassDef(MCalibrateData, 0) // Task to calculate cerenkov photons using calibration constants 99 ClassDef(MCalibrateData, 0) // Task to calibrate FADC counts into Cherenkov photons 104 100 }; 105 101
Note:
See TracChangeset
for help on using the changeset viewer.