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

Last change on this file since 5130 was 4723, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.4 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 fgLoGainPeakShift; // Default for fLowGainPeakShift (now set to: 0)
21
22 Byte_t fHiGainWindowSize; // Number of Hi Gain slices in window
23 Byte_t fLoGainWindowSize; // 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 fLoGainPeakShift; // 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 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
36
37public:
38
39 MExtractFixedWindowPeakSearch(const char *name=NULL, const char *title=NULL);
40
41 void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
42 void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize,
43 Byte_t peaksearchwindow=fgPeakSearchWindowSize);
44 void SetOffsetFromWindow(Byte_t offset=fgOffsetFromWindow) { fOffsetFromWindow = offset; }
45
46 void SetLoGainPeakShift(Byte_t shift=fgLoGainPeakShift) { fLoGainPeakShift = shift; }
47
48 void Print(Option_t *o="") const;
49
50 ClassDef(MExtractFixedWindowPeakSearch, 1) // Signal Extractor for fixed size trigger-corrected extraction window
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.