1 | #ifndef MARS_MExtractTimeAndChargeDigitalFilterPeakSearch
|
---|
2 | #define MARS_MExtractTimeAndChargeDigitalFilterPeakSearch
|
---|
3 |
|
---|
4 | #ifndef MARS_MExtractTimeAndChargeDigitalFilter
|
---|
5 | #include "MExtractTimeAndChargeDigitalFilter.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MArrayF
|
---|
9 | #include "MArrayF.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MArrayI
|
---|
13 | #include "MArrayI.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class TH1F;
|
---|
17 | class TH2F;
|
---|
18 | class MPedestalPix;
|
---|
19 | class MExtractTimeAndChargeDigitalFilterPeakSearch : public MExtractTimeAndChargeDigitalFilter
|
---|
20 | {
|
---|
21 | private:
|
---|
22 |
|
---|
23 | static const Byte_t fgHiGainFirst; //! Default for fHiGainFirst (now set to: 0)
|
---|
24 | static const Byte_t fgHiGainLast; //! Default for fHiGainLast (now set to:18)
|
---|
25 | static const Byte_t fgLoGainFirst; //! Default for fLoGainFirst (now set to: 2)
|
---|
26 | static const Byte_t fgLoGainLast; //! Default for fLoGainLast (now set to:14)
|
---|
27 | static const Byte_t fgOffsetLeftFromPeak; //! Default for fOffsetLeftFromPeak (now set to: 1)
|
---|
28 | static const Byte_t fgOffsetRightFromPeak; //! Default for fOffsetRightFromPeak (now set to: 2)
|
---|
29 | static const Byte_t fgPeakSearchWindowSize; //! Default for fPeakSearchWindowSize (now set to: 2)
|
---|
30 | static const Int_t fgHiGainFailureLimit; //! Default for fHiGainMaxFailureLimit (now set to: 5)
|
---|
31 | static const Int_t fgLoGainFailureLimit; //! Default for fHiGainMaxFailureLimit (now set to: 10)
|
---|
32 |
|
---|
33 | Byte_t fOffsetLeftFromPeak; // Number of slices to start extraction before peak slice
|
---|
34 | Byte_t fOffsetRightFromPeak; // Number of slices to stop extraction after peak slice
|
---|
35 | Byte_t fPeakSearchWindowSize; // Size of FADC window in the search for the highest peak of all pixels.
|
---|
36 | Int_t fHiGainFailureLimit; // Limit for percentage of events ranging out of limits in high gain
|
---|
37 | Int_t fLoGainFailureLimit; // Limit for percentage of events ranging out of limits in low gain
|
---|
38 |
|
---|
39 | ULong_t fHiGainOutOfRangeLeft; // Number of events out of range to the left side in high gain
|
---|
40 | ULong_t fHiGainOutOfRangeRight; // Number of events out of range to the right side in high gain
|
---|
41 | ULong_t fLoGainOutOfRangeLeft; // Number of events out of range to the left side in low gain
|
---|
42 | ULong_t fLoGainOutOfRangeRight; // Number of events out of range to the right side in low gain
|
---|
43 |
|
---|
44 | void FindPeak(Byte_t *ptr, Byte_t *logain,
|
---|
45 | Byte_t &startslice, Int_t &max, Int_t &sat, Byte_t &satpos) const;
|
---|
46 |
|
---|
47 | Int_t PreProcess(MParList *pList);
|
---|
48 | Int_t Process();
|
---|
49 | Int_t PostProcess();
|
---|
50 |
|
---|
51 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
52 |
|
---|
53 | public:
|
---|
54 |
|
---|
55 | MExtractTimeAndChargeDigitalFilterPeakSearch(const char *name=NULL, const char *title=NULL);
|
---|
56 | ~MExtractTimeAndChargeDigitalFilterPeakSearch() { }
|
---|
57 |
|
---|
58 | void SetOffsetLeftFromPeak ( Byte_t offset=fgOffsetLeftFromPeak ) { fOffsetLeftFromPeak = offset; }
|
---|
59 | void SetOffsetRightFromPeak( Byte_t offset=fgOffsetRightFromPeak ) { fOffsetRightFromPeak = offset; }
|
---|
60 | void SetPeakSearchWindowSize(Byte_t size =fgPeakSearchWindowSize ) { fPeakSearchWindowSize = size; }
|
---|
61 | void SetHiGainFailureLimit ( Int_t lim=fgHiGainFailureLimit ) { fHiGainFailureLimit = lim; }
|
---|
62 | void SetLoGainFailureLimit ( Int_t lim=fgLoGainFailureLimit ) { fLoGainFailureLimit = lim; }
|
---|
63 |
|
---|
64 | void Print(Option_t *o="") const;
|
---|
65 |
|
---|
66 | ClassDef(MExtractTimeAndChargeDigitalFilterPeakSearch, 1) // Digital filter with global Peak Search
|
---|
67 | };
|
---|
68 |
|
---|
69 | #endif
|
---|