CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/SimCalorimetry/CaloSimAlgos/src/CaloShapeIntegrator.cc

Go to the documentation of this file.
00001 #include "SimCalorimetry/CaloSimAlgos/interface/CaloShapeIntegrator.h"
00002 
00003 CaloShapeIntegrator::CaloShapeIntegrator( const CaloVShape* aShape ) :
00004    m_shape ( aShape )
00005 {
00006 }
00007 
00008 CaloShapeIntegrator::~CaloShapeIntegrator() 
00009 {
00010 }
00011 
00012 double 
00013 CaloShapeIntegrator::timeToRise() const 
00014 {
00015    return m_shape->timeToRise() ;
00016 }
00017 
00018 double 
00019 CaloShapeIntegrator::operator() ( double startTime ) const 
00020 {
00021    double sum = 0.;
00022 
00023    double time = startTime + 0.5 ;
00024 
00025    for( unsigned istep = 0; istep < BUNCHSPACE ; ++istep )
00026    {
00027       sum += (*m_shape)( time ) ;
00028       time = time + 1.0 ;
00029    }
00030    return sum;
00031 }
00032 
00033