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