7 : qNSecPerBin_(1. / kNBinsPerNSec), indexOfMax_(0), timeOfMax_(0.), shape_(
DVec(k1NSecBinsTotal, 0.0)) {}
10 std::array<float, 3> times_tmp = {{0., 0., 0.}};
18 unsigned int index_LT1 = 0;
19 unsigned int index_LT2 = 0;
24 if (
amplitude > threshold1 && index_LT1 == 0)
27 if (
amplitude > threshold2 && index_LT2 == 0) {
34 unsigned int index_FT1 = 0;
39 if (
amplitude > threshold1 && index_FT1 == 0) {
78 for (
unsigned int i = 0;
i <
shape_.size(); ++
i) {
93 LogDebug(
"MTDShapeBase") <<
" MTD pulse shape requested for out of range time " << aTime;
105 const double&
y,
const double&
x1,
const double&
x2,
const double&
y1,
const double&
y2)
const {
107 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