source: trunk/Mars/msignal/MExtractBlindPixel.h@ 17826

Last change on this file since 17826 was 11568, checked in by tbretz, 13 years ago
Changed fHiGainFirst/fHiGainLast from Byte_t to UShort_t to support the DRS with 1024 samples.
File size: 3.7 KB
Line 
1#ifndef MARS_MExtractBlindPixel
2#define MARS_MExtractBlindPixel
3
4#ifndef MARS_MExtractor
5#include "MExtractor.h"
6#endif
7
8#ifndef MARS_MArrayI
9#include "MArrayI.h"
10#endif
11#ifndef MARS_MArrayF
12#include "MArrayF.h"
13#endif
14
15class MCalibrationBlindCam;
16class MExtractedSignalBlindPixel;
17
18class MExtractBlindPixel : public MExtractor
19{
20private:
21
22 static const UInt_t fgBlindPixelIdx; //! Default blind pixels index before modification run
23 static const Byte_t fgHiGainFirst; //! Default First FADC slice Hi-Gain Signal (currently set to: 10 )
24 static const Byte_t fgHiGainLast; //! Default Last FADC slice Hi-Gain Signal (currently set to: 29 )
25 static const Byte_t fgLoGainFirst; //! Default First FADC slice Filter (currently set to: 0 )
26 static const Byte_t fgLoGainLast; //! Default Last FADC slice Filter (currently set to: 6 )
27 static const Int_t fgNSBFilterLimit; //! Default for fNSBFilterLimit
28 static const Float_t fgResolution; //! Default for fResolution (currently set to: 0.003)
29 static const Float_t gkOverflow; //! Default sum to assign overflow in case of saturation
30
31 MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel
32
33// Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain
34// Byte_t fHiLoLast;
35
36// MArrayF fHiGainSignal; //! Need fast access to the signals in a float way
37 MArrayF fHiGainFirstDeriv; //! First derivative at intersection
38 MArrayF fHiGainSecondDeriv; //! Second derivative at intersection
39
40 Float_t fResolution; // The time resolution in FADC units
41 MArrayI fBlindPixelIdx; // Array holding the IDs of the blind pixel(s)
42 Int_t fNSBFilterLimit; // Limit of sum of FADC slices for filter part
43
44 Byte_t fExtractionType; // What extraction type has been chosen?
45 Byte_t fDataType; // What data container type is needed?
46// Int_t fNumBlindPixels; // Current number of blind pixels
47
48public:
49 enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
50 enum DataType_t { kRawEvt, kRawEvt2 };
51
52private:
53 Float_t FindAmplitude(Int_t idx, Int_t numsat) const;
54// void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
55// void FindSignalFilter(Byte_t *ptr, Int_t range, Int_t &sum, Byte_t &sat) const;
56
57 Int_t PreProcess(MParList *pList);
58 Bool_t ReInit(MParList *pList);
59 Int_t Process();
60
61public:
62
63 MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
64
65 void Clear( const Option_t *o ="");
66
67 // Getters
68 Bool_t IsExtractionType ( const ExtractionType_t typ );
69 Bool_t IsDataType ( const DataType_t typ );
70
71 // Setters
72 /*
73 void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const UInt_t nr=0 )
74 {
75 if (nr>=fBlindPixelIdx.GetSize())
76 fBlindPixelIdx.Set(nr+1);
77 fBlindPixelIdx[nr] = idx;
78 }
79 */
80
81 void SetBlindPixels(const MCalibrationBlindCam &cam);
82
83 void SetExtractionType( const ExtractionType_t typ=kAmplitude );
84 void SetDataType ( const DataType_t typ=kRawEvt );
85 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
86
87// void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; }
88
89 void SetRange ( const UShort_t hifirst=0, const UShort_t hilast=0,
90 const Int_t lofirst=0, const Byte_t lolast=0 );
91 void SetResolution ( const Float_t f=fgResolution ) { fResolution = f; }
92
93 ClassDef(MExtractBlindPixel, 0) // Signal Extractor for the Blind Pixel
94};
95
96#endif
97
Note: See TracBrowser for help on using the repository browser.