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

Last change on this file since 8154 was 8154, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.9 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
16private:
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
23protected:
24
25 Int_t fWindowSizeHiGain; // Window Size High-Gain
26 Int_t fWindowSizeLoGain; // Window Size Low-Gain
27
28 Int_t PreProcess(MParList *pList);
29 Int_t Process();
30 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
31
32public:
33
34 MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
35
36 Int_t GetWindowSizeHiGain () const { return fWindowSizeHiGain; }
37 Int_t GetWindowSizeLoGain () const { return fWindowSizeLoGain; }
38 Byte_t GetLoGainSwitch () const { return fLoGainSwitch; }
39
40 void Print(Option_t *o="") const; //*MENU*
41
42 void SetLoGainStartShift( const Float_t f=fgLoGainStartShift ) { fLoGainStartShift = f + fOffsetLoGain; }
43 void SetLoGainSwitch ( const Byte_t i=fgLoGainSwitch ) { fLoGainSwitch = i; }
44
45 virtual void SetWindowSize(Int_t windowh, Int_t windowl) { fWindowSizeHiGain = windowh;
46 fWindowSizeLoGain = windowl; }
47
48 Bool_t ReInit(MParList *pList);
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 virtual void FindTimeAndChargeHiGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
61 Float_t &time, Float_t &dtime,
62 Byte_t sat, Int_t maxpos) { }
63
64 virtual void FindTimeAndChargeLoGain2(const Float_t *firstused, Int_t num, Float_t &sum, Float_t &dsum,
65 Float_t &time, Float_t &dtime,
66 Byte_t sat, Int_t maxpos) { }
67
68 // For MExtractPedestal
69
70 ClassDef(MExtractTimeAndCharge, 2) // Time And Charge Extractor Base Class
71};
72
73#endif
74
75
76
Note: See TracBrowser for help on using the repository browser.