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

Last change on this file since 7626 was 7091, checked in by tbretz, 20 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;
9class MExtractTimeAndCharge : public MExtractTime
10{
11private:
12
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
16protected:
17
18 Byte_t fLoGainFirstSave; //! Temporary variable to store the original position of low-gain start slice
19 Float_t fLoGainStartShift; // Shift to start searching the low-gain signal obtained from the high-gain times.
20
21 Byte_t fLoGainSwitch; // Limit for max. bin content before the low-gain gets extracted
22
23 Int_t fWindowSizeHiGain; // Window Size High-Gain
24 Int_t fWindowSizeLoGain; // Window Size Low-Gain
25
26 Byte_t fMaxBinContent; // Maximum bin content
27
28 Int_t PreProcess(MParList *pList);
29 Int_t Process();
30 Bool_t ReInit(MParList *pList);
31
32 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
33
34public:
35
36 MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
37
38 Int_t GetWindowSizeHiGain () const { return fWindowSizeHiGain; }
39 Int_t GetWindowSizeLoGain () const { return fWindowSizeLoGain; }
40 Byte_t GetLoGainSwitch () const { return fLoGainSwitch; }
41
42 void Print(Option_t *o="") const; //*MENU*
43
44 void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain; }
45 void SetLoGainSwitch ( const Byte_t i=fgLoGainSwitch ) { fLoGainSwitch = i; }
46
47 virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh;
48 fWindowSizeLoGain = windowl; }
49
50 virtual Bool_t InitArrays() { return kTRUE; }
51
52 virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum,
53 Float_t &time, Float_t &dtime,
54 Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag) { }
55
56 virtual void FindTimeAndChargeLoGain(Byte_t *firstused, Float_t &sum, Float_t &dsum,
57 Float_t &time, Float_t &dtime,
58 Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag) { }
59
60 ClassDef(MExtractTimeAndCharge, 2) // Time And Charge Extractor Base Class
61};
62
63#endif
64
65
66
Note: See TracBrowser for help on using the repository browser.