-
Notifications
You must be signed in to change notification settings - Fork 0
/
WaveformAnalysis.h
48 lines (42 loc) · 964 Bytes
/
WaveformAnalysis.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef LARIATANAMODULE_WAVEFORMANALYSIS_H
#define LARIATANAMODULE_WAVEFORMANALYSIS_H
#include <vector>
#include <algorithm>
#include <cmath>
#include <iterator>
#include <string>
//ROOT Libraries
#include "TF1.h"
#include "TGraph.h"
#include "TH1.h"
#include "TSpectrum.h"
class WaveformAnalysis{
public:
WaveformAnalysis();
~WaveformAnalysis();
bool FindPeaks(int, std::vector <short>, double, std::string);
int GetNPeaks();
std::vector <short> GetPeaks();
std::vector <double> GetPeaksTime();
double GetBaseline();
double GetBaselineRMS();
double GetPulseArea(std::vector<short>, double);
short GetRiseTime();
short GetDecayTime();
private:
TH1 *wv;
TH1 *wv_clean;
Int_t npeaks;
Int_t peak_position;
Int_t nfound;
std::string polarity;
std::vector <short> peaks;
std::vector <double> peaks_time;
double peak_rise_time;
double peak_decay_time;
double baseline;
double rms_baseline;
Double_t* xpeaks;
double peak_area;
};
#endif