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

Last change on this file since 4453 was 4386, checked in by gaug, 20 years ago
*** empty log message ***
File size: 4.0 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 Float_t gkOverflow; //! Default sum to assign overflow in case of saturation
28 static const UInt_t gkModificationRun; //! Run number from which on three blind pixels are used
29
30 MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the Blind Pixel
31
32 Byte_t fFirst; // First extraction slice for runs after modification
33 Byte_t fLast; // Last extraction slice for runs after modification
34 Byte_t fHiLoFirst; // If not zero, start extraction from fHiLoFirst slice of Low-Gain
35
36 Float_t *fHiGainSignal; // Need fast access to the signals in a float way
37 Float_t *fHiGainFirstDeriv; // First derivative at intersection
38 Float_t *fHiGainSecondDeriv; // Second derivative at intersection
39
40 Float_t fResolution; // The time resolution in FADC units
41 TArrayI 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 Bool_t fModified; // Is the run taken after the modifications?
45 Byte_t fExtractionType; // What extraction type has been chosen?
46
47public:
48 enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
49
50
51private:
52 void FindAmplitude (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
53 void FindIntegral (Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat);
54 void FindSignalFilter(Byte_t *ptr, Int_t &sum, Byte_t &sat) const;
55
56 Int_t PreProcess(MParList *pList);
57 Bool_t ReInit(MParList *pList);
58 Int_t Process();
59
60public:
61
62 MExtractBlindPixel(const char *name=NULL, const char *title=NULL);
63 ~MExtractBlindPixel();
64
65 void Clear( const Option_t *o ="");
66
67 // Getters
68 Bool_t IsExtractionType ( const ExtractionType_t typ );
69
70 // Setters
71 void SetBlindPixelIdx( const Int_t idx=fgBlindPixelIdx, const Int_t nr=0 ) {
72 if (nr>fBlindPixelIdx.GetSize()-1)
73 fBlindPixelIdx.Set(nr+1);
74 fBlindPixelIdx.AddAt(idx,nr); }
75 void SetExtractionType( const ExtractionType_t typ=kAmplitude );
76 void SetFirst ( const Byte_t first=fgFirst ) { fFirst = first; }
77 void SetLast ( const Byte_t last =fgLast ) { fLast = last; }
78 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; }
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.