source: trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h@ 3948

Last change on this file since 3948 was 3925, checked in by gaug, 21 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MExtractFixedWindowPeakSearch
2#define MARS_MExtractFixedWindowPeakSearch
3
4#ifndef MARS_MExtractor
5#include "MExtractor.h"
6#endif
7
8class MExtractFixedWindowPeakSearch : public MExtractor
9{
10private:
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
33public:
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
Note: See TracBrowser for help on using the repository browser.