CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloShapeIntegrator Class Reference

#include <CaloShapeIntegrator.h>

Inheritance diagram for CaloShapeIntegrator:
CaloVShape

List of all members.

Public Types

enum  { BUNCHSPACE = 25 }

Public Member Functions

 CaloShapeIntegrator (const CaloVShape *aShape)
virtual double operator() (double startTime) const
virtual double timeToRise () const
virtual ~CaloShapeIntegrator ()

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.

{BUNCHSPACE = 25};

Constructor & Destructor Documentation

CaloShapeIntegrator::CaloShapeIntegrator ( const CaloVShape aShape)

Definition at line 3 of file CaloShapeIntegrator.cc.

                                                                   :
   m_shape ( aShape )
{
}
CaloShapeIntegrator::~CaloShapeIntegrator ( ) [virtual]

Definition at line 8 of file CaloShapeIntegrator.cc.

{
}

Member Function Documentation

double CaloShapeIntegrator::operator() ( double  startTime) const [virtual]

Implements CaloVShape.

Definition at line 19 of file CaloShapeIntegrator.cc.

References BUNCHSPACE, and cond::rpcobgas::time.

{
   double sum = 0.;

   double time = startTime + 0.5 ;

   for( unsigned istep = 0; istep < BUNCHSPACE ; ++istep )
   {
      sum += (*m_shape)( time ) ;
      time = time + 1.0 ;
   }
   return sum;
}
double CaloShapeIntegrator::timeToRise ( ) const [virtual]

Implements CaloVShape.

Definition at line 13 of file CaloShapeIntegrator.cc.

References m_shape, and CaloVShape::timeToRise().

{
   return m_shape->timeToRise() ;
}

Member Data Documentation

Definition at line 27 of file CaloShapeIntegrator.h.

Referenced by timeToRise().