16 const float threshold1,
17 const float threshold2)
const 20 std::array<float,3>
times_tmp = { {0., 0., 0.} };
30 unsigned int index_LT1 = 0;
31 unsigned int index_LT2 = 0;
37 if( amplitude > threshold1 && index_LT1 == 0 )
40 if( amplitude > threshold2 && index_LT2 == 0 ){
49 unsigned int index_FT1 = 0;
55 if( amplitude>threshold1 && index_FT1==0){
72 (index_LT2-1)*qNSecPerBin_,
73 index_LT2*qNSecPerBin_,
79 (index_FT1-1)*qNSecPerBin_,
80 index_FT1*qNSecPerBin_,
108 for(
unsigned int i=0;
i<
shape_.size(); ++
i ) {
128 LogDebug(
"MTDShapeBase") <<
" MTD pulse shape requested for out of range time " << aTime;
146 const double&
x1,
const double&
x2,
147 const double& y1,
const double& y2)
const 151 throw cms::Exception(
"BadValue") <<
" MTDShapeBase: Trying to interpolate two points with the same x coordinate!";
153 double a = (y2-y1)/(x2-x1);
154 double b = y1 - a*
x1;
const double qNSecPerBin_
unsigned int timeIndex(double aTime) const
unsigned int indexOfMax() const
static constexpr unsigned int kNBinsPerNSec
double operator()(double aTime) const override
static constexpr unsigned int k1NSecBinsTotal
std::array< float, 3 > timeAtThr(const float scale, const float threshold1, const float threshold2) const
double linear_interpolation(const double &y, const double &x1, const double &x2, const double &y1, const double &y2) const
std::vector< double > DVec
virtual void fillShape(DVec &aVec) const =0