CMS 3D CMS Logo

HcalSiPMShape.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef HcalSimAlgos_HcalSiPMShape_h
3 #define HcalSimAlgos_HcalSiPMShape_h
4 
7 #include <vector>
8 
9 class HcalSiPMShape final : public CaloVShape {
10 public:
11  HcalSiPMShape(unsigned int signalShape = 206);
13 
14  ~HcalSiPMShape() override {}
15 
16  int nBins() const { return nBins_; }
17  double operator[](int i) const { return nt_[i]; }
18 
19  double operator()(double time) const override {
20  int jtime(time * HcalPulseShapes::invDeltaTSiPM_ + 0.5);
21  return (jtime >= 0 && jtime < nBins_) ? nt_[jtime] : 0;
22  }
23 
24  double timeToRise() const override { return 0.0; }
25 
26 protected:
27  void computeShape(unsigned int signalShape);
28 
29 private:
30  int nBins_;
31  std::vector<double> nt_;
32 };
33 
34 #endif //HcalSimAlgos_HcalSiPMShape_h
Electronic response of the preamp.
Definition: CaloVShape.h:11
int nBins() const
Definition: HcalSiPMShape.h:16
double operator()(double time) const override
Definition: HcalSiPMShape.h:19
std::vector< double > nt_
Definition: HcalSiPMShape.h:31
double operator[](int i) const
Definition: HcalSiPMShape.h:17
double timeToRise() const override
Definition: HcalSiPMShape.h:24
HcalSiPMShape(unsigned int signalShape=206)
Definition: HcalSiPMShape.cc:6
void computeShape(unsigned int signalShape)
static constexpr float invDeltaTSiPM_
~HcalSiPMShape() override
Definition: HcalSiPMShape.h:14