10 #include <ecl/digitization/EclConfiguration.h>
13 #include <ecl/digitization/shaperdsp.h>
16 #include <framework/database/DBObjPtr.h>
17 #include <framework/dbobjects/HardwareClockSettings.h>
24 using namespace Belle2::ECL;
50 return 24.*12. / getRF();
55 const int N = m_ns * m_nl;
56 vector<double> MP(MPd, MPd + 10);
62 for (
int i = 0; i < N; i++) sum += m_ft[i];
63 m_sumscale = m_ns / sum;
70 for (
int i = 0; i < 10; i++) MPd[i] = MP[i];
76 total += s.Accumulate(a, t0, c);
86 const double itick = getRF() / s_clock;
87 const double tlen = m_nl - 1.0 / m_ns;
88 const double tmax = m_tmin + m_nsmp - 1;
90 double t = t0 * itick;
91 double x0 = t, x1 = t + tlen;
93 if (x0 > tmax)
return 0;
95 if (x1 < m_tmin)
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;
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 double m_rf
RF clock, www-linac.kek.jp/linac-com/report/skb-tdr/, ch.
static double getTick()
See m_tick.
static double m_tick
== 72/127 digitization clock tick (in microseconds)
static double getRF()
See m_rf.
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
double getAcceleratorRF() const
Get the accelerator RF value.
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 Accumulate(const double a, const double t0, double *s) const
void InitSample(const float *MP, double unitscale=-1)