12 : m_useDBShape(useDBShape),
13 m_firstIndexOverThreshold(0),
14 m_firstTimeOverThreshold(0.0),
32 float time_interval = 0;
48 const double maxel(*max_element(shapeArray.begin(), shapeArray.end()));
50 const double maxelt(1.
e-5 < maxel ? maxel : 1);
52 for (
unsigned int i(0);
i != shapeArray.size(); ++
i) {
53 shapeArray[
i] = shapeArray[
i] / maxelt;
60 for (
unsigned int denseIndex(0); denseIndex !=
m_denseArraySize; ++denseIndex) {
63 const unsigned int ibin(denseIndex / 10);
68 if (0 == ibin || shapeArray.size() == 1 + ibin)
70 value = shapeArray[ibin];
73 const double x(xb - (ibin + 0.5) * time_interval);
74 const double f1(shapeArray[ibin - 1]);
75 const double f2(shapeArray[ibin]);
76 const double f3(shapeArray[ibin + 1]);
78 const double b((f3 -
f1) / (2. * time_interval));
79 const double c(((
f1 + f3) / 2. -
f2) / (time_interval * time_interval));
105 LogDebug(
"EcalShapeBase") <<
" ECAL MGPA shape requested for out of range time " << aTime;
126 fs <<
"vec.push_back(" <<
i <<
");\n";
double derivative(double time) const
virtual void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const =0
void buildMe(const edm::EventSetup *=nullptr)
double timeToRise() const override
unsigned int m_denseArraySize
~EcalShapeBase() override
std::vector< double > DVec
double m_firstTimeOverThreshold
void m_shape_print(const char *fileName)
unsigned int m_indexOfMax
unsigned int m_firstIndexOverThreshold
void setEventSetup(const edm::EventSetup &evtSetup)
unsigned int timeIndex(double aTime) const
unsigned int m_kNBinsPerNSec
double operator()(double aTime) const override