a struct for a signal sample
More...
#include <EclConfiguration.h>
|
void | InitSample (const float *MP, double unitscale=-1) |
|
void | InitSample (const double *MPd, double unitscale=-1) |
|
double | Accumulate (const double a, const double t0, double *s) const |
|
|
double | m_sumscale |
| energy deposit in fitting window scale factor
|
|
double | m_ft [m_nl *m_ns] |
| Simulated signal shape.
|
|
a struct for a signal sample
Definition at line 63 of file EclConfiguration.h.
◆ Accumulate()
double Accumulate |
( |
const double |
a, |
|
|
const double |
t0, |
|
|
double * |
s |
|
) |
| const |
- Parameters
-
[in] | a | Signal amplitude |
[in] | t0 | Signal offset |
[out] | s | Output array with added signal |
- Returns
- Energy deposition in ADC units
Definition at line 79 of file EclConfiguration.cc.
80{
81
82
83
84
85
87 const double tlen =
m_nl - 1.0 /
m_ns;
89
90 double t = t0 * itick;
91 double x0 = t, x1 = t + tlen;
92
93 if (x0 > tmax) return 0;
97 }
98
100
101
102 if (x1 < tmax) {
103
104
106
107 imax += 1;
108 }
109
110 double imind = ceil(x0 -
m_tmin);
111
112 int imin = imind;
113 double w = ((
m_tmin - t) + imind) * double(
m_ns);
114 int jmin = w;
115 w -= jmin;
116
117
118
119
120 const double w1 = a * w, w0 = a - w1;
121 double sum = 0;
122 for (
int i = imin, j = jmin; i < imax; i++, j +=
m_ns) {
123 double amp = w0 *
m_ft[j] + w1 *
m_ft[j + 1];
124 s[i] += amp;
125 sum += amp;
126 }
128}
static constexpr double m_tmin
lower range of the signal fitting region in ADC clocks
static constexpr double s_clock
digitization clock in RF units
static constexpr int m_nl
length of samples signal in number of ADC clocks
static constexpr int m_ns
number of samples per ADC clock
static double getRF()
See m_rf.
static constexpr int m_nsmp
number of ADC measurements for signal fitting
double m_ft[m_nl *m_ns]
Simulated signal shape.
double m_sumscale
energy deposit in fitting window scale factor
◆ InitSample() [1/2]
void InitSample |
( |
const double * |
MPd, |
|
|
double |
unitscale = -1 |
|
) |
| |
- Parameters
-
MPd | Double array of waveform parameters |
unitscale | Normalization of template waveform |
Definition at line 53 of file EclConfiguration.cc.
54{
56 vector<double> MP(MPd, MPd + 10);
59 dsp.fillarray(0.0, N,
m_ft);
60
61 double sum = 0;
62 for (
int i = 0; i < N; i++) sum +=
m_ft[i];
64}
static constexpr double m_step
time between points in internal units t_{asrto}*m_rf/2.
Class include function that calculate electronic response from energy deposit
◆ InitSample() [2/2]
void InitSample |
( |
const float * |
MP, |
|
|
double |
unitscale = -1 |
|
) |
| |
- Parameters
-
MP | Float array of waveform parameters |
unitscale | Normalization of template waveform |
Definition at line 67 of file EclConfiguration.cc.
68{
69 double MPd[10];
70 for (int i = 0; i < 10; i++) MPd[i] = MP[i];
72}
void InitSample(const float *MP, double unitscale=-1)
◆ m_ft
◆ m_sumscale
The documentation for this struct was generated from the following files: