File indexing completed on 2024-04-06 12:29:21
0001 #include "SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h"
0002
0003 CaloShapeIntegrator::CaloShapeIntegrator(const CaloVShape *aShape) : m_shape(aShape) {}
0004
0005 CaloShapeIntegrator::~CaloShapeIntegrator() {}
0006
0007 double CaloShapeIntegrator::timeToRise() const { return m_shape->timeToRise(); }
0008
0009 double CaloShapeIntegrator::operator()(double startTime) const {
0010 double sum = 0.;
0011
0012 double time = startTime + 0.5;
0013
0014 for (unsigned istep = 0; istep < BUNCHSPACE; ++istep) {
0015 sum += (*m_shape)(time);
0016 time = time + 1.0;
0017 }
0018 return sum;
0019 }