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 RandPoissonQ ;
30  class RandGaussQ ;
31  class HepRandomEngine ;
32 }
33 
35 {
36  public:
37 
38  typedef std::vector< CaloSamples > VecSam ;
39  typedef std::vector< unsigned int > VecInd ;
40 
41  enum {BUNCHSPACE=25};
42 
43  CaloHitRespoNew( const CaloVSimParameterMap* parameterMap ,
44  const CaloVShape* shape ,
45  const DetId detId ) ;
46 
47  virtual ~CaloHitRespoNew() ;
48 
49  void setBunchRange( int minBunch ,
50  int maxBunch ) ;
51 
53 
54  void setPhaseShift( double phaseShift ) ;
55 
56  void setHitFilter( const CaloVHitFilter* filter) ;
57 
58  void setHitCorrection( const CaloVHitCorrection* hitCorrection) ;
59 
60  void setPECorrection( const CaloVPECorrection* peCorrection ) ;
61 
62  virtual void setRandomEngine( CLHEP::HepRandomEngine& engine ) const ;
63 
64  virtual void run( MixCollection<PCaloHit>& hits ) ;
65 
66  virtual void add(const PCaloHit & hit);
67 
68  unsigned int samplesSize() const ;
69 
70  const CaloSamples& operator[]( unsigned int i ) const ;
71 
72  virtual void initializeHits() {}
73 
74  virtual void finalizeHits() {}
75 
76  bool withinBunchRange(int bunchCrossing) const {
77  return(bunchCrossing >= m_minBunch && bunchCrossing <= m_maxBunch);
78  }
79 
80 
81  protected:
82 
83  CaloSamples* findSignal( const DetId& detId ) ;
84 
85  virtual void putAnalogSignal( const PCaloHit& inputHit) ;
86 
87  double analogSignalAmplitude( const DetId& id, float energy ) const;
88 
89  double timeOfFlight( const DetId& detId ) const ;
90 
91  double phaseShift() const ;
92 
93  CLHEP::RandPoissonQ* ranPois() const ;
94 
95  CLHEP::RandGaussQ* ranGauss() const ;
96 
97  void setupSamples( const DetId& detId ) ;
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 { return m_minBunch ; }
108 
109  int maxBunch() const { return m_maxBunch ; }
110 
111  VecInd& index() { return m_index ; }
112 
113  const CaloVHitFilter* hitFilter() const { return m_hitFilter ; }
114 
115  private:
116 
123 
124  mutable CLHEP::RandPoissonQ* m_RandPoisson ;
125 
126  mutable CLHEP::RandGaussQ* m_RandGauss ;
127 
130  double m_phaseShift ;
131 
134 };
135 
136 #endif
void setupSamples(const DetId &detId)
CLHEP::RandPoissonQ * m_RandPoisson
void setHitFilter(const CaloVHitFilter *filter)
int i
Definition: DBlmapReader.cc:9
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
const CaloVPECorrection * m_PECorrection
CLHEP::RandGaussQ * m_RandGauss
double timeOfFlight(const DetId &detId) const
Creates electronics signals from hits.
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 run(MixCollection< PCaloHit > &hits)
virtual void finalizeHits()
Main class for Parameters in different subdetectors.
virtual void add(const PCaloHit &hit)
CaloSamples * findSignal(const DetId &detId)
double phaseShift() const
CLHEP::RandGaussQ * ranGauss() const
void setGeometry(const CaloSubdetectorGeometry *geometry)
double analogSignalAmplitude(const DetId &id, float energy) const
virtual void putAnalogSignal(const PCaloHit &inputHit)
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
std::vector< CaloSamples > VecSam
virtual void setRandomEngine(CLHEP::HepRandomEngine &engine) const
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:20
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()
CLHEP::RandPoissonQ * ranPois() const
int minBunch() const
const CaloVHitCorrection * m_hitCorrection
const CaloVHitFilter * m_hitFilter