|
|
Go to the documentation of this file.
13 #include "CLHEP/Random/RandPoissonQ.h"
16 #include "CLHEP/Units/GlobalPhysicalConstants.h"
17 #include "CLHEP/Units/GlobalSystemOfUnits.h"
21 : m_parameterMap(parameterMap),
23 m_hitCorrection(nullptr),
24 m_PECorrection(nullptr),
32 m_useLCcorrection(
false) {}
83 for (
unsigned int i(0);
i !=
size; ++
i) {
101 const int rsize(
result.size());
103 if (rsize !=
hit.size()) {
104 throw cms::Exception(
"EcalDigitization") <<
"CaloSamples and EcalSamples have different sizes. Type Mismatach";
113 return (m_minBunch <= bunchCrossing && m_maxBunch >= bunchCrossing);
125 const int bunch(hitItr.bunch());
149 double binTime(
tzero);
153 const unsigned int rsize(
result.size());
155 for (
unsigned int bin(0);
bin != rsize; ++
bin) {
180 double lasercalib = 1.;
184 lasercalib =
cache->second;
195 npe = CLHEP::RandPoissonQ::shoot(engine, npe);
204 auto cellGeometry(
geometry()->getGeometry(detId));
205 assert(
nullptr != cellGeometry);
206 return cellGeometry->getPosition().mag() * cm / c_light;
void setBunchRange(int minBunch, int maxBunch)
virtual ~EcalHitResponse()
bool withinBunchRange(int bunchCrossing) const
const EcalSamples * findDetId(const DetId &detId) const
std::unordered_map< uint32_t, double > CalibCache
void blankOutUsedSamples()
constexpr bool isNotFinite(T x)
const CaloVHitFilter * m_hitFilter
double timeOfFlight(const DetId &detId) const
virtual double correctPE(const DetId &detId, double npe, CLHEP::HepRandomEngine *) const =0
void setEventTime(const edm::TimeValue_t &iTime)
virtual void putAnalogSignal(const PCaloHit &inputHit, CLHEP::HepRandomEngine *)
double phaseShift() const
virtual double timeToRise() const =0
const CaloVShape * m_shape
void setPhaseShift(double phaseShift)
virtual double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const =0
void setLaserConstants(const EcalLaserDbService *laser, bool &useLCcorrection)
const EcalLaserDbService * m_lasercals
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
virtual bool accepts(const PCaloHit &hit) const =0
Main class for Parameters in different subdetectors.
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
static const double tzero[3]
double findLaserConstant(const DetId &detId) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
void setPECorrection(const CaloVPECorrection *peCorrection)
const CaloSimParameters * params(const DetId &detId) const
void setHitFilter(const CaloVHitFilter *filter)
virtual EcalSamples * vSamAll(unsigned int i)=0
void setGeometry(const CaloSubdetectorGeometry *geometry)
EcalHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
const CaloVSimParameterMap * m_parameterMap
const CaloVHitCorrection * m_hitCorrection
const CaloSubdetectorGeometry * geometry() const
Electronic response of the preamp.
EcalSamples * findSignal(const DetId &detId)
virtual void initializeHits()
void add(const EcalSamples *pSam)
float getLaserCorrection(DetId const &xid, edm::Timestamp const &iTime) const
const CaloVPECorrection * m_PECorrection
std::vector< unsigned int > VecInd
const CaloVShape * shape() const
const CaloVHitFilter * hitFilter() const
virtual void finalizeHits()
const CaloSubdetectorGeometry * m_geometry
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
const float kSamplePeriod
CalibCache m_laserCalibCache
double analogSignalAmplitude(const DetId &id, double energy, CLHEP::HepRandomEngine *)
unsigned long long TimeValue_t