| 1 | #ifndef MARS_MExtractFixedWindowPeakSearch
|
|---|
| 2 | #define MARS_MExtractFixedWindowPeakSearch
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MExtractor
|
|---|
| 5 | #include "MExtractor.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MExtractFixedWindowPeakSearch : public MExtractor
|
|---|
| 9 | {
|
|---|
| 10 | private:
|
|---|
| 11 |
|
|---|
| 12 | static const Byte_t fgHiGainFirst;
|
|---|
| 13 | static const Byte_t fgHiGainLast;
|
|---|
| 14 | static const Byte_t fgLoGainFirst;
|
|---|
| 15 | static const Byte_t fgLoGainLast;
|
|---|
| 16 | static const Byte_t fgHiGainWindowSize; // Default for fWindowSizeHiGain (now set to: 6)
|
|---|
| 17 | static const Byte_t fgLoGainWindowSize; // Default for fWindowSizeLoGain (now set to: 6)
|
|---|
| 18 | static const Byte_t fgPeakSearchWindowSize; // Default for fPeakSearchWindowSize (now set to: 4)
|
|---|
| 19 | static const Byte_t fgOffsetFromPeak; // Default for fOffsetFromPeak (now set to: 2)
|
|---|
| 20 |
|
|---|
| 21 | Byte_t fWindowSizeHiGain; // Number of Hi Gain slices in window
|
|---|
| 22 | Byte_t fWindowSizeLoGain; // Number of Lo Gain slices in window
|
|---|
| 23 | Byte_t fPeakSearchWindowSize; // Size of FADC window in the search for the highest peak of all pixels.
|
|---|
| 24 | Byte_t fOffsetFromPeak; // Number of slices to start extraction from global peak
|
|---|
| 25 |
|
|---|
| 26 | void FindSignalHiGain(Byte_t *ptr, Byte_t *logain, Int_t &sum, Byte_t &sat) const;
|
|---|
| 27 | void FindSignalLoGain(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
|
|---|
| 28 |
|
|---|
| 29 | void FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, Int_t &signal, Int_t &sat) const;
|
|---|
| 30 |
|
|---|
| 31 | Bool_t ReInit(MParList *pList);
|
|---|
| 32 | Int_t Process();
|
|---|
| 33 |
|
|---|
| 34 | public:
|
|---|
| 35 |
|
|---|
| 36 | MExtractFixedWindowPeakSearch(const char *name=NULL, const char *title=NULL);
|
|---|
| 37 |
|
|---|
| 38 | void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
|
|---|
| 39 | void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize,
|
|---|
| 40 | Byte_t peaksearchwindow=fgPeakSearchWindowSize);
|
|---|
| 41 | void SetOffsetFromPeak(Byte_t offset=fgOffsetFromPeak) { fOffsetFromPeak = offset; }
|
|---|
| 42 |
|
|---|
| 43 | ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window
|
|---|
| 44 | };
|
|---|
| 45 |
|
|---|
| 46 | #endif
|
|---|