CMS 3D CMS Logo

CaloCachedShapeIntegrator.cc
Go to the documentation of this file.
2 
3 const int NBINS = 281; // 256, plus 25 before
4 
6  v_(NBINS, 0.),
7  timeToRise_(aShape->timeToRise())
8 {
9  for(int t = 0; t < 256; ++t)
10  {
11  double amount = (*aShape)(t);
12  for(int istep = 0; istep < 25; ++istep)
13  {
14  int ibin = t + istep;
15  v_[ibin] += amount;
16  }
17  }
18 }
19 
21 {
22 }
23 
24 double
26 {
27  return timeToRise_;
28 }
29 
30 double
31 CaloCachedShapeIntegrator::operator() ( double startTime ) const
32 {
33  // round up, and account for the -25 ns offset
34  int ibin = static_cast<int>(startTime+25.0);
35  return (ibin<0 || ibin >= NBINS) ? 0. : v_[ibin];
36 }
37 
38 
double timeToRise() const override
CaloCachedShapeIntegrator(const CaloVShape *aShape)
Electronic response of the preamp.
Definition: CaloVShape.h:11
double operator()(double startTime) const override
const int NBINS