| 1 | #ifndef MARS_MBlindPixelsCalc2
|
|---|
| 2 | #define MARS_MBlindPixelsCalc2
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef ROOT_TArrayS
|
|---|
| 9 | #include <TArrayS.h>
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | #ifndef ROOT_TArrayL
|
|---|
| 13 | #include <TArrayL.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | class MGeomCam;
|
|---|
| 17 | class MCerPhotEvt;
|
|---|
| 18 | class MBlindPixels;
|
|---|
| 19 |
|
|---|
| 20 | class MPedPhotCam;
|
|---|
| 21 |
|
|---|
| 22 | class MBlindPixelsCalc2 : public MTask
|
|---|
| 23 | {
|
|---|
| 24 | private:
|
|---|
| 25 | MCerPhotEvt *fEvt; //!
|
|---|
| 26 | MBlindPixels *fPixels; //!
|
|---|
| 27 | MGeomCam *fGeomCam; //!
|
|---|
| 28 | MPedPhotCam *fPed; //!
|
|---|
| 29 |
|
|---|
| 30 | TArrayS fPixelsIdx; // Pixel Indices for blind pixels, which are entered by the user.
|
|---|
| 31 | Byte_t fFlags; // flag for the method which is used
|
|---|
| 32 |
|
|---|
| 33 | enum
|
|---|
| 34 | {
|
|---|
| 35 | kUseInterpolation = 1,
|
|---|
| 36 | kUseCentralPixel = 2,
|
|---|
| 37 | kCheckPedestalRms = 3,
|
|---|
| 38 | kUseBlindPixels = 4
|
|---|
| 39 | };
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | static Double_t Pow2(Double_t x) { return x*x; }
|
|---|
| 43 |
|
|---|
| 44 | void Interpolate() const;
|
|---|
| 45 | void InterpolatePedestals() const;
|
|---|
| 46 | void Unmap() const;
|
|---|
| 47 | Bool_t CheckPedestalRms() ;
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | void PrintSkipped(int i, const char *str) const;
|
|---|
| 51 |
|
|---|
| 52 | void StreamPrimitive(ofstream &out) const;
|
|---|
| 53 |
|
|---|
| 54 | Int_t PreProcess(MParList *pList);
|
|---|
| 55 | Int_t Process();
|
|---|
| 56 | Int_t PostProcess();
|
|---|
| 57 |
|
|---|
| 58 | TArrayL fErrors;
|
|---|
| 59 |
|
|---|
| 60 | public:
|
|---|
| 61 |
|
|---|
| 62 | MBlindPixelsCalc2(const char *name=NULL, const char *title=NULL);
|
|---|
| 63 |
|
|---|
| 64 | void SetUseInterpolation(Bool_t b=kTRUE)
|
|---|
| 65 | {
|
|---|
| 66 | b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
|
|---|
| 67 | }
|
|---|
| 68 | void SetUseCentralPixel(Bool_t b=kTRUE)
|
|---|
| 69 | {
|
|---|
| 70 | b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
|
|---|
| 71 | }
|
|---|
| 72 | void SetCheckPedestalRms(Bool_t b=kTRUE)
|
|---|
| 73 | {
|
|---|
| 74 | b ? SETBIT(fFlags,kCheckPedestalRms) : CLRBIT(fFlags, kCheckPedestalRms);
|
|---|
| 75 | }
|
|---|
| 76 | void SetUseBlindPixels(Bool_t b=kTRUE)
|
|---|
| 77 | {
|
|---|
| 78 | b ? SETBIT(fFlags, kUseBlindPixels) : CLRBIT(fFlags, kUseBlindPixels);
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | void SetPixelIndices(const TArrayS &pix) { fPixelsIdx = pix; }
|
|---|
| 82 |
|
|---|
| 83 | virtual Bool_t ReInit(MParList *pList);
|
|---|
| 84 |
|
|---|
| 85 | ClassDef(MBlindPixelsCalc2, 1) // (temp!)task to deal with hot spots (star, broken pixels, etc)
|
|---|
| 86 | };
|
|---|
| 87 |
|
|---|
| 88 | #endif
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|