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

Last change on this file since 4693 was 4340, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.3 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 fgOffsetFromWindow; // Default for fOffsetFromWindow (now set to: 1)
20 static const Byte_t fgLowGainPeakShift; // Default for fLowGainPeakShift (now set to: 0)
21
22 Byte_t fWindowSizeHiGain; // Number of Hi Gain slices in window
23 Byte_t fWindowSizeLoGain; // Number of Lo Gain slices in window
24 Byte_t fPeakSearchWindowSize; // Size of FADC window in the search for the highest peak of all pixels.
25 Byte_t fOffsetFromWindow; // Number of slices to start extraction before search window
26 Byte_t fLowGainPeakShift; // Shift of the low gain pulse with respect to the high gain pulse, in slices: it is 0 if the low gain is delayed with respect to HG by 15 slices.
27
28 void FindSignalHiGain(Byte_t *ptr, Byte_t *logain, Float_t &sum, Byte_t &sat) const;
29 void FindSignalLoGain(Byte_t *ptr, Float_t &sum, Byte_t &sat) const;
30
31 void FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, Int_t &signal, Int_t &sat) const;
32
33 Bool_t ReInit(MParList *pList);
34 Int_t Process();
35
36public:
37
38 MExtractFixedWindowPeakSearch(const char *name=NULL, const char *title=NULL);
39
40 void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
41 void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize,
42 Byte_t peaksearchwindow=fgPeakSearchWindowSize);
43 void SetOffsetFromWindow(Byte_t offset=fgOffsetFromWindow) { fOffsetFromWindow = offset; }
44
45 void SetLowGainPeakShift(Byte_t shift=fgLowGainPeakShift) { fLowGainPeakShift = shift; }
46
47 ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.