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 run( MixCollection<PCaloHit>& hits ) ;
64 
65  virtual unsigned int samplesSize() const = 0 ;
66 
67  virtual EcalSamples* operator[]( unsigned int i ) = 0;
68 
69  virtual const EcalSamples* operator[]( unsigned int i ) const = 0;
70 
71  const EcalSamples* findDetId( const DetId& detId ) const ;
72 
73  protected:
74 
75  virtual unsigned int samplesSizeAll() const = 0 ;
76 
77  virtual EcalSamples* vSam( unsigned int i ) = 0 ;
78 
79  virtual EcalSamples* vSamAll( unsigned int i ) = 0 ;
80 
81  virtual const EcalSamples* vSamAll( unsigned int i ) const = 0 ;
82 
83  virtual void putAnalogSignal( const PCaloHit& inputHit) ;
84 
85  double findLaserConstant(const DetId& detId) const;
86 
87  EcalSamples* findSignal( const DetId& detId ) ;
88 
89  double analogSignalAmplitude( const PCaloHit& hit ) const;
90 
91  double timeOfFlight( const DetId& detId ) const ;
92 
93  double phaseShift() const ;
94 
95  CLHEP::RandPoissonQ* ranPois() const ;
96 
97  CLHEP::RandGaussQ* ranGauss() const ;
98 
99  void blankOutUsedSamples() ;
100 
101  const CaloSimParameters* params( const DetId& detId ) const ;
102 
103  const CaloVShape* shape() const ;
104 
105  const CaloSubdetectorGeometry* geometry() const ;
106 
107  int minBunch() const ;
108 
109  int maxBunch() const ;
110 
111  VecInd& index() ;
112 
113  const VecInd& index() const ;
114 
115  const CaloVHitFilter* hitFilter() const ;
116 
117  private:
118 
126 
127  mutable CLHEP::RandPoissonQ* m_RandPoisson ;
128  mutable CLHEP::RandGaussQ* m_RandGauss ;
129 
132  double m_phaseShift ;
133 
136 
138 };
139 
140 #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
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
double analogSignalAmplitude(const PCaloHit &hit) 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:27
CaloTSamplesBase< float > EcalSamples
void setGeometry(const CaloSubdetectorGeometry *geometry)
Definition: DetId.h:20
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
unsigned long long TimeValue_t