|
|
Go to the documentation of this file.
15 #include "CLHEP/Random/RandPoissonQ.h"
16 #include "CLHEP/Units/GlobalPhysicalConstants.h"
17 #include "CLHEP/Units/GlobalSystemOfUnits.h"
22 : theAnalogSignalMap(),
23 theParameterMap(parametersMap),
26 theHitCorrection(nullptr),
27 thePECorrection(nullptr),
28 theHitFilter(nullptr),
37 : theAnalogSignalMap(),
38 theParameterMap(parametersMap),
41 theHitCorrection(nullptr),
42 thePECorrection(nullptr),
43 theHitFilter(nullptr),
78 const unsigned int size(signal.
size());
80 for (
unsigned int i(0);
i !=
size; ++
i) {
94 if (oldSignal ==
nullptr) {
98 (*oldSignal) += signal;
114 double jitter =
time - tof;
123 double binTime =
tzero;
133 double pulseBit = (*shape)(binTime)*signal;
134 result[sampleBin] += pulseBit;
150 CLHEP::HepRandomEngine *engine)
const {
157 npe = CLHEP::RandPoissonQ::shoot(engine, npe);
170 result = &(signalItr->second);
190 edm::LogWarning(
"CaloHitResponse") <<
"No Calo Geometry set, so no time of flight correction";
193 if (cellGeometry ==
nullptr) {
195 <<
" so no time-of-flight subtraction will be done";
197 double distance = cellGeometry->getPosition().mag();
CaloHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
double analogSignalAmplitude(const DetId &id, float energy, const CaloSimParameters ¶meters, CLHEP::HepRandomEngine *) const
constexpr bool isNotFinite(T x)
int size() const
get the size
virtual double correctPE(const DetId &detId, double npe, CLHEP::HepRandomEngine *) const =0
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
virtual bool keepBlank() const
bool withinBunchRange(int bunchCrossing) const
check if crossing is within bunch range:
virtual double timeToRise() const =0
Log< level::Warning, false > LogWarning
virtual double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const =0
virtual ~CaloHitResponse()
doesn't delete the pointers passed in
virtual bool accepts(const PCaloHit &hit) const =0
Main class for Parameters in different subdetectors.
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
const CaloVHitCorrection * theHitCorrection
double timeOfFlight(const DetId &detId) const
static const double tzero[3]
virtual void add(const PCaloHit &hit, CLHEP::HepRandomEngine *)
process a single SimHit
virtual CaloSamples makeAnalogSignal(const PCaloHit &inputHit, CLHEP::HepRandomEngine *) const
creates the signal corresponding to this hit
const CaloShapes * theShapes
void setBunchRange(int minBunch, int maxBunch)
tells it which pileup bunches to do
const CaloVHitFilter * theHitFilter
DetId id() const
get the (generic) id
const CaloVSimParameterMap * theParameterMap
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
CaloSamples makeBlankSignal(const DetId &detId) const
creates an empty signal for this DetId
Electronic response of the preamp.
const CaloVPECorrection * thePECorrection
AnalogSignalMap theAnalogSignalMap
constexpr uint32_t rawId() const
get the raw id
const CaloGeometry * theGeometry
virtual const CaloVShape * shape(const DetId &detId, bool precise=false) const
const CaloVShape * theShape
CaloSamples * findSignal(const DetId &detId)
users can look for the signal for a given cell
virtual void run(const MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
Complete cell digitization.