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<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 HepRandomEngine ;
26 }
27 
29 {
30  public:
31 
33 
34  typedef std::vector< unsigned int > VecInd ;
35 
36  enum { BUNCHSPACE = 25 } ;
37 
38  EcalHitResponse( const CaloVSimParameterMap* parameterMap ,
39  const CaloVShape* shape ) ;
40 
41  virtual ~EcalHitResponse() ;
42 
43  void setBunchRange( int minBunch ,
44  int maxBunch ) ;
45 
47 
48  void setPhaseShift( double phaseShift ) ;
49 
50  void setHitFilter( const CaloVHitFilter* filter) ;
51 
52  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
53 
54  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
55 
56  void setEventTime(const edm::TimeValue_t& iTime);
57 
58  void setLaserConstants(const EcalLaserDbService* laser, bool& useLCcorrection);
59 
60  void add( const EcalSamples* pSam ) ;
61 
62  virtual void add( const PCaloHit& hit, CLHEP::HepRandomEngine* ) ;
63 
64  virtual void add( const CaloSamples& hit ) ;
65 
66  virtual void initializeHits() ;
67 
68  virtual void finalizeHits() ;
69 
70  virtual void run( MixCollection<PCaloHit>& hits, CLHEP::HepRandomEngine* ) ;
71 
72  virtual unsigned int samplesSize() const = 0 ;
73 
74  virtual EcalSamples* operator[]( unsigned int i ) = 0;
75 
76  virtual const EcalSamples* operator[]( unsigned int i ) const = 0;
77 
78  const EcalSamples* findDetId( const DetId& detId ) const ;
79 
80  bool withinBunchRange(int bunchCrossing) const ;
81 
82  protected:
83 
84  virtual unsigned int samplesSizeAll() const = 0 ;
85 
86  virtual EcalSamples* vSam( unsigned int i ) = 0 ;
87 
88  virtual EcalSamples* vSamAll( unsigned int i ) = 0 ;
89 
90  virtual const EcalSamples* vSamAll( unsigned int i ) const = 0 ;
91 
92  virtual void putAnalogSignal( const PCaloHit& inputHit, CLHEP::HepRandomEngine*) ;
93 
94  double findLaserConstant(const DetId& detId) const;
95 
96  EcalSamples* findSignal( const DetId& detId ) ;
97 
98  double analogSignalAmplitude( const DetId& id, float energy, CLHEP::HepRandomEngine* ) const;
99 
100  double timeOfFlight( const DetId& detId ) const ;
101 
102  double phaseShift() const ;
103 
104  void blankOutUsedSamples() ;
105 
106  const CaloSimParameters* params( const DetId& detId ) const ;
107 
108  const CaloVShape* shape() const ;
109 
110  const CaloSubdetectorGeometry* geometry() const ;
111 
112  int minBunch() const ;
113 
114  int maxBunch() const ;
115 
116  VecInd& index() ;
117 
118  const VecInd& index() const ;
119 
120  const CaloVHitFilter* hitFilter() const ;
121 
122  private:
123 
131 
134  double m_phaseShift ;
135 
138 
140 };
141 
142 #endif
const CaloVShape * m_shape
int i
Definition: DBlmapReader.cc:9
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
const CaloVShape * shape() const
double findLaserConstant(const DetId &detId) const
std::vector< unsigned int > VecInd
double analogSignalAmplitude(const DetId &id, float energy, CLHEP::HepRandomEngine *) const
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
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