7 : qNSecPerBin_(1. / kNBinsPerNSec),
11 shape_(
DVec(k1NSecBinsTotal, 0.0)) {}
14 std::array<float, 3> times_tmp = {{0., 0., 0.}};
22 unsigned int index_LT1 = 0;
23 unsigned int index_LT2 = 0;
28 if (
amplitude > threshold1 && index_LT1 == 0)
31 if (
amplitude > threshold2 && index_LT2 == 0) {
38 unsigned int index_FT1 = 0;
43 if (
amplitude > threshold1 && index_FT1 == 0) {
86 for (
unsigned int i = 0;
i <
shape_.size(); ++
i) {
108 LogDebug(
"MTDShapeBase") <<
" MTD pulse shape requested for out of range time " << aTime;
120 const double&
y,
const double&
x1,
const double&
x2,
const double&
y1,
const double&
y2)
const {
122 throw cms::Exception(
"BadValue") <<
" MTDShapeBase: Trying to interpolate two points with the same x coordinate!";
std::array< float, 3 > timeAtThr(const float scale, const float threshold1, const float threshold2) const
virtual void fillShape(DVec &aVec) const =0
const double qNSecPerBin_
static constexpr unsigned int kNBinsPerNSec
double linear_interpolation(const double &y, const double &x1, const double &x2, const double &y1, const double &y2) const
static constexpr unsigned int k1NSecBinsTotal
double operator()(double aTime) const override
unsigned int indexOfMax() const
unsigned int timeIndex(double aTime) const
std::vector< double > DVec