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);
13  const ESDetId detId(ESDetId::detIdFromDenseIndex(0));
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.
unsigned int samplesSize() const override
EcalSamples * vSam(unsigned int i) override
EcalSamples * operator[](unsigned int i) override
Electronic response of the preamp.
Definition: CaloVShape.h:11
Main class for Parameters in different subdetectors.
ESHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
Definition: ESHitResponse.cc:9
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition: DetId.h:41
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:33
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:55
EcalSamples * vSamAll(unsigned int i) override
unsigned int samplesSizeAll() const override
~ESHitResponse() override
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39