15 #include "CLHEP/Random/RandPoissonQ.h"
16 #include "CLHEP/Random/RandGaussQ.h"
20 #include "CLHEP/Units/GlobalPhysicalConstants.h"
21 #include "CLHEP/Units/GlobalSystemOfUnits.h"
28 m_parameterMap ( parameterMap ) ,
30 m_hitCorrection ( 0 ) ,
31 m_PECorrection ( 0 ) ,
41 m_useLCcorrection ( 0 )
47 <<
"EcalHitResponse requires the RandomNumberGeneratorService\n"
48 "which is not present in the configuration file. You must add the service\n"
49 "in the configuration file or remove the modules that require it.";
156 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
175 return(m_minBunch <= bunchCrossing && m_maxBunch >= bunchCrossing);
195 hitItr != hits.
end() ; ++hitItr )
198 const int bunch ( hitItr.bunch() ) ;
209 const DetId detId ( hit.
id() ) ;
224 + parameters->timePhase()
228 double binTime ( tzero ) ;
232 const unsigned int rsize ( result.
size() ) ;
234 for(
unsigned int bin ( 0 ) ;
bin != rsize ; ++
bin )
236 result[
bin ] += (*
shape())( binTime )*signal ;
265 float lasercalib = 1.;
284 assert( 0 != cellGeometry ) ;
const CaloVShape * m_shape
const CaloVShape * shape() const
double findLaserConstant(const DetId &detId) const
CLHEP::RandGaussQ * ranGauss() const
std::vector< unsigned int > VecInd
CLHEP::RandGaussQ * m_RandGauss
void setEventTime(const edm::TimeValue_t &iTime)
virtual ~EcalHitResponse()
float getLaserCorrection(DetId const &xid, edm::Timestamp const &iTime) const
virtual void initializeHits()
double analogSignalAmplitude(const DetId &id, float energy) const
bool doPhotostatistics() const
whether or not to apply Poisson statistics to photoelectrons
Electronic response of the preamp.
double timeOfFlight(const DetId &detId) const
Main class for Parameters in different subdetectors.
void setHitFilter(const CaloVHitFilter *filter)
const CaloSimParameters * params(const DetId &detId) const
virtual double delay(const PCaloHit &hit) const =0
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
virtual void run(MixCollection< PCaloHit > &hits)
void setBunchRange(int minBunch, int maxBunch)
void setLaserConstants(const EcalLaserDbService *laser, bool &useLCcorrection)
const EcalSamples * findDetId(const DetId &detId) const
double phaseShift() const
const CaloVHitFilter * hitFilter() const
EcalHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
void setPhaseShift(double phaseShift)
void blankOutUsedSamples()
const CaloVHitCorrection * m_hitCorrection
double simHitToPhotoelectrons() const
virtual double timeToRise() const =0
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
virtual bool accepts(const PCaloHit &hit) const =0
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
virtual void putAnalogSignal(const PCaloHit &inputHit)
const EcalLaserDbService * m_lasercals
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned long long TimeValue_t
void setGeometry(const CaloSubdetectorGeometry *geometry)
const CaloSubdetectorGeometry * m_geometry
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
void setPECorrection(const CaloVPECorrection *peCorrection)
const CaloVPECorrection * m_PECorrection
ESHandle< TrackerGeometry > geometry
CLHEP::RandPoissonQ * ranPois() const
static const double tzero[3]
CLHEP::RandPoissonQ * m_RandPoisson
EcalSamples * findSignal(const DetId &detId)
virtual double correctPE(const DetId &detId, double npe) const =0
virtual EcalSamples * vSamAll(unsigned int i)=0
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void add(const EcalSamples *pSam)
const CaloVHitFilter * m_hitFilter
bool withinBunchRange(int bunchCrossing) const
tuple size
Write out results.
virtual void finalizeHits()