1 | #ifndef MARS_MExtractTimeAndChargeDigitalFilter
|
---|
2 | #define MARS_MExtractTimeAndChargeDigitalFilter
|
---|
3 |
|
---|
4 | #ifndef MARS_MExtractTimeAndCharge
|
---|
5 | #include "MExtractTimeAndCharge.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MPedestalPix;
|
---|
9 | class MExtractTimeAndChargeDigitalFilter : public MExtractTimeAndCharge
|
---|
10 | {
|
---|
11 | private:
|
---|
12 |
|
---|
13 | static const Byte_t fgHiGainFirst;
|
---|
14 | static const Byte_t fgHiGainLast;
|
---|
15 | static const Byte_t fgLoGainFirst;
|
---|
16 | static const Byte_t fgLoGainLast;
|
---|
17 | static const Int_t fgHiGainWindowSize;
|
---|
18 | static const Int_t fgLoGainWindowSize;
|
---|
19 | static const Int_t fgBinningResolution;
|
---|
20 |
|
---|
21 | Int_t fWindowSizeHiGain;
|
---|
22 | Int_t fWindowSizeLoGain;
|
---|
23 |
|
---|
24 | Int_t fBinningResolution;
|
---|
25 | Int_t fBinningResolutionHalf;
|
---|
26 |
|
---|
27 | Float_t fw_amp [60];
|
---|
28 | Float_t fw_time[60];
|
---|
29 |
|
---|
30 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
31 |
|
---|
32 | protected:
|
---|
33 |
|
---|
34 | virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum,
|
---|
35 | Float_t &time, Float_t &dtime,
|
---|
36 | Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
|
---|
37 | virtual void FindTimeAndChargeLoGain(Byte_t *firstused, Float_t &sum, Float_t &dsum,
|
---|
38 | Float_t &time, Float_t &dtime,
|
---|
39 | Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
|
---|
40 |
|
---|
41 | public:
|
---|
42 |
|
---|
43 | MExtractTimeAndChargeDigitalFilter(const char *name=NULL, const char *title=NULL);
|
---|
44 |
|
---|
45 | void SetWeightsFile(TString filename="pulpo_weights.root");
|
---|
46 | void SetWindowSize(Int_t windowh=fgHiGainWindowSize,
|
---|
47 | Int_t windowl=fgLoGainWindowSize);
|
---|
48 |
|
---|
49 | void SetBinningResolution(Int_t r=fgBinningResolution) {
|
---|
50 | fBinningResolution = r & ~1;
|
---|
51 | fBinningResolutionHalf = fBinningResolution/2; }
|
---|
52 |
|
---|
53 |
|
---|
54 | ClassDef(MExtractTimeAndChargeDigitalFilter, 0) // Hendrik's digital filter
|
---|
55 | };
|
---|
56 |
|
---|
57 | #endif
|
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|