Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:33

0001 #include "SimCalorimetry/EcalSimAlgos/interface/EEHitResponse.h"
0002 #include "SimCalorimetry/EcalSimAlgos/interface/APDSimParameters.h"
0003 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVSimParameterMap.h"
0004 #include "SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h"
0005 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVHitFilter.h"
0006 #include "SimCalorimetry/CaloSimAlgos/interface/CaloVShape.h"
0007 #include "Geometry/CaloGeometry/interface/CaloGenericDetId.h"
0008 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0009 
0010 EEHitResponse::EEHitResponse(const CaloVSimParameterMap* parameterMap, const CaloVShape* shape)
0011     :
0012 
0013       EcalHitResponse(parameterMap, shape) {
0014   const EEDetId detId(EEDetId::detIdFromDenseIndex(0));
0015   const CaloSimParameters& parameters(parameterMap->simParameters(detId));
0016 
0017   const unsigned int rSize(parameters.readoutFrameSize());
0018   const unsigned int nPre(parameters.binOfMaximum() - 1);
0019 
0020   const unsigned int size(EEDetId::kSizeForDenseIndexing);
0021 
0022   m_vSam.reserve(size);
0023 
0024   for (unsigned int i(0); i != size; ++i) {
0025     m_vSam.emplace_back(CaloGenericDetId(detId.det(), detId.subdetId(), i), rSize, nPre);
0026   }
0027 }
0028 
0029 EEHitResponse::~EEHitResponse() {}
0030 
0031 unsigned int EEHitResponse::samplesSize() const { return m_vSam.size(); }
0032 
0033 unsigned int EEHitResponse::samplesSizeAll() const { return m_vSam.size(); }
0034 
0035 const EcalHitResponse::EcalSamples* EEHitResponse::operator[](unsigned int i) const { return &m_vSam[i]; }
0036 
0037 EcalHitResponse::EcalSamples* EEHitResponse::operator[](unsigned int i) { return &m_vSam[i]; }
0038 
0039 EcalHitResponse::EcalSamples* EEHitResponse::vSam(unsigned int i) { return &m_vSam[i]; }
0040 
0041 EcalHitResponse::EcalSamples* EEHitResponse::vSamAll(unsigned int i) { return &m_vSam[i]; }
0042 
0043 const EcalHitResponse::EcalSamples* EEHitResponse::vSamAll(unsigned int i) const { return &m_vSam[i]; }