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 12 of file CaloShapeIntegrator.h.

Member Enumeration Documentation

anonymous enum
Enumerator
BUNCHSPACE 

Definition at line 16 of file CaloShapeIntegrator.h.

Constructor & Destructor Documentation

CaloShapeIntegrator::CaloShapeIntegrator ( const CaloVShape aShape)

Definition at line 3 of file CaloShapeIntegrator.cc.

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

Definition at line 8 of file CaloShapeIntegrator.cc.

9 {
10 }

Member Function Documentation

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

Implements CaloVShape.

Definition at line 19 of file CaloShapeIntegrator.cc.

References BUNCHSPACE, and ntuplemaker::time.

20 {
21  double sum = 0.;
22 
23  double time = startTime + 0.5 ;
24 
25  for( unsigned istep = 0; istep < BUNCHSPACE ; ++istep )
26  {
27  sum += (*m_shape)( time ) ;
28  time = time + 1.0 ;
29  }
30  return sum;
31 }
double CaloShapeIntegrator::timeToRise ( ) const
overridevirtual

Implements CaloVShape.

Definition at line 13 of file CaloShapeIntegrator.cc.

References m_shape, and CaloVShape::timeToRise().

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

Member Data Documentation

const CaloVShape* CaloShapeIntegrator::m_shape
private

Definition at line 27 of file CaloShapeIntegrator.h.

Referenced by timeToRise().