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;
26 class CaloVHitCorrection;
27 class CaloVHitFilter;
28 class CaloSimParameters;
29 
31 {
32 public:
33  typedef std::map<DetId, CaloSamples> AnalogSignalMap;
34  // get this from somewhere external
35  enum {BUNCHSPACE=25};
36 
37  CaloHitResponse(const CaloVSimParameterMap * parameterMap, const CaloVShape * shape);
38 
40  virtual ~CaloHitResponse();
41 
43  void setBunchRange(int minBunch, int maxBunch);
44 
47 
48 
49  virtual bool keepBlank() const { return true ; }
50 
52  virtual void run(MixCollection<PCaloHit> & hits);
53 
55  virtual void add(const PCaloHit & hit);
56 
58  void add(const CaloSamples & signal);
59 
63  }
64 
66  void setHitCorrection(const CaloVHitCorrection * hitCorrection) {
67  theHitCorrection = hitCorrection;
68  }
69 
71  void setPECorrection(const CaloVPECorrection * peCorrection) {
72  thePECorrection = peCorrection;
73  }
74 
75  virtual void setRandomEngine(CLHEP::HepRandomEngine & engine);
76 
78  void clear() {theAnalogSignalMap.clear();}
79 
81  void addHit(const PCaloHit * hit, CaloSamples & frame) const;
82 
84  virtual CaloSamples makeAnalogSignal(const PCaloHit & inputHit) const;
85 
88  double analogSignalAmplitude(const PCaloHit & hit, const CaloSimParameters & parameters) const;
89 
91  CaloSamples * findSignal(const DetId & detId);
92 
94  int nSignals() const {return theAnalogSignalMap.size();}
95 
97  CaloSamples makeBlankSignal(const DetId & detId) const;
98 
99 
102  double timeOfFlight(const DetId & detId) const;
103 
105  void setPhaseShift(const double & thePhaseShift) { thePhaseShift_ = thePhaseShift; }
106 
107 protected:
108 
110 
116 
118 
119  mutable CLHEP::RandPoissonQ * theRandPoisson;
120 
123 
125 
126 };
127 
128 #endif
129 
130 
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
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
Definition: align_tpl.py:86
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