CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
CaloShapeIntegrator Class Reference

#include <CaloShapeIntegrator.h>

Inheritance diagram for CaloShapeIntegrator:
CaloVShape

Public Member Functions

 CaloShapeIntegrator (const CaloVShape *aShape)
 
double operator() (double startTime) const override
 
double timeToRise () const override
 
 ~CaloShapeIntegrator () override
 
- Public Member Functions inherited from CaloVShape
 CaloVShape ()
 
virtual ~CaloVShape ()
 

Static Public Attributes

static constexpr int BUNCHSPACE = 25
 

Private Attributes

const CaloVShapem_shape
 

Detailed Description

This class takes an existing Shape, and integrates it, summing up all the values, each nanosecond, up to the bunch spacing

Definition at line 11 of file CaloShapeIntegrator.h.

Constructor & Destructor Documentation

◆ CaloShapeIntegrator()

CaloShapeIntegrator::CaloShapeIntegrator ( const CaloVShape aShape)

Definition at line 3 of file CaloShapeIntegrator.cc.

3 : m_shape(aShape) {}
const CaloVShape * m_shape

◆ ~CaloShapeIntegrator()

CaloShapeIntegrator::~CaloShapeIntegrator ( )
override

Definition at line 5 of file CaloShapeIntegrator.cc.

5 {}

Member Function Documentation

◆ operator()()

double CaloShapeIntegrator::operator() ( double  startTime) const
overridevirtual

Implements CaloVShape.

Definition at line 9 of file CaloShapeIntegrator.cc.

References BUNCHSPACE, beamSpotPI::startTime, and hcalRecHitTable_cff::time.

9  {
10  double sum = 0.;
11 
12  double time = startTime + 0.5;
13 
14  for (unsigned istep = 0; istep < BUNCHSPACE; ++istep) {
15  sum += (*m_shape)(time);
16  time = time + 1.0;
17  }
18  return sum;
19 }
static constexpr int BUNCHSPACE

◆ timeToRise()

double CaloShapeIntegrator::timeToRise ( ) const
overridevirtual

Implements CaloVShape.

Definition at line 7 of file CaloShapeIntegrator.cc.

References m_shape, and CaloVShape::timeToRise().

7 { return m_shape->timeToRise(); }
virtual double timeToRise() const =0
const CaloVShape * m_shape

Member Data Documentation

◆ BUNCHSPACE

constexpr int CaloShapeIntegrator::BUNCHSPACE = 25
static

Definition at line 13 of file CaloShapeIntegrator.h.

Referenced by operator()().

◆ m_shape

const CaloVShape* CaloShapeIntegrator::m_shape
private

Definition at line 23 of file CaloShapeIntegrator.h.

Referenced by timeToRise().