CMS 3D CMS Logo

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 (const HcalSiPMShape &other)
 
 HcalSiPMShape (unsigned int signalShape=206)
 
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() [1/2]

HcalSiPMShape::HcalSiPMShape ( unsigned int  signalShape = 206)

Definition at line 6 of file HcalSiPMShape.cc.

References computeShape().

◆ 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_) {}

◆ ~HcalSiPMShape()

HcalSiPMShape::~HcalSiPMShape ( )
inlineoverride

Definition at line 13 of file HcalSiPMShape.h.

13 {}

Member Function Documentation

◆ computeShape()

void HcalSiPMShape::computeShape ( unsigned int  signalShape)
protected

Definition at line 20 of file HcalSiPMShape.cc.

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 }

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

Referenced by HcalSiPMShape().

◆ operator()()

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

Implements CaloVShape.

Definition at line 13 of file HcalSiPMShape.cc.

13  {
14  int jtime(time * HcalPulseShapes::invDeltaTSiPM_ + 0.5);
15  if (jtime >= 0 && jtime < nBins_)
16  return nt_[jtime];
17  return 0.;
18 }

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

◆ timeToRise()

double HcalSiPMShape::timeToRise ( ) const
inlineoverridevirtual

Implements CaloVShape.

Definition at line 17 of file HcalSiPMShape.h.

17 { return 0.0; }

Member Data Documentation

◆ nBins_

int HcalSiPMShape::nBins_
private

Definition at line 23 of file HcalSiPMShape.h.

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

◆ nt_

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

Definition at line 24 of file HcalSiPMShape.h.

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

HcalPulseShapes::invDeltaTSiPM_
static constexpr float invDeltaTSiPM_
Definition: HcalPulseShapes.h:47
CaloVShape::CaloVShape
CaloVShape()
Definition: CaloVShape.h:13
HcalSiPMShape::computeShape
void computeShape(unsigned int signalShape)
Definition: HcalSiPMShape.cc:20
HcalShapes::HE2017
Definition: HcalShapes.h:20
HcalSiPMShape::nBins_
int nBins_
Definition: HcalSiPMShape.h:23
HcalSiPMShape::nt_
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
HcalPulseShapes::nBinsSiPM_
static const int nBinsSiPM_
Definition: HcalPulseShapes.h:45
protons_cff.time
time
Definition: protons_cff.py:39
HcalPulseShapes::deltaTSiPM_
static constexpr float deltaTSiPM_
Definition: HcalPulseShapes.h:46
trackingPlots.other
other
Definition: trackingPlots.py:1460
HcalShapes::HE2018
Definition: HcalShapes.h:20
HcalPulseShapes::analyticPulseShapeSiPMHE
static double analyticPulseShapeSiPMHE(double t)
Definition: HcalPulseShapes.cc:575
HcalShapes::HAMAMATSU
Definition: HcalShapes.h:20
HcalShapes::ZECOTEK
Definition: HcalShapes.h:20
or
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
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HcalPulseShapes::analyticPulseShapeSiPMHO
static double analyticPulseShapeSiPMHO(double t)
Definition: HcalPulseShapes.cc:568