Line data Source code
1 : #ifndef ALITPCSAMPAEMULATOR_H
2 : #define ALITPCSAMPAEMULATOR_H
3 :
4 :
5 : /** @file AliTPCSAMPAEmulator.h
6 : @brief This the header File for the SAMPA class
7 :
8 : author: marian.ivanov@cern.ch
9 : mesut.arslandok@cern.ch
10 : */
11 :
12 :
13 : ///////////////////////////////////////////////////////////////////////////////
14 : // Class AliTPCSAMPAEmulator //
15 : // Class for emulation of the ALTRO chip (Altro digital Chain) in C++ //
16 : ///////////////////////////////////////////////////////////////////////////////
17 :
18 : #include "TNamed.h"
19 :
20 :
21 : using namespace std;
22 :
23 : class AliTPCSAMPAEmulator : public TNamed {
24 : public:
25 : AliTPCSAMPAEmulator();
26 : ~AliTPCSAMPAEmulator();
27 : Bool_t DigitalFilterFloat(Int_t npoints, Double_t *dataArray, Double_t &baseline);
28 : Bool_t ZeroSuppression(Int_t npoints, Double_t *dataArray, Double_t threshold);
29 : //
30 : Bool_t BC3SlopeFilterFloat(Int_t npoints, Double_t *dataArray, Double_t &baseline);
31 : static Bool_t BC3SlopeFilterFloat(Int_t npoints, Double_t *dataArray, Double_t slopeDown, Double_t slopeUp, Double_t round, Double_t &baseline);
32 : void SetBC3Parameters(Double_t slopeDown, Double_t slopeUp, Double_t round);
33 0 : void SetBC3DiffCutMI(Double_t BC3DiffCutMI){fBC3DiffCutMI=BC3DiffCutMI;}
34 : Bool_t BC3SlopeFilterMI(Int_t npoints, Double_t *dataArray, Double_t &baseline);
35 : static Bool_t BC3SlopeFilterMI(Int_t npoints, Double_t *dataArray, Double_t slopeDown, Double_t slopeUp, Double_t round, Double_t &baseline, Double_t diffCutMI);
36 : //
37 : Bool_t MovingAverageFilter(Int_t npoints, Double_t *dataArray, Double_t &baseline);
38 : static Bool_t MovingAverageFilter(Int_t npoints, Double_t *dataArray, Double_t length, Double_t skipDiff, Bool_t onlyMinima, Double_t &baseline); // local maxim need treatment
39 : void SetMAFMIParameters(Double_t MAFMIKernelWidth, Double_t MAFMIDiffCut, Bool_t onlyMinima);
40 : private:
41 : AliTPCSAMPAEmulator(const AliTPCSAMPAEmulator &sig);
42 : AliTPCSAMPAEmulator& operator = (const AliTPCSAMPAEmulator &source);
43 : public:
44 : Int_t fDigitFilterType; //
45 : static Int_t fgBaselineExportType; // swith to export either corrected signal or the perdestal estimator itself - needed for the performance ssudies
46 : //
47 : // BC3 parameters
48 : //
49 : Double_t fBC3SlopeDown; // BC3 slope down parameter
50 : Double_t fBC3SlopeUp; // BC3 slope up parameter
51 : Double_t fBC3Round; // Rounding error of BC3 filter
52 : Double_t fBC3DiffCutMI; // BC3 cut on the signal difference - for MI implementation
53 :
54 : //
55 : // Moving average filter parameters (MI) implementation
56 : //
57 : Double_t fMAFMIKernelWidth; // kernel width for MAF filtering
58 : Double_t fMAFMIDiffCut; // cut on the diff to skip "signal"
59 : Double_t fMAFMIOnlyMinima; // use only local minima
60 :
61 :
62 :
63 24 : ClassDef(AliTPCSAMPAEmulator,1);
64 : };
65 : #endif
|