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

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