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]; }
CaloGenericDetId.h
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
mps_fire.i
i
Definition: mps_fire.py:428
ESHitResponse::ESHitResponse
ESHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
Definition: ESHitResponse.cc:9
CaloGenericDetId
Definition: CaloGenericDetId.h:12
CaloVSimParameterMap
Definition: CaloVSimParameterMap.h:7
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
CaloTSamplesBase
Definition: CaloTSamplesBase.h:9
cms::cuda::assert
assert(be >=bs)
CaloSimParameters.h
ESDetId
Definition: ESDetId.h:15
ESDetId.h
CaloVHitFilter.h
ESHitResponse::m_vSam
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:33
CaloSimParameters
Main class for Parameters in different subdetectors.
Definition: CaloSimParameters.h:14
CaloVSimParameterMap::simParameters
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
ESDetId::kSizeForDenseIndexing
Definition: ESDetId.h:102
EcalHitResponse::index
VecInd & index()
Definition: EcalHitResponse.cc:218
ESDetId::detIdFromDenseIndex
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:55
ESHitResponse::samplesSizeAll
unsigned int samplesSizeAll() const override
Definition: ESHitResponse.cc:32
ESHitResponse.h
ESHitResponse::~ESHitResponse
~ESHitResponse() override
Definition: ESHitResponse.cc:28
ESHitResponse::vSam
EcalSamples * vSam(unsigned int i) override
Definition: ESHitResponse.cc:38
ESHitResponse::vSamAll
EcalSamples * vSamAll(unsigned int i) override
Definition: ESHitResponse.cc:40
CaloVSimParameterMap.h
EcalHitResponse
Definition: EcalHitResponse.h:29
CaloVShape
Electronic response of the preamp.
Definition: CaloVShape.h:11
ESHitResponse::operator[]
EcalSamples * operator[](unsigned int i) override
Definition: ESHitResponse.cc:36
CaloVShape.h
EcalHitResponse::shape
const CaloVShape * shape() const
Definition: EcalHitResponse.cc:41
ESHitResponse::samplesSize
unsigned int samplesSize() const override
Definition: ESHitResponse.cc:30
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443