ALERT
Loading...
Searching...
No Matches
cpp
ahdc
analysis
ahdcExtractor.h
1
#ifndef AHDC_EXTRACTOR_H
2
#define AHDC_EXTRACTOR_H
3
4
#include <vector>
5
#include <map>
6
#include <string>
7
13
class
ahdcExtractor
{
14
public :
15
float
samplingTime
;
16
int
sparseSample
= 0;
17
short
adcOffset
= 0;
18
long
timeStamp
= 0;
19
float
fineTimeStampResolution
= 0;
20
static
const
short
ADC_LIMIT
= 4095;
21
float
amplitudeFractionCFA
;
22
int
binDelayCFD
;
23
float
fractionCFD
;
24
25
public :
26
int
binMax
;
27
int
binOffset
;
28
float
adcMax
;
29
float
timeMax
;
30
float
integral
;
31
32
std::vector<short>
samplesCorr
;
33
int
binNumber
;
34
35
float
timeRiseCFA
;
36
float
timeFallCFA
;
37
float
timeOverThresholdCFA
;
38
float
timeCFD
;
39
41
ahdcExtractor
() =
default
;
42
44
ahdcExtractor
(
float
_samplingTime,
float
_amplitudeFractionCFA,
int
_binDelayCFD,
float
_fractionCFD) :
45
samplingTime
(_samplingTime),
amplitudeFractionCFA
(_amplitudeFractionCFA),
binDelayCFD
(_binDelayCFD),
fractionCFD
(_fractionCFD) {}
46
48
~ahdcExtractor
(){;}
49
56
std::map<std::string,double>
extract
(
const
std::vector<short> samples);
57
58
private :
64
void
waveformCorrection();
65
72
void
fitAverage();
73
77
void
fitParabolic();
78
87
void
fineTimeStampCorrection();
88
97
void
computeTimeAtConstantFractionAmplitude();
98
108
void
computeTimeUsingConstantFractionDiscriminator();
109
public
:
110
std::vector<float>
samplesCFD
;
111
116
void
Show
(
const
char
* filename);
117
122
void
ShowCFD
(
const
char
* filename);
123
};
124
125
#endif
ahdcExtractor
Definition
ahdcExtractor.h:13
ahdcExtractor::sparseSample
int sparseSample
used to defined binOffset
Definition
ahdcExtractor.h:16
ahdcExtractor::samplesCFD
std::vector< float > samplesCFD
samples corresponding to the CFD signal
Definition
ahdcExtractor.h:110
ahdcExtractor::integral
float integral
Sum of ADCs over the pulse (not fitted)
Definition
ahdcExtractor.h:30
ahdcExtractor::adcMax
float adcMax
Max value of ADC over the pulse (fitted)
Definition
ahdcExtractor.h:28
ahdcExtractor::timeCFD
float timeCFD
time extracted using the Constant Fraction Discriminator (CFD) algorithm (fitted)
Definition
ahdcExtractor.h:38
ahdcExtractor::timeOverThresholdCFA
float timeOverThresholdCFA
is equal to (timeFallCFA - timeRiseCFA)
Definition
ahdcExtractor.h:37
ahdcExtractor::ADC_LIMIT
static const short ADC_LIMIT
Maximum value of ADC : 2^12-1.
Definition
ahdcExtractor.h:20
ahdcExtractor::timeMax
float timeMax
Time of the max ADC over the pulse (fitted)
Definition
ahdcExtractor.h:29
ahdcExtractor::binOffset
int binOffset
Offset due to sparse sample.
Definition
ahdcExtractor.h:27
ahdcExtractor::binDelayCFD
int binDelayCFD
CFD delay parameter.
Definition
ahdcExtractor.h:22
ahdcExtractor::samplesCorr
std::vector< short > samplesCorr
Waveform after offset (pedestal) correction.
Definition
ahdcExtractor.h:32
ahdcExtractor::ahdcExtractor
ahdcExtractor(float _samplingTime, float _amplitudeFractionCFA, int _binDelayCFD, float _fractionCFD)
Constructor.
Definition
ahdcExtractor.h:44
ahdcExtractor::extract
std::map< std::string, double > extract(const std::vector< short > samples)
Definition
ahdcExtractor.cpp:19
ahdcExtractor::adcOffset
short adcOffset
pedestal or noise level
Definition
ahdcExtractor.h:17
ahdcExtractor::Show
void Show(const char *filename)
Show the extracted data in a figure.
Definition
ahdcExtractor.cpp:161
ahdcExtractor::timeFallCFA
float timeFallCFA
moment when the signal reaches a Constant Fraction of its Amplitude downhill (fitted)
Definition
ahdcExtractor.h:36
ahdcExtractor::ShowCFD
void ShowCFD(const char *filename)
Show the CFD signal.
Definition
ahdcExtractor.cpp:236
ahdcExtractor::~ahdcExtractor
~ahdcExtractor()
Destructor.
Definition
ahdcExtractor.h:48
ahdcExtractor::fineTimeStampResolution
float fineTimeStampResolution
precision of dream clock (usually 8)
Definition
ahdcExtractor.h:19
ahdcExtractor::binNumber
int binNumber
Number of bins in one waveform.
Definition
ahdcExtractor.h:33
ahdcExtractor::ahdcExtractor
ahdcExtractor()=default
Default constructor.
ahdcExtractor::timeStamp
long timeStamp
timeStamp timing informations (used to make fine corrections)
Definition
ahdcExtractor.h:18
ahdcExtractor::amplitudeFractionCFA
float amplitudeFractionCFA
amplitude fraction between 0 and 1
Definition
ahdcExtractor.h:21
ahdcExtractor::timeRiseCFA
float timeRiseCFA
moment when the signal reaches a Constant Fraction of its Amplitude uphill (fitted)
Definition
ahdcExtractor.h:35
ahdcExtractor::samplingTime
float samplingTime
time between two ADC bins
Definition
ahdcExtractor.h:15
ahdcExtractor::fractionCFD
float fractionCFD
CFD fraction parameter between 0 and 1.
Definition
ahdcExtractor.h:23
ahdcExtractor::binMax
int binMax
Bin of the max ADC over the pulse.
Definition
ahdcExtractor.h:26
Generated by
1.11.0