CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloHitRespoNew.h
Go to the documentation of this file.
1 #ifndef CaloSimAlgos_CaloHitRespoNew_h
2 #define CaloSimAlgos_CaloHitRespoNew_h
3 
8 
9 #include<vector>
10 
20 class CaloVShape ;
22 class CaloVHitCorrection ;
23 class CaloVHitFilter ;
24 class CaloSimParameters ;
26 class CaloVPECorrection ;
27 namespace CLHEP
28 {
29  class HepRandomEngine ;
30 }
31 
33 {
34  public:
35 
36  typedef std::vector< CaloSamples > VecSam ;
37  typedef std::vector< unsigned int > VecInd ;
38 
39  enum {BUNCHSPACE=25};
40 
41  CaloHitRespoNew( const CaloVSimParameterMap* parameterMap ,
42  const CaloVShape* shape ,
43  const DetId detId ) ;
44 
45  virtual ~CaloHitRespoNew() ;
46 
47  void setBunchRange( int minBunch ,
48  int maxBunch ) ;
49 
51 
52  void setPhaseShift( double phaseShift ) ;
53 
54  void setHitFilter( const CaloVHitFilter* filter) ;
55 
56  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
57 
58  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
59 
60  virtual void run( MixCollection<PCaloHit>& hits, CLHEP::HepRandomEngine* ) ;
61 
62  virtual void add(const PCaloHit & hit, CLHEP::HepRandomEngine*);
63 
64  unsigned int samplesSize() const ;
65 
66  const CaloSamples& operator[]( unsigned int i ) const ;
67 
68  virtual void initializeHits() {}
69 
70  virtual void finalizeHits() {}
71 
72  bool withinBunchRange(int bunchCrossing) const {
73  return(bunchCrossing >= m_minBunch && bunchCrossing <= m_maxBunch);
74  }
75 
76 
77  protected:
78 
79  CaloSamples* findSignal( const DetId& detId ) ;
80 
81  virtual void putAnalogSignal( const PCaloHit& inputHit, CLHEP::HepRandomEngine*) ;
82 
83  double analogSignalAmplitude( const DetId& id, float energy, CLHEP::HepRandomEngine* ) const;
84 
85  double timeOfFlight( const DetId& detId ) const ;
86 
87  double phaseShift() const ;
88 
89  void setupSamples( const DetId& detId ) ;
90 
91  void blankOutUsedSamples() ;
92 
93  const CaloSimParameters* params( const DetId& detId ) const ;
94 
95  const CaloVShape* shape() const ;
96 
97  const CaloSubdetectorGeometry* geometry() const ;
98 
99  int minBunch() const { return m_minBunch ; }
100 
101  int maxBunch() const { return m_maxBunch ; }
102 
103  VecInd& index() { return m_index ; }
104 
105  const CaloVHitFilter* hitFilter() const { return m_hitFilter ; }
106 
107  private:
108 
115 
118  double m_phaseShift ;
119 
122 };
123 
124 #endif
void setupSamples(const DetId &detId)
void setHitFilter(const CaloVHitFilter *filter)
int i
Definition: DBlmapReader.cc:9
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
double analogSignalAmplitude(const DetId &id, float energy, CLHEP::HepRandomEngine *) const
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
const CaloVPECorrection * m_PECorrection
double timeOfFlight(const DetId &detId) const
Creates electronics signals from hits.
virtual void add(const PCaloHit &hit, CLHEP::HepRandomEngine *)
int maxBunch() const
const CaloVShape * shape() const
void setBunchRange(int minBunch, int maxBunch)
Electronic response of the preamp.
Definition: CaloVShape.h:11
const CaloVHitFilter * hitFilter() const
bool withinBunchRange(int bunchCrossing) const
virtual void finalizeHits()
Main class for Parameters in different subdetectors.
CaloSamples * findSignal(const DetId &detId)
double phaseShift() const
void setGeometry(const CaloSubdetectorGeometry *geometry)
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
std::vector< CaloSamples > VecSam
void setPECorrection(const CaloVPECorrection *peCorrection)
void setPhaseShift(double phaseShift)
const CaloSamples & operator[](unsigned int i) const
CaloHitRespoNew(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape, const DetId detId)
Definition: DetId.h:18
virtual ~CaloHitRespoNew()
const CaloSubdetectorGeometry * m_geometry
std::vector< unsigned int > VecInd
unsigned int samplesSize() const
const CaloSimParameters * params(const DetId &detId) const
const CaloVShape * m_shape
virtual void initializeHits()
virtual void putAnalogSignal(const PCaloHit &inputHit, CLHEP::HepRandomEngine *)
int minBunch() const
const CaloVHitCorrection * m_hitCorrection
const CaloVHitFilter * m_hitFilter