CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimCalorimetry/EcalSimAlgos/src/EEHitResponse.cc

Go to the documentation of this file.
00001 #include "SimCalorimetry/EcalSimAlgos/interface/EEHitResponse.h" 
00002 #include "SimCalorimetry/EcalSimAlgos/interface/APDSimParameters.h" 
00003 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVSimParameterMap.h"
00004 #include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h"
00005 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVHitFilter.h"
00006 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVShape.h"
00007 #include "Geometry/CaloGeometry/interface/CaloGenericDetId.h"
00008 #include "CLHEP/Random/RandPoissonQ.h"
00009 #include "CLHEP/Random/RandGaussQ.h"
00010 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00011 
00012 
00013 EEHitResponse::EEHitResponse( const CaloVSimParameterMap* parameterMap , 
00014                               const CaloVShape*           shape         ) :
00015 
00016    EcalHitResponse( parameterMap, shape )
00017 {
00018    const EEDetId detId ( EEDetId::detIdFromDenseIndex( 0 ) ) ;
00019    const CaloSimParameters& parameters ( parameterMap->simParameters( detId ) ) ;
00020 
00021    const unsigned int rSize ( parameters.readoutFrameSize() ) ;
00022    const unsigned int nPre  ( parameters.binOfMaximum() - 1 ) ;
00023 
00024    const unsigned int size ( EEDetId::kSizeForDenseIndexing ) ;
00025 
00026    m_vSam.reserve( size ) ;
00027 
00028    for( unsigned int i ( 0 ) ; i != size ; ++i )
00029    {
00030       m_vSam.push_back(
00031          EESamples( CaloGenericDetId( detId.det(), detId.subdetId(), i ) ,
00032                     rSize, nPre ) ) ;
00033    }
00034 }
00035 
00036 EEHitResponse::~EEHitResponse()
00037 {
00038 }
00039 
00040 unsigned int
00041 EEHitResponse::samplesSize() const
00042 {
00043    return m_vSam.size() ;
00044 }
00045 
00046 unsigned int
00047 EEHitResponse::samplesSizeAll() const
00048 {
00049    return m_vSam.size() ;
00050 }
00051 
00052 const EcalHitResponse::EcalSamples* 
00053 EEHitResponse::operator[]( unsigned int i ) const
00054 {
00055    return &m_vSam[ i ] ;
00056 }
00057 
00058 EcalHitResponse::EcalSamples* 
00059 EEHitResponse::operator[]( unsigned int i )
00060 {
00061    return &m_vSam[ i ] ;
00062 }
00063 
00064 EcalHitResponse::EcalSamples* 
00065 EEHitResponse::vSam( unsigned int i )
00066 {
00067    return &m_vSam[ i ] ;
00068 }
00069 
00070 EcalHitResponse::EcalSamples* 
00071 EEHitResponse::vSamAll( unsigned int i )
00072 {
00073    return &m_vSam[ i ] ;
00074 }
00075 
00076 const EcalHitResponse::EcalSamples* 
00077 EEHitResponse::vSamAll( unsigned int i ) const
00078 {
00079    return &m_vSam[ i ] ;
00080 }