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

References operator()(), and ntuplemaker::time.

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(), and timeToRise().

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 }
static double analyticPulseShapeSiPMHE(double t)
std::vector< double > nt_
Definition: HcalSiPMShape.h:24
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 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_.

Referenced by ~HcalSiPMShape().

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 float invDeltaTSiPM_
double HcalSiPMShape::timeToRise ( ) const
inlineoverridevirtual

Implements CaloVShape.

Definition at line 17 of file HcalSiPMShape.h.

References computeShape().

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()().