source: trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h@ 8171

Last change on this file since 8171 was 8165, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.2 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 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
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
27public:
28 MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
29
30 Int_t GetWindowSizeHiGain () const { return fWindowSizeHiGain; }
31 Int_t GetWindowSizeLoGain () const { return fWindowSizeLoGain; }
32 Byte_t GetLoGainSwitch () const { return fLoGainSwitch; }
33
34 void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain; }
35 void SetLoGainSwitch ( const Byte_t i=fgLoGainSwitch ) { fLoGainSwitch = i; }
36
37 virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh; fWindowSizeLoGain = windowl; }
38
39 virtual Bool_t InitArrays(Int_t n) { return kTRUE; }
40
41 virtual void FindTimeAndChargeHiGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
42 Float_t &time, Float_t &dtime,
43 Byte_t sat, Int_t maxpos) const { }
44
45 virtual void FindTimeAndChargeLoGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
46 Float_t &time, Float_t &dtime,
47 Byte_t sat, Int_t maxpos) const { }
48
49 // For MExtractPedestal
50 Bool_t ReInit(MParList *pList);
51
52 // TObject
53 void Print(Option_t *o="") const; //*MENU*
54
55 ClassDef(MExtractTimeAndCharge, 2) // Time And Charge Extractor Base Class
56};
57
58#endif
59
60
61
Note: See TracBrowser for help on using the repository browser.