1 | #ifndef MARS_MExtractBlindPixel
|
---|
2 | #define MARS_MExtractBlindPixel
|
---|
3 |
|
---|
4 | #ifndef MARS_MExtractor
|
---|
5 | #include "MExtractor.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayI
|
---|
9 | #include <TArrayI.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MExtractedSignalBlindPixel;
|
---|
13 | class MExtractBlindPixel : public MExtractor
|
---|
14 | {
|
---|
15 | private:
|
---|
16 |
|
---|
17 | static const UInt_t fgBlindPixelIds[3]; //! Default blind pixel indices after modification run
|
---|
18 | static const UInt_t fgBlindPixelIdx; //! Default blind pixels index before modification run
|
---|
19 | static const Byte_t fgFirst; //! Default First FADC slice after modification run (currently set to: 2 )
|
---|
20 | static const Byte_t fgLast ; //! Default Last FADC slice after modification run (currently set to: 13 )
|
---|
21 | static const Byte_t fgHiGainFirst; //! Default First FADC slice Hi-Gain Signal (currently set to: 10 )
|
---|
22 | static const Byte_t fgHiGainLast; //! Default Last FADC slice Hi-Gain Signal (currently set to: 29 )
|
---|
23 | static const Byte_t fgLoGainFirst; //! Default First FADC slice Filter (currently set to: 0 )
|
---|
24 | static const Byte_t fgLoGainLast; //! Default Last FADC slice Filter (currently set to: 6 )
|
---|
25 | static const Int_t fgNSBFilterLimit; //! Default for fNSBFilterLimit
|
---|
26 | static const Float_t fgResolution; //! Default for fResolution (currently set to: 0.003)
|
---|
27 | static const UInt_t gkModificationRun; //! The run number from which on three blind pixels are used
|
---|
28 | static const Float_t gkOverflow; //! Default sum to assign overflow in case of saturation
|
---|
29 |
|
---|
30 | MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel
|
---|
31 |
|
---|
32 | Byte_t fFirst;
|
---|
33 | Byte_t fLast;
|
---|
34 | Byte_t fHiLoFirst;
|
---|
35 | Float_t *fHiGainSignal; // Need fast access to the signals in a float way
|
---|
36 | Float_t *fHiGainFirstDeriv;
|
---|
37 | Float_t *fHiGainSecondDeriv;
|
---|
38 |
|
---|
39 | Float_t fResolution; // The time resolution in FADC units
|
---|
40 | TArrayI fBlindPixelIdx;
|
---|
41 | Int_t fNSBFilterLimit;
|
---|
42 |
|
---|
43 | Bool_t fModified;
|
---|
44 | Byte_t fExtractionType;
|
---|
45 |
|
---|
46 | enum ExtractionType_t { kAmplitude, kIntegral };
|
---|
47 |
|
---|
48 | void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
|
---|
49 | void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
|
---|
50 | void FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
|
---|
51 |
|
---|
52 | Int_t PreProcess(MParList *pList);
|
---|
53 | Bool_t ReInit(MParList *pList);
|
---|
54 | Int_t Process();
|
---|
55 |
|
---|
56 | public:
|
---|
57 |
|
---|
58 | MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
|
---|
59 | ~MExtractBlindPixel();
|
---|
60 |
|
---|
61 | void Clear( const Option_t *o ="");
|
---|
62 |
|
---|
63 | // Getters
|
---|
64 | Bool_t IsExtractionType ( const ExtractionType_t typ );
|
---|
65 |
|
---|
66 | // Setters
|
---|
67 | void SetExtractionType( const ExtractionType_t typ=kAmplitude );
|
---|
68 | void SetFirst( const Byte_t first=fgFirst) { fFirst = first; }
|
---|
69 | void SetLast ( const Byte_t last =fgLast) { fLast = last; }
|
---|
70 | void SetRange( const Byte_t hifirst=0, const Byte_t hilast=0,
|
---|
71 | const Byte_t lofirst=0, const Byte_t lolast=0);
|
---|
72 | void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const Int_t nr=0) {
|
---|
73 | if (nr>fBlindPixelIdx.GetSize()-1)
|
---|
74 | fBlindPixelIdx.Set(nr+1);
|
---|
75 | fBlindPixelIdx.AddAt(idx,nr); }
|
---|
76 | void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
|
---|
77 | void SetResolution(Float_t f=fgResolution) { fResolution = f; }
|
---|
78 |
|
---|
79 | ClassDef(MExtractBlindPixel, 0) // Signal Extractor for the Blind Pixel
|
---|
80 | };
|
---|
81 |
|
---|
82 | #endif
|
---|
83 |
|
---|