Berkeley Nuclear Data Software
WFOperations.h
Go to the documentation of this file.
1 #ifndef _WF_OPERATIONS_H_
2 #define _WF_OPERATIONS_H_
3 //project includes
4 #include "FFT1DBRI.H"
5 #include "NSDPhysicsCalcs.h"
6 #include "SignalProcessing.h"
7 //c++includes
8 #include <iostream>
9 #include <algorithm>
10 #include <numeric>
11 #include <cmath>
12 #include <vector>
13 
14 
19 {
20 public:
21  WFOperations();
23  template <class T> static inline float estimateBaseline(T* a_wf,
24  uint a_num
25  );
28  template <class T> static inline float estimateBaseline(T* a_wf,
29  uint a_num,
30  float& a_sigma
31  );
35  template <class T> static inline void estimateBaselineDel(T* a_wf,
36  uint a_num,
37  float a_baseline,
38  float& a_Dmax
39  );
43  template <class T> static inline float estimateBaselineDel(T* a_wf,
44  uint a_num,
45  float& a_Dmax
46  );
47 
48  //this function returns the interpolated sample value that occurs before the
49  //max at the specified fractional height
50  template <class T> static inline float getCFD(T* a_wf,
51  uint a_num,
52  float a_mean,
53  float a_frac,
54  bool a_negPulse
55  );
56 
57  //this function returns the sample number corresponding to a leading edge
58  //trigger (either positive or negative deviation from baseline)
59  template <class T> static inline int findSampleLeadingEdgeTrig(T* a_wf,
60  uint a_num,
61  float a_baseline,
62  float a_threshold
63  );
64 
65  //this function integrates the waveform between provided sample numbers
66  template <class T> static inline float integrateTrace(T* a_wf,
67  float a_baseline,
68  int a_startSample,
69  int a_stopSample,
70  bool a_negPulse);
73  template <class T> static inline std::vector<std::pair<int,int>>
74  overThreshold(T* a_wf,
75  uint a_num,
76  float a_baseline,
77  float a_max
78  );
82  template <class T> static inline std::vector<std::pair<int,int>>
84  T* a_wf,
85  uint a_num,
86  float a_baseline,
87  float a_max
88  );
91  template <class T> static
92  std::vector< std::complex<double> > getWfFFT(T* a_wf,
93  int a_range);
94 
95 
96 private:
97 
98  SignalProcessing<double> m_sigProcDbl;
99 };
100 
101 #include "WFOperations.hpp"
102 #endif
Definition: WFOperations.h:19
static std::vector< std::pair< int, int > > overThreshold(T *a_wf, uint a_num, float a_baseline, float a_max)
Definition: WFOperations.hpp:129
static float getCFD(T *a_wf, uint a_num, float a_mean, float a_frac, bool a_negPulse)
Definition: WFOperations.hpp:77
static std::vector< std::complex< double > > getWfFFT(T *a_wf, int a_range)
For FFT stuff - Added 01/30/24.
Definition: WFOperations.hpp:196
static int findSampleLeadingEdgeTrig(T *a_wf, uint a_num, float a_baseline, float a_threshold)
Definition: WFOperations.hpp:89
static float estimateBaseline(T *a_wf, uint a_num)
this function averages the number of samples specified
Definition: WFOperations.hpp:6
static std::vector< std::pair< int, int > > underThreshold(T *a_wf, uint a_num, float a_baseline, float a_max)
Definition: WFOperations.hpp:162
static float integrateTrace(T *a_wf, float a_baseline, int a_startSample, int a_stopSample, bool a_negPulse)
Definition: WFOperations.hpp:106
WFOperations()
Definition: WFOperations.cpp:5
static void estimateBaselineDel(T *a_wf, uint a_num, float a_baseline, float &a_Dmax)
Definition: WFOperations.hpp:40