CMS 3D CMS Logo

HcalSiPMShape.cc
Go to the documentation of this file.
4 #include <iostream>
5 
6 HcalSiPMShape::HcalSiPMShape(unsigned int signalShape)
7  : CaloVShape(), nBins_(HcalPulseShapes::nBinsSiPM_ * HcalPulseShapes::invDeltaTSiPM_), nt_(nBins_, 0.) {
8  computeShape(signalShape);
9 }
10 
12 
13 void HcalSiPMShape::computeShape(unsigned int signalShape) {
14  //grab correct function pointer based on shape
15  double (*analyticPulseShape)(double);
16  if (signalShape == HcalShapes::ZECOTEK || signalShape == HcalShapes::HAMAMATSU)
17  analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHO;
18  else if (signalShape == HcalShapes::HE2017 or signalShape == HcalShapes::HE2018)
19  analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHE;
20  else
21  return;
22 
23  double norm = 0.;
24  for (int j = 0; j < nBins_; ++j) {
25  nt_[j] = analyticPulseShape(j * HcalPulseShapes::deltaTSiPM_);
26  norm += (nt_[j] > 0) ? nt_[j] : 0.;
27  }
28 
29  for (int j = 0; j < nBins_; ++j) {
30  nt_[j] /= norm;
31  }
32 }
Electronic response of the preamp.
Definition: CaloVShape.h:11
static double analyticPulseShapeSiPMHE(double t)
std::vector< double > nt_
Definition: HcalSiPMShape.h:31
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcalSiPMShape(unsigned int signalShape=206)
Definition: HcalSiPMShape.cc:6
void computeShape(unsigned int signalShape)
static constexpr float deltaTSiPM_
static double analyticPulseShapeSiPMHO(double t)