PandaRoot
PndEmcPSAOptimalFilterAnalyser.h
Go to the documentation of this file.
1 #ifndef PNDEMCOPTIMALFILTERANALYSER_HH
2 #define PNDEMCOPTIMALFILTERANALYSER_HH
3 
4 #include "PndEmcAbsPSA.h"
5 #include <string>
6 #include <vector>
7 
9 
10 //#define MAX_NUMBER_OptimalFilter_HITS 100
11 
13 
14 public:
15  PndEmcPSAOptimalFilterAnalyser(Double_t cf_frac, Double_t cf_tap, const Double_t* cf_tcorr, Int_t cf_n,
16  const Double_t* of_a, const Double_t* of_b, Int_t of_m, Int_t of_b0, PndEmcAbsPulseshape* shape, Double_t threshold, Double_t baseline = 0., Int_t verbose = 1);
19  void setBaseline(Double_t baseline) { fBaseline = baseline; }
20  void setVerbose(Int_t verbose) { fVerbose = verbose; }
21 
22  Int_t Process(const PndEmcWaveform *waveform);
23  void GetHit(Int_t i, Double_t &energy, Double_t &time);
24  void Reset();
25 
26 private:
27  Double_t fBaseline;
28 
29  Double_t fCF_fraction;
30  Int_t fCF_tap;
31  Int_t fCF_nsamples;
32  Double_t* fCF_tcorr;
33 
34  Int_t fOF_b0;
35  Int_t fOF_m;
36  Double_t* fOF_a;
37  Double_t* fOF_b;
38 
39  Double_t fThreshold;
40  std::vector<Double_t> fDigiAmplitude;
41  std::vector<Double_t> fDigiTime;
42 
43  PndEmcAbsPulseshape* fPulse;
44  Double_t fSampleRate;
45  Double_t fTimeStamp;
46 
47  Int_t fVerbose;
48 
49  void analyse(std::vector<Double_t>& signal, std::vector<Double_t>& baseline, Int_t& start_position); // return position for the next signal processing
50  void zero_crossing(const std::vector<Double_t>& wf, Int_t& start_position, Double_t& time, Int_t& index);
51  void generate_baseline(std::vector<Double_t>& baseline, Double_t amplitude, Double_t time);
52  void subtract_baseline(std::vector<Double_t>& signal, const std::vector<Double_t>& baseline);
53 
54 
55  ClassDef(PndEmcPSAOptimalFilterAnalyser, 1);
56 };
57 
58 #endif
void GetHit(Int_t i, Double_t &energy, Double_t &time)
Get energy and time of hit.
unsigned int i
Definition: P4_F32vec4.h:21
Int_t Process(const PndEmcWaveform *waveform)
Find Hits in Waveform.
represents a simulated waveform in an emc crystal
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:21
void Reset()
reset found hits
pulseshape interface