| 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 fgBlindPixelIdx; //! Default blind pixels index before modification run
|
|---|
| 18 | static const Byte_t fgHiGainFirst; //! Default First FADC slice Hi-Gain Signal (currently set to: 10 )
|
|---|
| 19 | static const Byte_t fgHiGainLast; //! Default Last FADC slice Hi-Gain Signal (currently set to: 29 )
|
|---|
| 20 | static const Byte_t fgLoGainFirst; //! Default First FADC slice Filter (currently set to: 0 )
|
|---|
| 21 | static const Byte_t fgLoGainLast; //! Default Last FADC slice Filter (currently set to: 6 )
|
|---|
| 22 | static const Int_t fgNSBFilterLimit; //! Default for fNSBFilterLimit
|
|---|
| 23 | static const Float_t fgResolution; //! Default for fResolution (currently set to: 0.003)
|
|---|
| 24 | static const Float_t gkOverflow; //! Default sum to assign overflow in case of saturation
|
|---|
| 25 |
|
|---|
| 26 | MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel
|
|---|
| 27 |
|
|---|
| 28 | Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain
|
|---|
| 29 |
|
|---|
| 30 | Float_t *fHiGainSignal; // Need fast access to the signals in a float way
|
|---|
| 31 | Float_t *fHiGainFirstDeriv; // First derivative at intersection
|
|---|
| 32 | Float_t *fHiGainSecondDeriv; // Second derivative at intersection
|
|---|
| 33 |
|
|---|
| 34 | Float_t fResolution; // The time resolution in FADC units
|
|---|
| 35 | TArrayI fBlindPixelIdx; // Array holding the IDs of the blind pixel(s)
|
|---|
| 36 | Int_t fNSBFilterLimit; // Limit of sum of FADC slices for filter part
|
|---|
| 37 |
|
|---|
| 38 | Byte_t fExtractionType; // What extraction type has been chosen?
|
|---|
| 39 | Int_t fNumBlindPixels; // Current number of blind pixels
|
|---|
| 40 |
|
|---|
| 41 | public:
|
|---|
| 42 | enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | private:
|
|---|
| 46 | void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
|
|---|
| 47 | void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
|
|---|
| 48 | void FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
|
|---|
| 49 |
|
|---|
| 50 | Int_t PreProcess(MParList *pList);
|
|---|
| 51 | Bool_t ReInit(MParList *pList);
|
|---|
| 52 | Int_t Process();
|
|---|
| 53 |
|
|---|
| 54 | public:
|
|---|
| 55 |
|
|---|
| 56 | MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
|
|---|
| 57 | ~MExtractBlindPixel();
|
|---|
| 58 |
|
|---|
| 59 | void Clear( const Option_t *o ="");
|
|---|
| 60 |
|
|---|
| 61 | // Getters
|
|---|
| 62 | Bool_t IsExtractionType ( const ExtractionType_t typ );
|
|---|
| 63 |
|
|---|
| 64 | // Setters
|
|---|
| 65 | void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const Int_t nr=0 ) {
|
|---|
| 66 | if (nr>fBlindPixelIdx.GetSize()-1)
|
|---|
| 67 | fBlindPixelIdx.Set(nr+1);
|
|---|
| 68 | fBlindPixelIdx.AddAt(idx,nr); }
|
|---|
| 69 | void SetExtractionType( const ExtractionType_t typ=kAmplitude );
|
|---|
| 70 | void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
|
|---|
| 71 |
|
|---|
| 72 | void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; }
|
|---|
| 73 |
|
|---|
| 74 | void SetRange ( const Byte_t hifirst=0, const Byte_t hilast=0,
|
|---|
| 75 | const Byte_t lofirst=0, const Byte_t lolast=0 );
|
|---|
| 76 | void SetResolution ( const Float_t f=fgResolution ) { fResolution = f; }
|
|---|
| 77 |
|
|---|
| 78 | ClassDef(MExtractBlindPixel, 0) // Signal Extractor for the Blind Pixel
|
|---|
| 79 | };
|
|---|
| 80 |
|
|---|
| 81 | #endif
|
|---|
| 82 |
|
|---|