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 
10 
11 #include<vector>
12 
13 typedef unsigned long long TimeValue_t;
14 
15 class CaloVShape ;
17 class CaloVHitCorrection ;
18 class CaloVHitFilter ;
19 class CaloSimParameters ;
21 class CaloVPECorrection ;
22 namespace CLHEP
23 {
24  class RandPoissonQ ;
25  class RandGaussQ ;
26  class HepRandomEngine ;
27 }
28 
30 {
31  public:
32 
34 
35  typedef std::vector< unsigned int > VecInd ;
36 
37  enum { BUNCHSPACE = 25 } ;
38 
39  EcalHitResponse( const CaloVSimParameterMap* parameterMap ,
40  const CaloVShape* shape ) ;
41 
42  virtual ~EcalHitResponse() ;
43 
44  void setBunchRange( int minBunch ,
45  int maxBunch ) ;
46 
48 
49  void setPhaseShift( double phaseShift ) ;
50 
51  void setHitFilter( const CaloVHitFilter* filter) ;
52 
53  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
54 
55  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
56 
57  void setEventTime(const edm::TimeValue_t& iTime);
58 
59  void setLaserConstants(const EcalLaserDbService* laser, bool& useLCcorrection);
60 
61  void add( const EcalSamples* pSam ) ;
62 
63  virtual void add( const PCaloHit& hit ) ;
64 
65  virtual void initializeHits() ;
66 
67  virtual void finalizeHits() ;
68 
69  virtual void run( MixCollection<PCaloHit>& hits ) ;
70 
71  virtual unsigned int samplesSize() const = 0 ;
72 
73  virtual EcalSamples* operator[]( unsigned int i ) = 0;
74 
75  virtual const EcalSamples* operator[]( unsigned int i ) const = 0;
76 
77  const EcalSamples* findDetId( const DetId& detId ) const ;
78 
79  bool withinBunchRange(int bunchCrossing) const ;
80 
81  protected:
82 
83  virtual unsigned int samplesSizeAll() const = 0 ;
84 
85  virtual EcalSamples* vSam( unsigned int i ) = 0 ;
86 
87  virtual EcalSamples* vSamAll( unsigned int i ) = 0 ;
88 
89  virtual const EcalSamples* vSamAll( unsigned int i ) const = 0 ;
90 
91  virtual void putAnalogSignal( const PCaloHit& inputHit) ;
92 
93  double findLaserConstant(const DetId& detId) const;
94 
95  EcalSamples* findSignal( const DetId& detId ) ;
96 
97  double analogSignalAmplitude( const DetId& id, float energy ) const;
98 
99  double timeOfFlight( const DetId& detId ) const ;
100 
101  double phaseShift() const ;
102 
103  CLHEP::RandPoissonQ* ranPois() const ;
104 
105  CLHEP::RandGaussQ* ranGauss() 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 
135  mutable CLHEP::RandPoissonQ* m_RandPoisson ;
136  mutable CLHEP::RandGaussQ* m_RandGauss ;
137 
140  double m_phaseShift ;
141 
144 
146 };
147 
148 #endif
const CaloVShape * m_shape
int i
Definition: DBlmapReader.cc:9
const CaloVShape * shape() const
double findLaserConstant(const DetId &detId) const
CLHEP::RandGaussQ * ranGauss() const
std::vector< unsigned int > VecInd
CLHEP::RandGaussQ * m_RandGauss
void setEventTime(const edm::TimeValue_t &iTime)
virtual ~EcalHitResponse()
edm::TimeValue_t m_iTime
virtual void initializeHits()
double analogSignalAmplitude(const DetId &id, float energy) const
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)
virtual void run(MixCollection< PCaloHit > &hits)
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
virtual void putAnalogSignal(const PCaloHit &inputHit)
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
CLHEP::RandPoissonQ * ranPois() const
CLHEP::RandPoissonQ * m_RandPoisson
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