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.push_back(
31  EESamples( CaloGenericDetId( detId.det(), detId.subdetId(), i ) ,
32  rSize, nPre ) ) ;
33  }
34 }
35 
37 {
38 }
39 
40 unsigned int
42 {
43  return m_vSam.size() ;
44 }
45 
46 unsigned int
48 {
49  return m_vSam.size() ;
50 }
51 
53 EEHitResponse::operator[]( unsigned int i ) const
54 {
55  return &m_vSam[ i ] ;
56 }
57 
60 {
61  return &m_vSam[ i ] ;
62 }
63 
65 EEHitResponse::vSam( unsigned int i )
66 {
67  return &m_vSam[ i ] ;
68 }
69 
71 EEHitResponse::vSamAll( unsigned int i )
72 {
73  return &m_vSam[ i ] ;
74 }
75 
77 EEHitResponse::vSamAll( unsigned int i ) const
78 {
79  return &m_vSam[ i ] ;
80 }
static EEDetId detIdFromDenseIndex(uint32_t din)
Definition: EEDetId.h:215
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
CaloTSamples< float, 10 > EESamples
Definition: EEHitResponse.h:11
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.