| 1 | #ifndef MARS_MBadPixelsTreat
|
|---|
| 2 | #define MARS_MBadPixelsTreat
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MGeomCam;
|
|---|
| 9 | class MCerPhotEvt;
|
|---|
| 10 | class MPedPhotCam;
|
|---|
| 11 | class MBadPixelsCam;
|
|---|
| 12 |
|
|---|
| 13 | class MBadPixelsTreat : public MTask
|
|---|
| 14 | {
|
|---|
| 15 | private:
|
|---|
| 16 | MGeomCam *fGeomCam; //!
|
|---|
| 17 | MPedPhotCam *fPedPhot; //!
|
|---|
| 18 | MCerPhotEvt *fEvt; //!
|
|---|
| 19 | MBadPixelsCam *fBadPixels; //!
|
|---|
| 20 |
|
|---|
| 21 | Byte_t fFlags; // flag for the method which is used
|
|---|
| 22 | Byte_t fNumMinNeighbors;
|
|---|
| 23 |
|
|---|
| 24 | enum
|
|---|
| 25 | {
|
|---|
| 26 | kUseInterpolation = 1,
|
|---|
| 27 | kUseCentralPixel = 2,
|
|---|
| 28 | kProcessRMS = 3,
|
|---|
| 29 | kSloppyTreatment = 4
|
|---|
| 30 | };
|
|---|
| 31 |
|
|---|
| 32 | static Double_t Pow2(Double_t x) { return x*x; }
|
|---|
| 33 |
|
|---|
| 34 | void InterpolateSignal() const;
|
|---|
| 35 | void InterpolatePedestals() const;
|
|---|
| 36 |
|
|---|
| 37 | void Unmap() const;
|
|---|
| 38 | void StreamPrimitive(ofstream &out) const;
|
|---|
| 39 |
|
|---|
| 40 | Bool_t ReInit(MParList *pList);
|
|---|
| 41 | Int_t PreProcess(MParList *pList);
|
|---|
| 42 | Int_t Process();
|
|---|
| 43 |
|
|---|
| 44 | Bool_t IsPixelBad(Int_t idx) const;
|
|---|
| 45 |
|
|---|
| 46 | public:
|
|---|
| 47 | MBadPixelsTreat(const char *name=NULL, const char *title=NULL);
|
|---|
| 48 |
|
|---|
| 49 | void SetUseInterpolation(Bool_t b=kTRUE)
|
|---|
| 50 | {
|
|---|
| 51 | b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
|
|---|
| 52 | }
|
|---|
| 53 | void SetUseCentralPixel(Bool_t b=kTRUE)
|
|---|
| 54 | {
|
|---|
| 55 | b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
|
|---|
| 56 | }
|
|---|
| 57 | void SetProcessRMS(Bool_t b=kTRUE)
|
|---|
| 58 | {
|
|---|
| 59 | b ? SETBIT(fFlags, kProcessRMS) : CLRBIT(fFlags, kProcessRMS);
|
|---|
| 60 | }
|
|---|
| 61 | void SetSloppyTreatment(Bool_t b=kTRUE)
|
|---|
| 62 | {
|
|---|
| 63 | b ? SETBIT(fFlags, kSloppyTreatment) : CLRBIT(fFlags, kSloppyTreatment);
|
|---|
| 64 | }
|
|---|
| 65 | void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 | ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping)
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | #endif
|
|---|
| 72 |
|
|---|