source: trunk/Mars/msignal/MExtractTimeAndChargeSlidingWindow.h@ 17826

Last change on this file since 17826 was 7043, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.2 KB
Line 
1#ifndef MARS_MExtractTimeAndChargeSlidingWindow
2#define MARS_MExtractTimeAndChargeSlidingWindow
3
4#ifndef MARS_MExtractTimeAndCharge
5#include "MExtractTimeAndCharge.h"
6#endif
7
8#ifndef MARS_MArrayF
9#include "MArrayF.h"
10#endif
11
12class MPedestalPix;
13
14class MExtractTimeAndChargeSlidingWindow : public MExtractTimeAndCharge
15{
16private:
17 static const Byte_t fgHiGainFirst; //! Default for fHiGainFirst (now set to: 2)
18 static const Byte_t fgHiGainLast; //! Default for fHiGainLast (now set to: 14)
19 static const Byte_t fgLoGainFirst; //! Default for fLOGainFirst (now set to: 2)
20 static const Byte_t fgLoGainLast; //! Default for fLoGainLast (now set to: 14)
21 static const Byte_t fgHiGainWindowSize; //! The extraction window Hi-Gain
22 static const Byte_t fgLoGainWindowSize; //! The extraction window Lo-Gain
23
24 Float_t fHiGainWindowSizeSqrt; // Square root of number of gains in window
25 Float_t fLoGainWindowSizeSqrt; // Square root of number of gains in window
26
27 MArrayF fHiGainSignal; //! Need fast access to the signals in a float way
28 MArrayF fLoGainSignal; //! Store them in separate arrays
29
30 Bool_t InitArrays();
31
32 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
33
34public:
35
36 MExtractTimeAndChargeSlidingWindow(const char *name=NULL, const char *title=NULL);
37 ~MExtractTimeAndChargeSlidingWindow() {}
38
39 void SetRange ( Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0 );
40 void SetWindowSize(Int_t windowh=fgHiGainWindowSize,
41 Int_t windowl=fgLoGainWindowSize);
42
43 void FindTimeAndChargeHiGain(Byte_t *first, Byte_t *logain, Float_t &sum, Float_t &dsum,
44 Float_t &time, Float_t &dtime,
45 Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
46 void FindTimeAndChargeLoGain(Byte_t *first, Float_t &sum, Float_t &dsum,
47 Float_t &time, Float_t &dtime,
48 Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
49
50 ClassDef(MExtractTimeAndChargeSlidingWindow, 1) // Task to Extract Times and Charges using a Sliding Window
51};
52
53#endif
54
55
56
Note: See TracBrowser for help on using the repository browser.