CMS 3D CMS Logo

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

#include <CaloShapeIntegrator.h>

Inheritance diagram for CaloShapeIntegrator:
CaloVShape

Public Types

enum  { BUNCHSPACE = 25 }
 

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

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.

Member Enumeration Documentation

anonymous enum
Enumerator
BUNCHSPACE 

Definition at line 13 of file CaloShapeIntegrator.h.

Constructor & Destructor Documentation

CaloShapeIntegrator::CaloShapeIntegrator ( const CaloVShape aShape)

Definition at line 3 of file CaloShapeIntegrator.cc.

3 : m_shape(aShape) {}
const CaloVShape * m_shape
CaloShapeIntegrator::~CaloShapeIntegrator ( )
override

Definition at line 5 of file CaloShapeIntegrator.cc.

5 {}

Member Function Documentation

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

Implements CaloVShape.

Definition at line 9 of file CaloShapeIntegrator.cc.

References BUNCHSPACE, and protons_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 }
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

const CaloVShape* CaloShapeIntegrator::m_shape
private

Definition at line 23 of file CaloShapeIntegrator.h.

Referenced by timeToRise().