CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 ()
 
 HcalSiPMShape (const HcalSiPMShape &other)
 
virtual double operator() (double time) const
 
virtual double timeToRise () const
 
virtual ~HcalSiPMShape ()
 
- Public Member Functions inherited from CaloVShape
 CaloVShape ()
 
virtual ~CaloVShape ()
 

Protected Member Functions

void computeShape ()
 

Private Attributes

int nBins_
 
std::vector< double > nt_
 

Detailed Description

Definition at line 8 of file HcalSiPMShape.h.

Constructor & Destructor Documentation

HcalSiPMShape::HcalSiPMShape ( )

Definition at line 5 of file HcalSiPMShape.cc.

References computeShape().

5  : CaloVShape(), nBins_(512), nt_(nBins_, 0.) {
6  computeShape();
7 }
std::vector< double > nt_
Definition: HcalSiPMShape.h:25
void computeShape()
HcalSiPMShape::HcalSiPMShape ( const HcalSiPMShape other)

Definition at line 9 of file HcalSiPMShape.cc.

9  :
10  CaloVShape(other), nBins_(other.nBins_), nt_(other.nt_) {
11 }
std::vector< double > nt_
Definition: HcalSiPMShape.h:25
virtual HcalSiPMShape::~HcalSiPMShape ( )
inlinevirtual

Definition at line 14 of file HcalSiPMShape.h.

14 {}

Member Function Documentation

void HcalSiPMShape::computeShape ( )
protected

Definition at line 20 of file HcalSiPMShape.cc.

References j, nBins_, and nt_.

Referenced by HcalSiPMShape().

20  {
21 
22  double norm = 0.;
23  for (int j = 0; j < nBins_; ++j) {
24  if (j <= 31.)
25  nt_[j] = 2.15*j;
26  else if ((j > 31) && (j <= 96))
27  nt_[j] = 102.1 - 1.12*j;
28  else
29  nt_[j] = 0.0076*j - 6.4;
30  norm += (nt_[j]>0) ? nt_[j] : 0.;
31  }
32 
33  for (int j = 0; j < nBins_; ++j) {
34  nt_[j] /= norm;
35  }
36 }
std::vector< double > nt_
Definition: HcalSiPMShape.h:25
int j
Definition: DBlmapReader.cc:9
double HcalSiPMShape::operator() ( double  time) const
virtual

Implements CaloVShape.

Definition at line 13 of file HcalSiPMShape.cc.

References nBins_, and nt_.

13  {
14  int jtime = static_cast<int>(time + 0.5);
15  if (jtime>=0 && jtime<nBins_)
16  return nt_[jtime];
17  return 0.;
18 }
std::vector< double > nt_
Definition: HcalSiPMShape.h:25
virtual double HcalSiPMShape::timeToRise ( ) const
inlinevirtual

Implements CaloVShape.

Definition at line 18 of file HcalSiPMShape.h.

18 {return 33.;}

Member Data Documentation

int HcalSiPMShape::nBins_
private

Definition at line 24 of file HcalSiPMShape.h.

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

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

Definition at line 25 of file HcalSiPMShape.h.

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