CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HcalSiPMShape Class Reference

#include <HcalSiPMShape.h>

Inheritance diagram for HcalSiPMShape:
CaloVShape

Public Member Functions

 HcalSiPMShape (unsigned int signalShape=206)
 
 HcalSiPMShape (const HcalSiPMShape &other)
 
double operator() (double time) const override
 
double timeToRise () const override
 
 ~HcalSiPMShape () override
 
- Public Member Functions inherited from CaloVShape
 CaloVShape ()
 
virtual ~CaloVShape ()
 

Protected Member Functions

void computeShape (unsigned int signalShape)
 

Private Attributes

int nBins_
 
std::vector< double > nt_
 

Detailed Description

Definition at line 8 of file HcalSiPMShape.h.

Constructor & Destructor Documentation

HcalSiPMShape::HcalSiPMShape ( unsigned int  signalShape = 206)

Definition at line 6 of file HcalSiPMShape.cc.

References computeShape().

8  computeShape(signalShape);
9 }
static const int nBinsSiPM_
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
void computeShape(unsigned int signalShape)
static constexpr float invDeltaTSiPM_
HcalSiPMShape::HcalSiPMShape ( const HcalSiPMShape other)

Definition at line 11 of file HcalSiPMShape.cc.

11 : CaloVShape(other), nBins_(other.nBins_), nt_(other.nt_) {}
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
HcalSiPMShape::~HcalSiPMShape ( )
inlineoverride

Definition at line 13 of file HcalSiPMShape.h.

13 {}

Member Function Documentation

void HcalSiPMShape::computeShape ( unsigned int  signalShape)
protected

Definition at line 20 of file HcalSiPMShape.cc.

References HcalPulseShapes::analyticPulseShapeSiPMHE(), HcalPulseShapes::analyticPulseShapeSiPMHO(), HcalPulseShapes::deltaTSiPM_, HcalShapes::HAMAMATSU, HcalShapes::HE2017, HcalShapes::HE2018, dqmiolumiharvest::j, nBins_, nt_, or, and HcalShapes::ZECOTEK.

Referenced by HcalSiPMShape().

20  {
21  //grab correct function pointer based on shape
22  double (*analyticPulseShape)(double);
23  if (signalShape == HcalShapes::ZECOTEK || signalShape == HcalShapes::HAMAMATSU)
24  analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHO;
25  else if (signalShape == HcalShapes::HE2017 or signalShape == HcalShapes::HE2018)
26  analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHE;
27  else
28  return;
29 
30  double norm = 0.;
31  for (int j = 0; j < nBins_; ++j) {
32  nt_[j] = analyticPulseShape(j * HcalPulseShapes::deltaTSiPM_);
33  norm += (nt_[j] > 0) ? nt_[j] : 0.;
34  }
35 
36  for (int j = 0; j < nBins_; ++j) {
37  nt_[j] /= norm;
38  }
39 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
static double analyticPulseShapeSiPMHE(double t)
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
static constexpr float deltaTSiPM_
static double analyticPulseShapeSiPMHO(double t)
double HcalSiPMShape::operator() ( double  time) const
overridevirtual

Implements CaloVShape.

Definition at line 13 of file HcalSiPMShape.cc.

References HcalPulseShapes::invDeltaTSiPM_, nBins_, and nt_.

13  {
14  int jtime(time * HcalPulseShapes::invDeltaTSiPM_ + 0.5);
15  if (jtime >= 0 && jtime < nBins_)
16  return nt_[jtime];
17  return 0.;
18 }
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
static constexpr float invDeltaTSiPM_
double HcalSiPMShape::timeToRise ( ) const
inlineoverridevirtual

Implements CaloVShape.

Definition at line 17 of file HcalSiPMShape.h.

17 { return 0.0; }

Member Data Documentation

int HcalSiPMShape::nBins_
private

Definition at line 23 of file HcalSiPMShape.h.

Referenced by computeShape(), and operator()().

std::vector<double> HcalSiPMShape::nt_
private

Definition at line 24 of file HcalSiPMShape.h.

Referenced by computeShape(), and operator()().