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

anonymous enum
Enumerator
BUNCHSPACE 

Definition at line 13 of file CaloShapeIntegrator.h.

13 { BUNCHSPACE = 25 };

Constructor & Destructor Documentation

◆ CaloShapeIntegrator()

CaloShapeIntegrator::CaloShapeIntegrator ( const CaloVShape aShape)

Definition at line 3 of file CaloShapeIntegrator.cc.

3 : m_shape(aShape) {}

◆ ~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.

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 }

References BUNCHSPACE, and ntuplemaker::time.

◆ timeToRise()

double CaloShapeIntegrator::timeToRise ( ) const
overridevirtual

Implements CaloVShape.

Definition at line 7 of file CaloShapeIntegrator.cc.

7 { return m_shape->timeToRise(); }

References m_shape, and CaloVShape::timeToRise().

Member Data Documentation

◆ m_shape

const CaloVShape* CaloShapeIntegrator::m_shape
private

Definition at line 23 of file CaloShapeIntegrator.h.

Referenced by timeToRise().

CaloShapeIntegrator::BUNCHSPACE
Definition: CaloShapeIntegrator.h:13
CaloVShape::timeToRise
virtual double timeToRise() const =0
CaloShapeIntegrator::m_shape
const CaloVShape * m_shape
Definition: CaloShapeIntegrator.h:23
ntuplemaker.time
time
Definition: ntuplemaker.py:310