| 1 | #ifndef MARS_MExtractTimeAndChargeDigitalFilterPeakSearch | 
|---|
| 2 | #define MARS_MExtractTimeAndChargeDigitalFilterPeakSearch | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MARS_MExtractTimeAndChargeDigitalFilter | 
|---|
| 5 | #include "MExtractTimeAndChargeDigitalFilter.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef MARS_MArrayF | 
|---|
| 9 | #include "MArrayF.h" | 
|---|
| 10 | #endif | 
|---|
| 11 |  | 
|---|
| 12 | #ifndef MARS_MArrayI | 
|---|
| 13 | #include "MArrayI.h" | 
|---|
| 14 | #endif | 
|---|
| 15 |  | 
|---|
| 16 | class TH1F; | 
|---|
| 17 | class TH2F; | 
|---|
| 18 | class MPedestalPix; | 
|---|
| 19 | class MBadPixelsCam; | 
|---|
| 20 |  | 
|---|
| 21 | class MExtractTimeAndChargeDigitalFilterPeakSearch : public MExtractTimeAndChargeDigitalFilter | 
|---|
| 22 | { | 
|---|
| 23 | private: | 
|---|
| 24 |  | 
|---|
| 25 | static const Byte_t fgHiGainFirst;           //! Default for fHiGainFirst           (now set to: 0) | 
|---|
| 26 | static const Byte_t fgHiGainLast;            //! Default for fHiGainLast            (now set to:18) | 
|---|
| 27 | static const Byte_t fgLoGainFirst;           //! Default for fLoGainFirst           (now set to: 2) | 
|---|
| 28 | static const Byte_t fgLoGainLast;            //! Default for fLoGainLast            (now set to:14) | 
|---|
| 29 | static const Byte_t fgOffsetLeftFromPeak;    //! Default for fOffsetLeftFromPeak    (now set to: 1) | 
|---|
| 30 | static const Byte_t fgOffsetRightFromPeak;   //! Default for fOffsetRightFromPeak   (now set to: 2) | 
|---|
| 31 | static const Byte_t fgPeakSearchWindowSize;  //! Default for fPeakSearchWindowSize  (now set to: 2) | 
|---|
| 32 | static const Int_t  fgHiGainFailureLimit;    //! Default for fHiGainMaxFailureLimit (now set to: 5) | 
|---|
| 33 | static const Int_t  fgLoGainFailureLimit;    //! Default for fHiGainMaxFailureLimit (now set to: 10) | 
|---|
| 34 |  | 
|---|
| 35 | Byte_t  fOffsetLeftFromPeak;                 // Number of slices to start extraction before peak slice | 
|---|
| 36 | Byte_t  fOffsetRightFromPeak;                // Number of slices to stop  extraction after  peak slice | 
|---|
| 37 | Byte_t  fPeakSearchWindowSize;               // Size of FADC window in the search for the highest peak of all pixels. | 
|---|
| 38 | Int_t   fHiGainFailureLimit;                 // Limit for percentage of events ranging out of limits in high gain | 
|---|
| 39 | Int_t   fLoGainFailureLimit;                 // Limit for percentage of events ranging out of limits in low gain | 
|---|
| 40 |  | 
|---|
| 41 | ULong_t fHiGainOutOfRangeLeft;               // Number of events out of range to the left side in high gain | 
|---|
| 42 | ULong_t fHiGainOutOfRangeRight;              // Number of events out of range to the right side in high gain | 
|---|
| 43 | ULong_t fLoGainOutOfRangeLeft;               // Number of events out of range to the left side in low gain | 
|---|
| 44 | ULong_t fLoGainOutOfRangeRight;              // Number of events out of range to the right side in low gain | 
|---|
| 45 |  | 
|---|
| 46 | MBadPixelsCam *fBadPixels;                   // Bad Pixels Camera | 
|---|
| 47 |  | 
|---|
| 48 | void    FindPeak(Byte_t *ptr, Byte_t *logain, | 
|---|
| 49 | Byte_t &startslice, Int_t &max, Int_t &sat, Byte_t &satpos) const; | 
|---|
| 50 |  | 
|---|
| 51 | Int_t   PreProcess(MParList *pList); | 
|---|
| 52 | Int_t   Process(); | 
|---|
| 53 | Int_t   PostProcess(); | 
|---|
| 54 |  | 
|---|
| 55 | Int_t   ReadEnv(const TEnv &env, TString prefix, Bool_t print); | 
|---|
| 56 |  | 
|---|
| 57 | public: | 
|---|
| 58 |  | 
|---|
| 59 | MExtractTimeAndChargeDigitalFilterPeakSearch(const char *name=NULL, const char *title=NULL); | 
|---|
| 60 | ~MExtractTimeAndChargeDigitalFilterPeakSearch() { } | 
|---|
| 61 |  | 
|---|
| 62 | void SetOffsetLeftFromPeak  ( Byte_t offset=fgOffsetLeftFromPeak   )  { fOffsetLeftFromPeak   = offset; } | 
|---|
| 63 | void SetOffsetRightFromPeak ( Byte_t offset=fgOffsetRightFromPeak  )  { fOffsetRightFromPeak  = offset; } | 
|---|
| 64 | void SetPeakSearchWindowSize( Byte_t size  =fgPeakSearchWindowSize )  { fPeakSearchWindowSize = size;   } | 
|---|
| 65 | void SetHiGainFailureLimit  ( Int_t  lim   =fgHiGainFailureLimit   )  { fHiGainFailureLimit   = lim;    } | 
|---|
| 66 | void SetLoGainFailureLimit  ( Int_t  lim   =fgLoGainFailureLimit   )  { fLoGainFailureLimit   = lim;    } | 
|---|
| 67 |  | 
|---|
| 68 | void Print(Option_t *o="") const; | 
|---|
| 69 |  | 
|---|
| 70 | ClassDef(MExtractTimeAndChargeDigitalFilterPeakSearch, 1)   // Digital filter with global Peak Search | 
|---|
| 71 | }; | 
|---|
| 72 |  | 
|---|
| 73 | #endif | 
|---|