source: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.h@ 5505

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