17 m_firstIndexOverThreshold ( 0 ) ,
18 m_firstTimeOverThreshold ( 0.0 ) ,
21 m_shape (
DVec( kNBinsStored, 0.0 ) ) ,
22 m_derivPtr ( aSaveDerivative ? new
DVec( kNBinsStored, 0.0 ) : 0 )
52 const double maxel ( *max_element( shapeArray.begin(), shapeArray.end() ) ) ;
54 const double maxelt ( 1.
e-5 < maxel ? maxel : 1 ) ;
56 for(
unsigned int i ( 0 ) ;
i != shapeArray.size(); ++
i )
58 shapeArray[
i] = shapeArray[
i]/maxelt ;
82 shapeArray.size() == 1 + ibin )
84 value = shapeArray[ibin];
89 const double x ( xb - ( ibin + 0.5 ) ) ;
90 const double f1 ( shapeArray[ ibin - 1 ] ) ;
91 const double f2 ( shapeArray[ ibin ] ) ;
92 const double f3 ( shapeArray[ ibin + 1 ] ) ;
93 const double a ( f2 ) ;
94 const double b ( ( f3 - f1 )/2. ) ;
95 const double c ( ( f1 + f3 )/2. - f2 ) ;
96 value = a + b*x + c*x*
x;
97 deriv = ( b + 2*c*
x )/delta ;
134 LogDebug(
"EcalShapeBase") <<
" ECAL MGPA shape requested for out of range time " << aTime ;
double operator()(double aTime) const
double derivative(double time) const
static const double qNSecPerBin
EcalShapeBase(bool aSaveDerivative)
int bad(Items const &cont)
virtual double threshold() const =0
std::vector< double > DVec
unsigned int timeIndex(double aTime) const
double m_firstTimeOverThreshold
virtual void fillShape(DVec &aVec) const =0
unsigned int m_indexOfMax
unsigned int m_firstIndexOverThreshold
virtual double timeToRise() const