CMS 3D CMS Logo

ESHitResponse.cc
Go to the documentation of this file.
8 
10  : EcalHitResponse(parameterMap, shape) {
11  assert(nullptr != parameterMap);
12  assert(nullptr != shape);
14  const CaloSimParameters& parameters(parameterMap->simParameters(detId));
15 
16  const unsigned int rSize(parameters.readoutFrameSize());
17  const unsigned int nPre(parameters.binOfMaximum() - 1);
18 
19  const unsigned int size(ESDetId::kSizeForDenseIndexing);
20 
21  m_vSam.reserve(size);
22 
23  for (unsigned int i(0); i != size; ++i) {
24  m_vSam.emplace_back(CaloGenericDetId(detId.det(), detId.subdetId(), i), rSize, nPre);
25  }
26 }
27 
29 
30 unsigned int ESHitResponse::samplesSize() const { return index().size(); }
31 
33 
34 const EcalHitResponse::EcalSamples* ESHitResponse::operator[](unsigned int i) const { return &m_vSam[index()[i]]; }
35 
37 
39 
41 
42 const EcalHitResponse::EcalSamples* ESHitResponse::vSamAll(unsigned int i) const { return &m_vSam[i]; }
size
Write out results.
EcalSamples * vSam(unsigned int i) override
EcalSamples * operator[](unsigned int i) override
Electronic response of the preamp.
Definition: CaloVShape.h:11
assert(be >=bs)
static constexpr int kSizeForDenseIndexing
Definition: ESDetId.h:102
Main class for Parameters in different subdetectors.
unsigned int samplesSize() const override
ESHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
Definition: ESHitResponse.cc:9
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:33
unsigned int samplesSizeAll() const override
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:55
EcalSamples * vSamAll(unsigned int i) override
~ESHitResponse() override
const CaloVShape * shape() const