10#include <ecl/digitization/EclConfiguration.h>
13#include <ecl/digitization/shaperdsp.h>
16#include <framework/database/DBObjPtr.h>
17#include <framework/dbobjects/HardwareClockSettings.h>
24using namespace Belle2::ECL;
43 m_rf = clock_info->getAcceleratorRF() * 1e3;
50 return 24.*12. /
getRF();
56 vector<double> MP(MPd, MPd + 10);
62 for (
int i = 0; i < N; i++) sum +=
m_ft[i];
70 for (
int i = 0; i < 10; i++) MPd[i] = MP[i];
76 total += s.Accumulate(a, t0, c);
87 const double tlen =
m_nl - 1.0 /
m_ns;
90 double t = t0 * itick;
91 double x0 = t, x1 = t + tlen;
93 if (x0 > tmax)
return 0;
110 double imind = ceil(x0 -
m_tmin);
113 double w = ((
m_tmin - t) + imind) * double(
m_ns);
120 const double w1 = a * w, w0 = a - w1;
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];
127 return sum * m_sumscale;
Class for accessing objects in the database.
static constexpr double m_tmin
lower range of the signal fitting region in ADC clocks
static constexpr double m_step
time between points in internal units t_{asrto}*m_rf/2.
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 double m_rf
RF clock, www-linac.kek.jp/linac-com/report/skb-tdr/, ch.
static constexpr int m_ns
number of samples per ADC clock
static double getTick()
See m_tick.
static double m_tick
== 72/127 digitization clock tick (in microseconds)
static double getRF()
See m_rf.
static constexpr int m_nsmp
number of ADC measurements for signal fitting
Class include function that calculate electronic response from energy deposit
void settimestride(double)
set grid step for function calculation
void fillarray(int, double *) const
fill array for amplitude and time calculation
Abstract base class for different kinds of events.
void AddHit(const double a, const double t0, const signalsample_t &q)
add hit method
a struct for a signal sample
double m_ft[m_nl *m_ns]
Simulated signal shape.
double Accumulate(const double a, const double t0, double *s) const
double m_sumscale
energy deposit in fitting window scale factor
void InitSample(const float *MP, double unitscale=-1)