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

Last change on this file since 4381 was 4379, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.4 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 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
46public:
47 enum ExtractionType_t { kAmplitude, kIntegral };
48
49
50private:
51 void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
52 void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
53 void FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
54
55 Int_t PreProcess(MParList *pList);
56 Bool_t ReInit(MParList *pList);
57 Int_t Process();
58
59public:
60
61 MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
62 ~MExtractBlindPixel();
63
64 void Clear( const Option_t *o ="");
65
66 // Getters
67 Bool_t IsExtractionType ( const ExtractionType_t typ );
68
69 // Setters
70 void SetExtractionType( const ExtractionType_t typ=kAmplitude );
71 void SetFirst( const Byte_t first=fgFirst) { fFirst = first; }
72 void SetLast ( const Byte_t last =fgLast) { fLast = last; }
73 void SetRange( const Byte_t hifirst=0, const Byte_t hilast=0,
74 const Byte_t lofirst=0, const Byte_t lolast=0);
75 void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const Int_t nr=0) {
76 if (nr>fBlindPixelIdx.GetSize()-1)
77 fBlindPixelIdx.Set(nr+1);
78 fBlindPixelIdx.AddAt(idx,nr); }
79 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
80 void SetResolution(Float_t f=fgResolution) { fResolution = f; }
81
82 ClassDef(MExtractBlindPixel, 0) // Signal Extractor for the Blind Pixel
83};
84
85#endif
86
Note: See TracBrowser for help on using the repository browser.