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<vector>
13 
14 typedef unsigned long long TimeValue_t;
15 
16 class CaloVShape ;
18 class CaloVHitCorrection ;
19 class CaloVHitFilter ;
20 class CaloSimParameters ;
22 class CaloVPECorrection ;
23 namespace CLHEP
24 {
25  class RandPoissonQ ;
26  class RandGaussQ ;
27  class HepRandomEngine ;
28 }
29 
31 {
32  public:
33 
35 
36  typedef std::vector< unsigned int > VecInd ;
37 
38  enum { BUNCHSPACE = 25 } ;
39 
40  EcalHitResponse( const CaloVSimParameterMap* parameterMap ,
41  const CaloVShape* shape ) ;
42 
43  virtual ~EcalHitResponse() ;
44 
45  void setBunchRange( int minBunch ,
46  int maxBunch ) ;
47 
49 
50  void setPhaseShift( double phaseShift ) ;
51 
52  void setHitFilter( const CaloVHitFilter* filter) ;
53 
54  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
55 
56  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
57 
58  void setEventTime(const edm::TimeValue_t& iTime);
59 
60  void setLaserConstants(const EcalLaserDbService* laser, bool& useLCcorrection);
61 
62  void add( const EcalSamples* pSam ) ;
63 
64  virtual void add( const PCaloHit& hit ) ;
65 
66  virtual void add( const CaloSamples& hit ) ;
67 
68  virtual void initializeHits() ;
69 
70  virtual void finalizeHits() ;
71 
72  virtual void run( MixCollection<PCaloHit>& hits ) ;
73 
74  virtual unsigned int samplesSize() const = 0 ;
75 
76  virtual EcalSamples* operator[]( unsigned int i ) = 0;
77 
78  virtual const EcalSamples* operator[]( unsigned int i ) const = 0;
79 
80  const EcalSamples* findDetId( const DetId& detId ) const ;
81 
82  bool withinBunchRange(int bunchCrossing) const ;
83 
84  protected:
85 
86  virtual unsigned int samplesSizeAll() const = 0 ;
87 
88  virtual EcalSamples* vSam( unsigned int i ) = 0 ;
89 
90  virtual EcalSamples* vSamAll( unsigned int i ) = 0 ;
91 
92  virtual const EcalSamples* vSamAll( unsigned int i ) const = 0 ;
93 
94  virtual void putAnalogSignal( const PCaloHit& inputHit) ;
95 
96  double findLaserConstant(const DetId& detId) const;
97 
98  EcalSamples* findSignal( const DetId& detId ) ;
99 
100  double analogSignalAmplitude( const DetId& id, float energy ) const;
101 
102  double timeOfFlight( const DetId& detId ) const ;
103 
104  double phaseShift() const ;
105 
106  CLHEP::RandPoissonQ* ranPois() const ;
107 
108  CLHEP::RandGaussQ* ranGauss() const ;
109 
110  void blankOutUsedSamples() ;
111 
112  const CaloSimParameters* params( const DetId& detId ) const ;
113 
114  const CaloVShape* shape() const ;
115 
116  const CaloSubdetectorGeometry* geometry() const ;
117 
118  int minBunch() const ;
119 
120  int maxBunch() const ;
121 
122  VecInd& index() ;
123 
124  const VecInd& index() const ;
125 
126  const CaloVHitFilter* hitFilter() const ;
127 
128  private:
129 
137 
138  mutable CLHEP::RandPoissonQ* m_RandPoisson ;
139  mutable CLHEP::RandGaussQ* m_RandGauss ;
140 
143  double m_phaseShift ;
144 
147 
149 };
150 
151 #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