CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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]; }
EcalSamples * vSam(unsigned int i) override
EcalSamples * operator[](unsigned int i) override
Electronic response of the preamp.
Definition: CaloVShape.h:11
assert(be >=bs)
Main class for Parameters in different subdetectors.
unsigned int samplesSize() const override
ESHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
Definition: ESHitResponse.cc:9
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition: DetId.h:48
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
tuple size
Write out results.
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46