| 1 | #ifndef MARS_MCalibrationCalc
|
|---|
| 2 | #define MARS_MCalibrationCalc
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MPedestalCam;
|
|---|
| 9 | class MCalibrationCam;
|
|---|
| 10 | class MExtractedSignalCam;
|
|---|
| 11 |
|
|---|
| 12 | class MCalibrationBlindPix;
|
|---|
| 13 | class MCalibrationPINDiode;
|
|---|
| 14 |
|
|---|
| 15 | class MTime;
|
|---|
| 16 | class MRawEvtData;
|
|---|
| 17 | class MRawRunHeader;
|
|---|
| 18 |
|
|---|
| 19 | class MCalibrationCalc : public MTask
|
|---|
| 20 | {
|
|---|
| 21 | private:
|
|---|
| 22 |
|
|---|
| 23 | MPedestalCam *fPedestals; // Pedestals of all pixels in the camera
|
|---|
| 24 | MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera
|
|---|
| 25 | MExtractedSignalCam *fSignals; // Calibration events of all pixels in the camera
|
|---|
| 26 |
|
|---|
| 27 | MRawEvtData *fRawEvt; // raw event data (time slices)
|
|---|
| 28 | MRawRunHeader *fRunHeader; // RunHeader information
|
|---|
| 29 |
|
|---|
| 30 | MTime *fEvtTime; // Time of the event
|
|---|
| 31 |
|
|---|
| 32 | Int_t fEvents; // Number of events
|
|---|
| 33 | Int_t fHistOverFlow; // Number of events with saturated Low Gain
|
|---|
| 34 | Int_t fCosmics; // Number of events due to supposed cosmics
|
|---|
| 35 |
|
|---|
| 36 | Byte_t fNumHiGainSamples;
|
|---|
| 37 | Byte_t fNumLoGainSamples;
|
|---|
| 38 | Float_t fSqrtHiGainSamples;
|
|---|
| 39 |
|
|---|
| 40 | Float_t fConversionHiLo;
|
|---|
| 41 | Byte_t fFlags; // Flag for the fits used
|
|---|
| 42 |
|
|---|
| 43 | TString fExcludedPixelsFile;
|
|---|
| 44 | UInt_t fNumExcludedPixels;
|
|---|
| 45 |
|
|---|
| 46 | public:
|
|---|
| 47 |
|
|---|
| 48 | enum PulserColor_t { kEGreen, kEBlue, kEUV, kECT1 };
|
|---|
| 49 |
|
|---|
| 50 | private:
|
|---|
| 51 |
|
|---|
| 52 | PulserColor_t fColor;
|
|---|
| 53 |
|
|---|
| 54 | Bool_t ReInit(MParList *pList);
|
|---|
| 55 | Int_t PreProcess(MParList *pList);
|
|---|
| 56 | Int_t Process();
|
|---|
| 57 | Int_t PostProcess();
|
|---|
| 58 |
|
|---|
| 59 | public:
|
|---|
| 60 |
|
|---|
| 61 | MCalibrationCalc(const char *name=NULL, const char *title=NULL);
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 | private:
|
|---|
| 65 |
|
|---|
| 66 | enum { kUseTimeFits, kUseBlindPixelFit, kUsePinDiodeFit };
|
|---|
| 67 |
|
|---|
| 68 | public:
|
|---|
| 69 |
|
|---|
| 70 | // Skipping fits
|
|---|
| 71 | void SkipTimeFits(Bool_t b=kTRUE)
|
|---|
| 72 | {b ? CLRBIT(fFlags, kUseTimeFits) : SETBIT(fFlags, kUseTimeFits);}
|
|---|
| 73 | void SkipBlindPixelFit(Bool_t b=kTRUE)
|
|---|
| 74 | {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
|
|---|
| 75 | void SkipPinDiodeFit(Bool_t b=kTRUE)
|
|---|
| 76 | {b ? CLRBIT(fFlags, kUsePinDiodeFit) : SETBIT(fFlags, kUsePinDiodeFit);}
|
|---|
| 77 |
|
|---|
| 78 | // Setters
|
|---|
| 79 | void SetPulserColor(PulserColor_t color) { fColor = color; }
|
|---|
| 80 | void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }
|
|---|
| 81 |
|
|---|
| 82 | // Getters
|
|---|
| 83 | MCalibrationBlindPix *GetBlindPixel() const;
|
|---|
| 84 | MCalibrationPINDiode *GetPINDiode() const;
|
|---|
| 85 |
|
|---|
| 86 | // Exclude pixels from configuration file
|
|---|
| 87 | void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
|
|---|
| 88 |
|
|---|
| 89 | ClassDef(MCalibrationCalc, 1) // Task to fill the Calibration Containers from raw data
|
|---|
| 90 | };
|
|---|
| 91 |
|
|---|
| 92 | #endif
|
|---|