13 #include "CLHEP/Random/RandPoissonQ.h"
14 #include "CLHEP/Units/GlobalPhysicalConstants.h"
15 #include "CLHEP/Units/GlobalSystemOfUnits.h"
23 m_parameterMap ( parameterMap ) ,
25 m_hitCorrection ( 0 ) ,
26 m_PECorrection ( 0 ) ,
124 const unsigned int nPre ( parameters.
binOfMaximum() - 1 ) ;
128 const unsigned int size ( m_vSamp.size() ) ;
130 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
133 m_vSamp[
i ].setSize( rSize ) ;
134 m_vSamp[
i ].setPresamples( nPre ) ;
143 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
157 hitItr != hits.
end() ; ++hitItr )
160 add(*hitItr, engine);
177 const DetId detId ( hit.
id() ) ;
192 + parameters->timePhase()
196 double binTime ( tzero ) ;
200 const unsigned int rsize ( result.
size() ) ;
202 for(
unsigned int bin ( 0 ) ;
bin != rsize ; ++
bin )
204 result[
bin ] += (*
shape())( binTime )*signal ;
229 CLHEP::RandPoissonQ randPoissonQ(*engine, npe);
230 npe = randPoissonQ.fire();
242 assert( 0 != cellGeometry ) ;
void setupSamples(const DetId &detId)
void setHitFilter(const CaloVHitFilter *filter)
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
double analogSignalAmplitude(const DetId &id, float energy, CLHEP::HepRandomEngine *) const
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
const CaloVPECorrection * m_PECorrection
double timeOfFlight(const DetId &detId) const
virtual void add(const PCaloHit &hit, CLHEP::HepRandomEngine *)
const CaloVShape * shape() const
void setBunchRange(int minBunch, int maxBunch)
bool doPhotostatistics() const
whether or not to apply Poisson statistics to photoelectrons
Electronic response of the preamp.
bool withinBunchRange(int bunchCrossing) const
CaloGeometry const * getGeometry()
Main class for Parameters in different subdetectors.
void blankOutUsedSamples()
virtual double correctPE(const DetId &detId, double npe, CLHEP::HepRandomEngine *) const =0
CaloSamples * findSignal(const DetId &detId)
double phaseShift() const
void setGeometry(const CaloSubdetectorGeometry *geometry)
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
std::vector< CaloSamples > VecSam
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
void setPECorrection(const CaloVPECorrection *peCorrection)
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setPhaseShift(double phaseShift)
const CaloSamples & operator[](unsigned int i) const
virtual double delay(const PCaloHit &hit, CLHEP::HepRandomEngine *) const =0
CaloHitRespoNew(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape, const DetId detId)
virtual ~CaloHitRespoNew()
int size() const
get the size
const CaloSubdetectorGeometry * m_geometry
unsigned int samplesSize() const
ESHandle< TrackerGeometry > geometry
const CaloSimParameters * params(const DetId &detId) const
const CaloVShape * m_shape
static const double tzero[3]
virtual void putAnalogSignal(const PCaloHit &inputHit, CLHEP::HepRandomEngine *)
Detector det() const
get the detector field from this detid
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
const CaloVHitCorrection * m_hitCorrection
tuple size
Write out results.
const CaloVHitFilter * m_hitFilter