| 1 | #ifndef MARS_MCalibrationCalc
|
|---|
| 2 | #define MARS_MCalibrationCalc
|
|---|
| 3 |
|
|---|
| 4 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 5 | // //
|
|---|
| 6 | // MCalibrationCalc //
|
|---|
| 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 ROOT_TArrayI
|
|---|
| 18 | #include "TArrayI.h"
|
|---|
| 19 | #endif
|
|---|
| 20 |
|
|---|
| 21 | #ifndef MARS_MCalibrationCam
|
|---|
| 22 | #include "MCalibrationCam.h"
|
|---|
| 23 | #endif
|
|---|
| 24 |
|
|---|
| 25 | #include "TString.h"
|
|---|
| 26 |
|
|---|
| 27 | class MRawEvtData;
|
|---|
| 28 | class MRawRunHeader;
|
|---|
| 29 |
|
|---|
| 30 | class MPedestalCam;
|
|---|
| 31 | class MCalibrationCam;
|
|---|
| 32 | class MExtractedSignalCam;
|
|---|
| 33 | class MExtractedSignalBlindPixel;
|
|---|
| 34 |
|
|---|
| 35 | class MTime;
|
|---|
| 36 |
|
|---|
| 37 | class MCalibrationCalc : public MTask
|
|---|
| 38 | {
|
|---|
| 39 | private:
|
|---|
| 40 |
|
|---|
| 41 | static const UInt_t fgBlindPixelIdx; // ID of the blind pixel
|
|---|
| 42 | static const UInt_t fgPINDiodeIdx; // ID of the PIN Diode
|
|---|
| 43 | static const UInt_t fgBlindPixelSinglePheCut; // FADC sum from which on an event is considered as a S.ph. one.
|
|---|
| 44 |
|
|---|
| 45 | MPedestalCam *fPedestals; // Pedestals of all pixels in the camera
|
|---|
| 46 | MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera
|
|---|
| 47 | MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera
|
|---|
| 48 | MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the blind pixel
|
|---|
| 49 |
|
|---|
| 50 | MRawEvtData *fRawEvt; // raw event data (time slices)
|
|---|
| 51 | MRawRunHeader *fRunHeader; // RunHeader information
|
|---|
| 52 |
|
|---|
| 53 | MTime *fEvtTime; // Time of the event
|
|---|
| 54 |
|
|---|
| 55 | UInt_t fBlindPixelIdx;
|
|---|
| 56 | UInt_t fPINDiodeIdx;
|
|---|
| 57 |
|
|---|
| 58 | Byte_t fNumHiGainSamples;
|
|---|
| 59 | Byte_t fNumLoGainSamples;
|
|---|
| 60 | Float_t fSqrtHiGainSamples;
|
|---|
| 61 |
|
|---|
| 62 | UInt_t fBlindPixelSinglePheCut;
|
|---|
| 63 |
|
|---|
| 64 | Int_t fNumBlindPixelSinglePhe;
|
|---|
| 65 | Int_t fNumBlindPixelPedestal;
|
|---|
| 66 |
|
|---|
| 67 | Float_t fConversionHiLo;
|
|---|
| 68 | Int_t fFlags; // Flag for the fits used
|
|---|
| 69 |
|
|---|
| 70 | TString fExcludedPixelsFile;
|
|---|
| 71 | UInt_t fNumExcludedPixels;
|
|---|
| 72 |
|
|---|
| 73 | enum { kUseBlindPixelFit,
|
|---|
| 74 | kUseQualityChecks,
|
|---|
| 75 | kHiLoGainCalibration,
|
|---|
| 76 | kHiGainOverFlow,
|
|---|
| 77 | kLoGainOverFlow };
|
|---|
| 78 |
|
|---|
| 79 | public:
|
|---|
| 80 |
|
|---|
| 81 | enum PulserColor_t { kEGreen, kEBlue, kEUV, kECT1 };
|
|---|
| 82 |
|
|---|
| 83 | private:
|
|---|
| 84 |
|
|---|
| 85 | PulserColor_t fColor;
|
|---|
| 86 |
|
|---|
| 87 | Bool_t ReInit(MParList *pList);
|
|---|
| 88 | Int_t PreProcess(MParList *pList);
|
|---|
| 89 | Int_t Process();
|
|---|
| 90 | Int_t PostProcess();
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 | public:
|
|---|
| 94 |
|
|---|
| 95 | MCalibrationCalc(const char *name=NULL, const char *title=NULL);
|
|---|
| 96 |
|
|---|
| 97 | void Clear(const Option_t *o="");
|
|---|
| 98 |
|
|---|
| 99 | void SkipBlindPixelFit(Bool_t b=kTRUE)
|
|---|
| 100 | {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
|
|---|
| 101 | void SkipQualityChecks(Bool_t b=kTRUE)
|
|---|
| 102 | {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
|
|---|
| 103 | void SkipHiLoGainCalibration(Bool_t b=kTRUE)
|
|---|
| 104 | {b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration);}
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | // Setters
|
|---|
| 108 | void SetPulserColor(PulserColor_t color) { fColor = color; }
|
|---|
| 109 | void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }
|
|---|
| 110 |
|
|---|
| 111 | void SetBlindPixelSinglePheCut(const Int_t cut=fgBlindPixelSinglePheCut)
|
|---|
| 112 | { fBlindPixelSinglePheCut = cut; }
|
|---|
| 113 |
|
|---|
| 114 | void SetPINDiodeIdx(const UInt_t idx=fgPINDiodeIdx) { fPINDiodeIdx = idx; }
|
|---|
| 115 | void SetBlindPixelIdx(const UInt_t idx=fgBlindPixelIdx) { fBlindPixelIdx = idx; }
|
|---|
| 116 |
|
|---|
| 117 | // Getters
|
|---|
| 118 | MCalibrationBlindPix *GetBlindPixel() const;
|
|---|
| 119 |
|
|---|
| 120 | // Exclude pixels from configuration file
|
|---|
| 121 | void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
|
|---|
| 122 |
|
|---|
| 123 | ClassDef(MCalibrationCalc, 1) // Task to fill the Calibration Containers from raw data
|
|---|
| 124 | };
|
|---|
| 125 |
|
|---|
| 126 | #endif
|
|---|