CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ESHitResponse.cc
Go to the documentation of this file.
8 
9 
11  const CaloVShape* shape ) :
12  EcalHitResponse( parameterMap , shape )
13 {
14  assert( 0 != parameterMap ) ;
15  assert( 0 != 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 }
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
virtual unsigned int samplesSize() const
assert(m_qm.get())
virtual EcalSamples * vSam(unsigned int i)
Electronic response of the preamp.
Definition: CaloVShape.h:11
Main class for Parameters in different subdetectors.
virtual ~ESHitResponse()
virtual unsigned int samplesSizeAll() const
ESHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
virtual EcalSamples * vSamAll(unsigned int i)
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:37
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:38
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:60
virtual EcalSamples * operator[](unsigned int i)
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
tuple size
Write out results.