CMS 3D CMS Logo

ESHitResponse.cc
Go to the documentation of this file.
8 
9 
11  const CaloVShape* shape ) :
12  EcalHitResponse( parameterMap , shape )
13 {
14  assert( nullptr != parameterMap ) ;
15  assert( nullptr != shape ) ;
16  const ESDetId detId ( ESDetId::detIdFromDenseIndex( 0 ) ) ;
17  const CaloSimParameters& parameters ( parameterMap->simParameters( detId ) ) ;
18 
19  const unsigned int rSize ( parameters.readoutFrameSize() ) ;
20  const unsigned int nPre ( parameters.binOfMaximum() - 1 ) ;
21 
22  const unsigned int size ( ESDetId::kSizeForDenseIndexing ) ;
23 
24  m_vSam.reserve( size ) ;
25 
26  for( unsigned int i ( 0 ) ; i != size ; ++i )
27  {
28  m_vSam.emplace_back(
29  CaloGenericDetId( detId.det(), detId.subdetId(), i ) ,
30  rSize, nPre ) ;
31  }
32 }
33 
35 {
36 }
37 
38 unsigned int
40 {
41  return index().size() ;
42 }
43 
44 unsigned int
46 {
48 }
49 
51 ESHitResponse::operator[]( unsigned int i ) const
52 {
53  return &m_vSam[ index()[ i ] ] ;
54 }
55 
58 {
59  return &m_vSam[ index()[ i ] ] ;
60 }
61 
63 ESHitResponse::vSam( unsigned int i )
64 {
65  return &m_vSam[ index()[ i ] ] ;
66 }
67 
69 ESHitResponse::vSamAll( unsigned int i )
70 {
71  return &m_vSam[ i ] ;
72 }
73 
75 ESHitResponse::vSamAll( unsigned int i ) const
76 {
77  return &m_vSam[ i ] ;
78 }
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)
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition: DetId.h:38
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:38
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:61
EcalSamples * vSamAll(unsigned int i) override
unsigned int samplesSizeAll() const override
Detector det() const
get the detector field from this detid
Definition: DetId.h:36
~ESHitResponse() override