source: tags/Mars-V0.9.4.1/msignal/MExtractFixedWindowPeakSearch.h

Last change on this file was 6114, checked in by mazin, 20 years ago
*** empty log message ***
File size: 2.8 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; //! Default for fHiGainFirst (now set to: 0)
13 static const Byte_t fgHiGainLast; //! Default for fHiGainLast (now set to: 16)
14 static const Byte_t fgLoGainFirst; //! Default for fLoGainFirst (now set to: 3)
15 static const Byte_t fgLoGainLast; //! Default for fLoGainLast (now set to: 14)
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: 1)
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, Byte_t &satpos) 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 Byte_t GetHiGainWindowSize() const { return fHiGainWindowSize; }
42 Byte_t GetLoGainWindowSize() const { return fLoGainWindowSize; }
43
44 void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
45 void SetWindows(Byte_t windowh=fgHiGainWindowSize, Byte_t windowl=fgLoGainWindowSize,
46 Byte_t peaksearchwindow=fgPeakSearchWindowSize);
47 void SetOffsetFromWindow(Byte_t offset=fgOffsetFromWindow) { fOffsetFromWindow = offset; }
48
49 void SetLoGainPeakShift(Byte_t shift=fgLoGainPeakShift) { fLoGainPeakShift = shift; }
50
51 void Print(Option_t *o="") const;
52
53 ClassDef(MExtractFixedWindowPeakSearch, 1) // Signal Extractor for fixed size trigger-corrected extraction window
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.