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

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

Definition at line 10 of file HcalSiPMShape.cc.

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

Definition at line 14 of file HcalSiPMShape.h.

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

14 {}

Member Function Documentation

void HcalSiPMShape::computeShape ( unsigned int  signalShape)
protected

Definition at line 19 of file HcalSiPMShape.cc.

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

Referenced by HcalSiPMShape(), and timeToRise().

19  {
20  //grab correct function pointer based on shape
21  double (*analyticPulseShape)(double);
22  if(signalShape==HcalShapes::ZECOTEK || signalShape==HcalShapes::HAMAMATSU) analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHO;
23  else if(signalShape==HcalShapes::HE2017 or signalShape==HcalShapes::HE2018) analyticPulseShape = &HcalPulseShapes::analyticPulseShapeSiPMHE;
24  else return;
25 
26  double norm = 0.;
27  for (int j = 0; j < nBins_; ++j) {
28  nt_[j] = analyticPulseShape(j*HcalPulseShapes::deltaTSiPM_);
29  norm += (nt_[j]>0) ? nt_[j] : 0.;
30  }
31 
32  for (int j = 0; j < nBins_; ++j) {
33  nt_[j] /= norm;
34  }
35 }
static double analyticPulseShapeSiPMHE(double t)
std::vector< double > nt_
Definition: HcalSiPMShape.h:26
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 12 of file HcalSiPMShape.cc.

References HcalPulseShapes::invDeltaTSiPM_, nBins_, and nt_.

Referenced by ~HcalSiPMShape().

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

Implements CaloVShape.

Definition at line 18 of file HcalSiPMShape.h.

References computeShape().

18 {return 0.0;}

Member Data Documentation

int HcalSiPMShape::nBins_
private

Definition at line 25 of file HcalSiPMShape.h.

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

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

Definition at line 26 of file HcalSiPMShape.h.

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