1 | #ifndef MARS_MExtractTimeAndCharge
|
---|
2 | #define MARS_MExtractTimeAndCharge
|
---|
3 |
|
---|
4 | #ifndef MARS_MExtractTime
|
---|
5 | #include "MExtractTime.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MPedestalPix;
|
---|
9 |
|
---|
10 | class MExtractTimeAndCharge : public MExtractTime
|
---|
11 | {
|
---|
12 | private:
|
---|
13 | static const Float_t fgLoGainStartShift; //! Default for fLoGainStartShift (now set to: -2.8)
|
---|
14 | static const Byte_t fgLoGainSwitch; //! Default for fLoGainSwitch (now set to: 100)
|
---|
15 |
|
---|
16 | Float_t fLoGainStartShift; // Shift to start searching the low-gain signal obtained from the high-gain times.
|
---|
17 | Byte_t fLoGainSwitch; // Limit for max. bin content before the low-gain gets extracted
|
---|
18 |
|
---|
19 | protected:
|
---|
20 | Int_t fWindowSizeHiGain; // Window Size High-Gain
|
---|
21 | Int_t fWindowSizeLoGain; // Window Size Low-Gain
|
---|
22 |
|
---|
23 | Int_t PreProcess(MParList *pList);
|
---|
24 | Int_t Process();
|
---|
25 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
26 |
|
---|
27 | Double_t GetSaturationTime(Int_t sat0, const Float_t *sig, Int_t maxcont) const;
|
---|
28 |
|
---|
29 | public:
|
---|
30 | MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
|
---|
31 |
|
---|
32 | Int_t GetWindowSizeHiGain () const { return fWindowSizeHiGain; }
|
---|
33 | Int_t GetWindowSizeLoGain () const { return fWindowSizeLoGain; }
|
---|
34 | Byte_t GetLoGainSwitch () const { return fLoGainSwitch; }
|
---|
35 |
|
---|
36 | void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain; }
|
---|
37 | void SetLoGainSwitch ( const Byte_t i=fgLoGainSwitch ) { fLoGainSwitch = i; }
|
---|
38 |
|
---|
39 | virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh; fWindowSizeLoGain = windowl; }
|
---|
40 |
|
---|
41 | virtual Bool_t InitArrays(Int_t n) { return kTRUE; }
|
---|
42 |
|
---|
43 | virtual void FindTimeAndChargeHiGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
|
---|
44 | Float_t &time, Float_t &dtime,
|
---|
45 | Byte_t sat, Int_t maxpos) const { }
|
---|
46 |
|
---|
47 | virtual void FindTimeAndChargeLoGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
|
---|
48 | Float_t &time, Float_t &dtime,
|
---|
49 | Byte_t sat, Int_t maxpos) const { }
|
---|
50 |
|
---|
51 | // For MExtractPedestal
|
---|
52 | Bool_t ReInit(MParList *pList);
|
---|
53 |
|
---|
54 | // TObject
|
---|
55 | void Print(Option_t *o="") const; //*MENU*
|
---|
56 |
|
---|
57 | ClassDef(MExtractTimeAndCharge, 3) // Time And Charge Extractor Base Class
|
---|
58 | };
|
---|
59 |
|
---|
60 | #endif
|
---|
61 |
|
---|
62 |
|
---|
63 |
|
---|