source: trunk/Mars/msignal/MExtractTimeAndCharge.h@ 9875

Last change on this file since 9875 was 9069, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MExtractTimeAndCharge
2#define MARS_MExtractTimeAndCharge
3
4#ifndef MARS_MExtractTime
5#include "MExtractTime.h"
6#endif
7
8class MPedestalPix;
9
10class MExtractTimeAndCharge : public MExtractTime
11{
12private:
13 static const Float_t fgLoGainStartShift; //! Default for fLoGainStartShift (now set to: -2.8)
14 static const UInt_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 UInt_t fLoGainSwitch; // Limit for max. bin content before the low-gain gets extracted
18
19protected:
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
29public:
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 Float_t GetLoGainStartShift () const { return fLoGainStartShift; }
35 UInt_t GetLoGainSwitch () const { return fLoGainSwitch; }
36
37 void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f; }
38 void SetLoGainSwitch ( const UInt_t i=fgLoGainSwitch ) { fLoGainSwitch = i; }
39
40 virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh; fWindowSizeLoGain = windowl; }
41
42 virtual Bool_t InitArrays(Int_t n) { return kTRUE; }
43
44 virtual void FindTimeAndChargeHiGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
45 Float_t &time, Float_t &dtime,
46 Byte_t sat, Int_t maxpos) const { }
47
48 virtual void FindTimeAndChargeLoGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
49 Float_t &time, Float_t &dtime,
50 Byte_t sat, Int_t maxpos) const { }
51
52 // For MExtractPedestal
53 Bool_t ReInit(MParList *pList);
54
55 // TObject
56 void Print(Option_t *o="") const; //*MENU*
57
58 ClassDef(MExtractTimeAndCharge, 4) // Time And Charge Extractor Base Class
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.