-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindMultiplePeak.hh
95 lines (66 loc) · 3.62 KB
/
FindMultiplePeak.hh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "FindPeakBaseRoot.hh"
class FindSinglePeak : public FindPeakBaseRoot{
public:
// FindSinglePeak normal constructor with configStruct initilization parameters
FindSinglePeak(const configStruct &initParams);
// Fills result using adc waveform data using by fitting with the convolutionSinglePeakWithDynamicPedestal model
// NOTE : This function may begin with peak data provided in result which is replaced
virtual void process(const adcWaveform adcData, resultantHitData &result);
private:
void fitParams2ResultantData(Double_t *fitParameters, resultantHitData &result);
TGraphErrors _fitData;
TF1 _fitModel;
};
class FindSinglePeakWithDynamicPedestal : public FindPeakBaseRoot{
public:
// FindSinglePeakWithDynamicPedestal normal constructor with configStruct initilization parameters
FindSinglePeakWithDynamicPedestal(const configStruct &initParams) : FindPeakBase(initParams);
// Fills result using adc waveform data using by fitting with the convolutionSinglePeakWithDynamicPedestal model
// NOTE : This function may begin with peak data provided in result which is replaced
virtual void process(const adcWaveform adcData, resultantHitData &result);
private:
TGraphErrors _fitData;
TF1 _fitModel;
void fitParams2ResultantData(Double_t *fitParameters, resultantHitData &result);
};
class FindDoublePeak : public FindPeakBaseRoot{
public:
FindDoublePeak(const configStruct &initParams) : FindPeakBase(initParams);
// Fills result using adc waveform data using by fitting with the convolutionSinglePeakWithDynamicPedestal model
// NOTE : This function may begin with peak data provided in result which is replaced
virtual void process(const adcWaveform adcData, resultantHitData &result);
protected:
void fitParams2ResultantData(Double_t *fitParameters, resultantHitData &result);
private:
TGraphErrors _fitData;
TF1 _fitModel;
};
class FindDoublePeakWithDynamicPedestal : public FindDoublePeakRoot{
public:
// FindDoublePeakWithDynamicPedestal normal constructor with configStruct initilization parameters
FindDoublePeakWithDynamicPedestal(const configStruct &initParams) : FindDoublePeak(initParams);
// Fills result using adc waveform data using by fitting with the convolutionSinglePeakWithDynamicPedestal model
// NOTE : This function may begin with peak data provided in result which is replaced
virtual void process(const adcWaveform adcData, resultantHitData &result);
private:
TGraphErrors _fitData;
TF1 _fitModel;
void fitParams2ResultantData(Double_t *fitParameters, resultantHitData &result);
};
class FindMultiplePeaks : public FindPeakBaseRoot{
public:
// FindMultiplePeaks normal constructor with configStruct initilization parameters
FindMultiplePeaks(const configStruct &initParams) : FindPeakBase(initParams){}
// Fills result using adc waveform data using by fitting with the convolutionSinglePeakWithDynamicPedestal model
// NOTE : This function may begin with peak data provided in result which is replaced
virtual void process(const adcWaveform adcData, resultantHitData &result);
private:
// Performs explicit peak search on adc waveform data
void findPeaks(TGraphErrors &gr, const configStruct &initParams, resultantHitData &result, double sigma = 3.0);
// This function searches for another peak in the waveform data by subtracting out a dynamic pedestal
// from the adc waveform and finding the maximum adc value in the "subtracted data".
// This function is applied when no peak is found in the explicit peak search (findPeaks).
void dynamicPedestalAddPeak(TGraphErrors &gr, resultantHitData &result);
TGraphErrors _fitData;
TF1 _fitModel;
};