| 1 | #ifndef MARS_MCalibrationRelTimeCalc
|
|---|
| 2 | #define MARS_MCalibrationRelTimeCalc
|
|---|
| 3 |
|
|---|
| 4 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 5 | // //
|
|---|
| 6 | // MCalibrationRelTimeCalc //
|
|---|
| 7 | // //
|
|---|
| 8 | // Integrates the time slices of the all pixels of a calibration event //
|
|---|
| 9 | // and substract the pedestal value //
|
|---|
| 10 | // //
|
|---|
| 11 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 12 |
|
|---|
| 13 | #ifndef MARS_MTask
|
|---|
| 14 | #include "MTask.h"
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | #ifndef MARS_MBadPixelsPix
|
|---|
| 18 | #include "MBadPixelsPix.h"
|
|---|
| 19 | #endif
|
|---|
| 20 |
|
|---|
| 21 | #ifndef MARS_MCalibrationRelTimeCam
|
|---|
| 22 | #include "MCalibrationRelTimeCam.h"
|
|---|
| 23 | #endif
|
|---|
| 24 |
|
|---|
| 25 | class MCalibrationRelTimePix;
|
|---|
| 26 | class MCalibrationRelTimeCam;
|
|---|
| 27 | class MGeomCam;
|
|---|
| 28 | class MBadPixelsCam;
|
|---|
| 29 | class MBadPixelsPix;
|
|---|
| 30 | class MCalibrationRelTimeCalc : public MTask
|
|---|
| 31 | {
|
|---|
| 32 | private:
|
|---|
| 33 |
|
|---|
| 34 | static const Float_t fgRelTimeResolutionLimit; //! Default for fRelTimeResolutionLimit (now set to: 0.75)
|
|---|
| 35 |
|
|---|
| 36 | // Variables
|
|---|
| 37 | Float_t fRelTimeResolutionLimit; // Limit acceptance rel. time resolution (in FADC slices)
|
|---|
| 38 | Byte_t fFlags; // Bit-field for the flags
|
|---|
| 39 |
|
|---|
| 40 | TString fOutputPath; // Path to the output file
|
|---|
| 41 | TString fOutputFile; // Name of the output file
|
|---|
| 42 |
|
|---|
| 43 | // Pointers
|
|---|
| 44 | MBadPixelsCam *fBadPixels; // Bad Pixels
|
|---|
| 45 | MCalibrationRelTimeCam *fCam; // Calibrated RelTimes of all pixels
|
|---|
| 46 | MGeomCam *fGeom; //! Camera geometry
|
|---|
| 47 |
|
|---|
| 48 | // enums
|
|---|
| 49 | enum { kHiLoGainCalibration };
|
|---|
| 50 |
|
|---|
| 51 | // functions
|
|---|
| 52 | const char* GetOutputFile();
|
|---|
| 53 | void FinalizeAverageResolution();
|
|---|
| 54 | void FinalizeRelTimes ();
|
|---|
| 55 | void FinalizeBadPixels ();
|
|---|
| 56 | void FinalizeUnsuitablePixels();
|
|---|
| 57 |
|
|---|
| 58 | void PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
|
|---|
| 59 |
|
|---|
| 60 | Int_t PreProcess (MParList *pList);
|
|---|
| 61 | Bool_t ReInit (MParList *pList);
|
|---|
| 62 | Int_t Process ();
|
|---|
| 63 | Int_t PostProcess();
|
|---|
| 64 |
|
|---|
| 65 | public:
|
|---|
| 66 |
|
|---|
| 67 | MCalibrationRelTimeCalc(const char *name=NULL, const char *title=NULL);
|
|---|
| 68 |
|
|---|
| 69 | void Clear(const Option_t *o="");
|
|---|
| 70 |
|
|---|
| 71 | void SetOutputPath ( TString path="." );
|
|---|
| 72 | void SetOutputFile ( TString file="TimeCalibStat.txt" ) { fOutputFile = file; }
|
|---|
| 73 | void SetRelTimeResolutionLimit ( const Float_t f=fgRelTimeResolutionLimit ) { fRelTimeResolutionLimit = f; }
|
|---|
| 74 |
|
|---|
| 75 | void SkipHiLoGainCalibration ( const Bool_t b=kTRUE )
|
|---|
| 76 | { b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration); }
|
|---|
| 77 |
|
|---|
| 78 | ClassDef(MCalibrationRelTimeCalc, 1) // Task finalizing the relative time Calibration
|
|---|
| 79 | };
|
|---|
| 80 |
|
|---|
| 81 | #endif
|
|---|