CMS 3D CMS Logo

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

#include <HcalSiPMShape.h>

Inheritance diagram for HcalSiPMShape:
CaloVShape

Public Member Functions

 HcalSiPMShape (unsigned int signalShape=206)
 
 HcalSiPMShape (const HcalSiPMShape &other)
 
int nBins () const
 
double operator() (double time) const override
 
double operator[] (int i) const
 
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 9 of file HcalSiPMShape.h.

Constructor & Destructor Documentation

◆ HcalSiPMShape() [1/2]

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:31
void computeShape(unsigned int signalShape)
static constexpr float invDeltaTSiPM_

◆ HcalSiPMShape() [2/2]

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:31

◆ ~HcalSiPMShape()

HcalSiPMShape::~HcalSiPMShape ( )
inlineoverride

Definition at line 14 of file HcalSiPMShape.h.

14 {}

Member Function Documentation

◆ computeShape()

void HcalSiPMShape::computeShape ( unsigned int  signalShape)
protected

Definition at line 13 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().

13  {
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 }
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
static constexpr float deltaTSiPM_
static double analyticPulseShapeSiPMHO(double t)

◆ nBins()

int HcalSiPMShape::nBins ( ) const
inline

Definition at line 16 of file HcalSiPMShape.h.

References nBins_.

16 { return nBins_; }

◆ operator()()

double HcalSiPMShape::operator() ( double  time) const
inlineoverridevirtual

Implements CaloVShape.

Definition at line 19 of file HcalSiPMShape.h.

References HcalPulseShapes::invDeltaTSiPM_, nBins_, nt_, and hcalRecHitTable_cff::time.

19  {
20  int jtime(time * HcalPulseShapes::invDeltaTSiPM_ + 0.5);
21  return (jtime >= 0 && jtime < nBins_) ? nt_[jtime] : 0;
22  }
std::vector< double > nt_
Definition: HcalSiPMShape.h:31
static constexpr float invDeltaTSiPM_

◆ operator[]()

double HcalSiPMShape::operator[] ( int  i) const
inline

Definition at line 17 of file HcalSiPMShape.h.

References mps_fire::i, and nt_.

17 { return nt_[i]; }
std::vector< double > nt_
Definition: HcalSiPMShape.h:31

◆ timeToRise()

double HcalSiPMShape::timeToRise ( ) const
inlineoverridevirtual

Implements CaloVShape.

Definition at line 24 of file HcalSiPMShape.h.

24 { return 0.0; }

Member Data Documentation

◆ nBins_

int HcalSiPMShape::nBins_
private

Definition at line 30 of file HcalSiPMShape.h.

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

◆ nt_

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

Definition at line 31 of file HcalSiPMShape.h.

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