19 std::vector<float> ntmp(nbin,0.0);
26 for( j = 0; j < 3 * ts && j < nbin; j++){
27 ntmp[
j] = ((float)j)*
exp(-((
float)(j*j))/(ts*ts));
31 for( j = 0; j < 3 * ts && j < nbin; j++){
46 shape_=std::vector<float>(
n,0.0f);
50 if (i>=0 && i<nbin_) shape_[
i]=
f;
57 if (i>=0 && i<nbin_) rv=shape_[
i];
65 if (i>=0 && i<nbin_) rv=shape_[
i];
70 static const float int_delta_ns = 0.05f;
73 for (
double t = t1;
t < t2;
t+= int_delta_ns) {
75 float hiedge = at(
t+int_delta_ns);
76 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