CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EEHitResponse.cc
Go to the documentation of this file.
8 #include "CLHEP/Random/RandPoissonQ.h"
9 #include "CLHEP/Random/RandGaussQ.h"
11 
12 
14  const CaloVShape* shape ) :
15 
16  EcalHitResponse( parameterMap, shape )
17 {
18  const EEDetId detId ( EEDetId::detIdFromDenseIndex( 0 ) ) ;
19  const CaloSimParameters& parameters ( parameterMap->simParameters( detId ) ) ;
20 
21  const unsigned int rSize ( parameters.readoutFrameSize() ) ;
22  const unsigned int nPre ( parameters.binOfMaximum() - 1 ) ;
23 
24  const unsigned int size ( EEDetId::kSizeForDenseIndexing ) ;
25 
26  m_vSam.reserve( size ) ;
27 
28  for( unsigned int i ( 0 ) ; i != size ; ++i )
29  {
30  m_vSam.emplace_back(CaloGenericDetId( detId.det(), detId.subdetId(), i ) ,
31  rSize, nPre ) ;
32  }
33 }
34 
36 {
37 }
38 
39 unsigned int
41 {
42  return m_vSam.size() ;
43 }
44 
45 unsigned int
47 {
48  return m_vSam.size() ;
49 }
50 
52 EEHitResponse::operator[]( unsigned int i ) const
53 {
54  return &m_vSam[ i ] ;
55 }
56 
59 {
60  return &m_vSam[ i ] ;
61 }
62 
64 EEHitResponse::vSam( unsigned int i )
65 {
66  return &m_vSam[ i ] ;
67 }
68 
70 EEHitResponse::vSamAll( unsigned int i )
71 {
72  return &m_vSam[ i ] ;
73 }
74 
76 EEHitResponse::vSamAll( unsigned int i ) const
77 {
78  return &m_vSam[ i ] ;
79 }
static EEDetId detIdFromDenseIndex(uint32_t din)
Definition: EEDetId.h:221
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
virtual ~EEHitResponse()
virtual unsigned int samplesSize() const
Electronic response of the preamp.
Definition: CaloVShape.h:11
virtual unsigned int samplesSizeAll() const
Main class for Parameters in different subdetectors.
virtual EcalSamples * operator[](unsigned int i)
std::vector< EESamples > m_vSam
Definition: EEHitResponse.h:38
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
EEHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
virtual EcalSamples * vSamAll(unsigned int i)
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
virtual EcalSamples * vSam(unsigned int i)
tuple size
Write out results.