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 | Int_t Process();
|
---|
32 |
|
---|
33 | public:
|
---|
34 |
|
---|
35 | MExtractFixedWindowPeakSearch(const char *name=NULL, const char *title=NULL);
|
---|
36 |
|
---|
37 | void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
|
---|
38 | void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize,
|
---|
39 | Byte_t peaksearchwindow=fgPeakSearchWindowSize);
|
---|
40 | void SetOffsetFromPeak(Byte_t offset=fgOffsetFromPeak) { fOffsetFromPeak = offset; }
|
---|
41 |
|
---|
42 | ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif
|
---|