test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalHitResponse.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_EcalHitResponse_h
2 #define EcalSimAlgos_EcalHitResponse_h
3 
11 
12 #include <unordered_map>
13 #include <vector>
14 
15 typedef unsigned long long TimeValue_t;
16 
17 class CaloVShape ;
19 class CaloVHitCorrection ;
20 class CaloVHitFilter ;
21 class CaloSimParameters ;
23 class CaloVPECorrection ;
24 namespace CLHEP
25 {
26  class HepRandomEngine ;
27 }
28 
30 {
31  public:
32 
34 
35  typedef std::vector< unsigned int > VecInd ;
36 
37  typedef std::unordered_map<uint32_t,double> CalibCache;
38 
39  enum { BUNCHSPACE = 25 } ;
40 
41  EcalHitResponse( const CaloVSimParameterMap* parameterMap ,
42  const CaloVShape* shape ) ;
43 
44  virtual ~EcalHitResponse() ;
45 
46  void setBunchRange( int minBunch ,
47  int maxBunch ) ;
48 
50 
51  void setPhaseShift( double phaseShift ) ;
52 
53  void setHitFilter( const CaloVHitFilter* filter) ;
54 
55  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
56 
57  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
58 
59  void setEventTime(const edm::TimeValue_t& iTime);
60 
61  void setLaserConstants(const EcalLaserDbService* laser, bool& useLCcorrection);
62 
63  void add( const EcalSamples* pSam ) ;
64 
65  virtual void add( const PCaloHit& hit, CLHEP::HepRandomEngine* ) ;
66 
67  virtual void add( const CaloSamples& hit ) ;
68 
69  virtual void initializeHits() ;
70 
71  virtual void finalizeHits() ;
72 
73  virtual void run( MixCollection<PCaloHit>& hits, CLHEP::HepRandomEngine* ) ;
74 
75  virtual unsigned int samplesSize() const = 0 ;
76 
77  virtual EcalSamples* operator[]( unsigned int i ) = 0;
78 
79  virtual const EcalSamples* operator[]( unsigned int i ) const = 0;
80 
81  const EcalSamples* findDetId( const DetId& detId ) const ;
82 
83  bool withinBunchRange(int bunchCrossing) const ;
84 
85  protected:
86 
87  virtual unsigned int samplesSizeAll() const = 0 ;
88 
89  virtual EcalSamples* vSam( unsigned int i ) = 0 ;
90 
91  virtual EcalSamples* vSamAll( unsigned int i ) = 0 ;
92 
93  virtual const EcalSamples* vSamAll( unsigned int i ) const = 0 ;
94 
95  virtual void putAnalogSignal( const PCaloHit& inputHit, CLHEP::HepRandomEngine*) ;
96 
97  double findLaserConstant(const DetId& detId) const;
98 
99  EcalSamples* findSignal( const DetId& detId ) ;
100 
101  double analogSignalAmplitude( const DetId& id, double energy, CLHEP::HepRandomEngine* );
102 
103  double timeOfFlight( const DetId& detId ) const ;
104 
105  double phaseShift() const ;
106 
107  void blankOutUsedSamples() ;
108 
109  const CaloSimParameters* params( const DetId& detId ) const ;
110 
111  const CaloVShape* shape() const ;
112 
113  const CaloSubdetectorGeometry* geometry() const ;
114 
115  int minBunch() const ;
116 
117  int maxBunch() const ;
118 
119  VecInd& index() ;
120 
121  const VecInd& index() const ;
122 
123  const CaloVHitFilter* hitFilter() const ;
124 
125  private:
126 
134 
137  double m_phaseShift ;
138 
142 
144 };
145 
146 #endif
const CaloVShape * m_shape
int i
Definition: DBlmapReader.cc:9
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
double analogSignalAmplitude(const DetId &id, double energy, CLHEP::HepRandomEngine *)
const CaloVShape * shape() const
double findLaserConstant(const DetId &detId) const
std::vector< unsigned int > VecInd
void setEventTime(const edm::TimeValue_t &iTime)
virtual ~EcalHitResponse()
edm::TimeValue_t m_iTime
virtual void initializeHits()
virtual void putAnalogSignal(const PCaloHit &inputHit, CLHEP::HepRandomEngine *)
Electronic response of the preamp.
Definition: CaloVShape.h:11
virtual EcalSamples * operator[](unsigned int i)=0
double timeOfFlight(const DetId &detId) const
Main class for Parameters in different subdetectors.
virtual unsigned int samplesSize() const =0
void setHitFilter(const CaloVHitFilter *filter)
const CaloSimParameters * params(const DetId &detId) const
virtual EcalSamples * vSam(unsigned int i)=0
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
void setBunchRange(int minBunch, int maxBunch)
void setLaserConstants(const EcalLaserDbService *laser, bool &useLCcorrection)
const EcalSamples * findDetId(const DetId &detId) const
double phaseShift() const
const CaloVHitFilter * hitFilter() const
EcalHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
int maxBunch() const
void setPhaseShift(double phaseShift)
const CaloVHitCorrection * m_hitCorrection
int minBunch() const
const EcalLaserDbService * m_lasercals
unsigned long long TimeValue_t
Definition: Timestamp.h:28
CaloTSamplesBase< float > EcalSamples
void setGeometry(const CaloSubdetectorGeometry *geometry)
Definition: DetId.h:18
const CaloSubdetectorGeometry * m_geometry
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
virtual unsigned int samplesSizeAll() const =0
void setPECorrection(const CaloVPECorrection *peCorrection)
const CaloVPECorrection * m_PECorrection
CalibCache m_laserCalibCache
std::unordered_map< uint32_t, double > CalibCache
EcalSamples * findSignal(const DetId &detId)
virtual EcalSamples * vSamAll(unsigned int i)=0
void add(const EcalSamples *pSam)
const CaloVHitFilter * m_hitFilter
bool withinBunchRange(int bunchCrossing) const
virtual void finalizeHits()
unsigned long long TimeValue_t