CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloHitResponse.h
Go to the documentation of this file.
1 #ifndef CaloSimAlgos_CaloHitResponse_h
2 #define CaloSimAlgos_CaloHitResponse_h
3 
9 #include "CLHEP/Random/RandPoissonQ.h"
11 
12 #include<map>
13 #include<vector>
14 
24 class CaloVShape;
25 class CaloShapes;
27 class CaloVHitCorrection;
28 class CaloVHitFilter;
29 class CaloSimParameters;
30 
32 {
33 public:
34  typedef std::map<DetId, CaloSamples> AnalogSignalMap;
35  // get this from somewhere external
36  enum {BUNCHSPACE=25};
37 
38  CaloHitResponse(const CaloVSimParameterMap * parameterMap, const CaloVShape * shape);
39  CaloHitResponse(const CaloVSimParameterMap * parameterMap, const CaloShapes * shapes);
40 
42  virtual ~CaloHitResponse();
43 
44 
46  void setBunchRange(int minBunch, int maxBunch);
47 
50 
51 
52  virtual bool keepBlank() const { return true ; }
53 
55  virtual void run(MixCollection<PCaloHit> & hits);
56 
58  virtual void add(const PCaloHit & hit);
59 
61  void add(const CaloSamples & signal);
62 
66  }
67 
69  void setHitCorrection(const CaloVHitCorrection * hitCorrection) {
70  theHitCorrection = hitCorrection;
71  }
72 
74  void setPECorrection(const CaloVPECorrection * peCorrection) {
75  thePECorrection = peCorrection;
76  }
77 
78  virtual void setRandomEngine(CLHEP::HepRandomEngine & engine);
79 
81  void clear() {theAnalogSignalMap.clear();}
82 
84  void addHit(const PCaloHit * hit, CaloSamples & frame) const;
85 
87  virtual CaloSamples makeAnalogSignal(const PCaloHit & inputHit) const;
88 
91  double analogSignalAmplitude(const PCaloHit & hit, const CaloSimParameters & parameters) const;
92 
94  CaloSamples * findSignal(const DetId & detId);
95 
97  int nSignals() const {return theAnalogSignalMap.size();}
98 
100  CaloSamples makeBlankSignal(const DetId & detId) const;
101 
102 
105  double timeOfFlight(const DetId & detId) const;
106 
108  void setPhaseShift(const double & thePhaseShift) { thePhaseShift_ = thePhaseShift; }
109 
110 protected:
111 
113 
120 
122 
123  mutable CLHEP::RandPoissonQ * theRandPoisson;
124 
127 
129 
130 };
131 
132 #endif
133 
134 
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
dictionary parameters
Definition: Parameters.py:2
CaloSamples makeBlankSignal(const DetId &detId) const
creates an empty signal for this DetId
virtual ~CaloHitResponse()
doesn&#39;t delete the pointers passed in
CLHEP::RandPoissonQ * theRandPoisson
virtual CaloSamples makeAnalogSignal(const PCaloHit &inputHit) const
creates the signal corresponding to this hit
virtual bool keepBlank() const
Electronic response of the preamp.
Definition: CaloVShape.h:11
CaloHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
Main class for Parameters in different subdetectors.
const CaloGeometry * theGeometry
void setPhaseShift(const double &thePhaseShift)
setting the phase shift for asynchronous trigger (e.g. test beams)
const CaloVPECorrection * thePECorrection
std::map< DetId, CaloSamples > AnalogSignalMap
void setHitFilter(const CaloVHitFilter *filter)
if you want to reject hits, for example, from a certain subdetector, set this
Creates electronics signals from hits.
virtual void add(const PCaloHit &hit)
process a single SimHit
double timeOfFlight(const DetId &detId) const
const CaloVHitCorrection * theHitCorrection
AnalogSignalMap theAnalogSignalMap
virtual void run(MixCollection< PCaloHit > &hits)
Complete cell digitization.
Definition: DetId.h:20
double analogSignalAmplitude(const PCaloHit &hit, const CaloSimParameters &parameters) const
const CaloShapes * theShapes
const CaloVSimParameterMap * theParameterMap
void setBunchRange(int minBunch, int maxBunch)
tells it which pileup bunches to do
CaloSamples * findSignal(const DetId &detId)
users can look for the signal for a given cell
ESHandle< TrackerGeometry > geometry
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
If you want to correct hits, for attenuation or delay, set this.
void clear()
frees up memory
void addHit(const PCaloHit *hit, CaloSamples &frame) const
adds the amplitude for a single hit to the frame
const CaloVHitFilter * theHitFilter
virtual void setRandomEngine(CLHEP::HepRandomEngine &engine)
const CaloVShape * theShape
int nSignals() const
number of signals in the current cache