17 std::vector<float> ntmp(nbin, 0.0);
24 for (j = 0; j < 3 * ts && j < nbin; j++) {
25 ntmp[j] = ((
float)j) *
exp(-((
float)(j * j)) / (ts * ts));
29 for (j = 0; j < 3 * ts && j < nbin; j++) {
44 shape_ = std::vector<float>(
n, 0.0f);
48 if (i >= 0 && i < nbin_)
54 int i = (
int)(t + 0.5);
56 if (i >= 0 && i < nbin_)
63 int i = (
int)(t + 0.5);
65 if (i >= 0 && i < nbin_)
71 static const float int_delta_ns = 0.05f;
74 for (
double t = t1;
t < t2;
t += int_delta_ns) {
76 float hiedge = at(
t + int_delta_ns);
77 intval += (loedge + hiedge) * int_delta_ns / 2.0;
float operator()(double time) const
float at(double time) const
void setShapeBin(int i, float f)
void computeCastorShape(Shape &s)
float integrate(double tmin, double tmax) const