source: trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h@ 5569

Last change on this file since 5569 was 5135, checked in by gaug, 20 years ago
*** empty log message ***
File size: 3.6 KB
Line 
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
12class MExtractedSignalBlindPixel;
13class MExtractBlindPixel : public MExtractor
14{
15private:
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 Byte_t fDataType; // What data container type is needed?
40 Int_t fNumBlindPixels; // Current number of blind pixels
41
42public:
43 enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
44 enum DataType_t { kRawEvt, kRawEvt2 };
45
46private:
47 void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
48 void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
49 void FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
50
51 Int_t PreProcess(MParList *pList);
52 Bool_t ReInit(MParList *pList);
53 Int_t Process();
54
55public:
56
57 MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
58 ~MExtractBlindPixel();
59
60 void Clear( const Option_t *o ="");
61
62 // Getters
63 Bool_t IsExtractionType ( const ExtractionType_t typ );
64 Bool_t IsDataType ( const DataType_t typ );
65
66 // Setters
67 void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const Int_t nr=0 ) {
68 if (nr>fBlindPixelIdx.GetSize()-1)
69 fBlindPixelIdx.Set(nr+1);
70 fBlindPixelIdx.AddAt(idx,nr); }
71 void SetExtractionType( const ExtractionType_t typ=kAmplitude );
72 void SetDataType ( const DataType_t typ=kRawEvt );
73 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
74
75 void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; }
76
77 void SetRange ( const Byte_t hifirst=0, const Byte_t hilast=0,
78 const Byte_t lofirst=0, const Byte_t lolast=0 );
79 void SetResolution ( const Float_t f=fgResolution ) { fResolution = f; }
80
81 ClassDef(MExtractBlindPixel, 0) // Signal Extractor for the Blind Pixel
82};
83
84#endif
85
Note: See TracBrowser for help on using the repository browser.