13 #include "CLHEP/Random/RandPoissonQ.h"
14 #include "CLHEP/Random/RandGaussQ.h"
18 #include "CLHEP/Units/GlobalPhysicalConstants.h"
19 #include "CLHEP/Units/GlobalSystemOfUnits.h"
27 m_parameterMap ( parameterMap ) ,
29 m_hitCorrection ( 0 ) ,
30 m_PECorrection ( 0 ) ,
57 <<
"CaloHitRespoNew requires the RandomNumberGeneratorService\n"
58 "which is not present in the configuration file. You must add the service\n"
59 "in the configuration file or remove the modules that require it.";
75 <<
"CaloHitRespoNew requires the RandomNumberGeneratorService\n"
76 "which is not present in the configuration file. You must add the service\n"
77 "in the configuration file or remove the modules that require it.";
175 const unsigned int nPre ( parameters.
binOfMaximum() - 1 ) ;
179 const unsigned int size ( m_vSamp.size() ) ;
181 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
184 m_vSamp[
i ].setSize( rSize ) ;
185 m_vSamp[
i ].setPresamples( nPre ) ;
194 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
208 hitItr != hits.
end() ; ++hitItr )
228 const DetId detId ( hit.
id() ) ;
243 + parameters->timePhase()
247 double binTime ( tzero ) ;
251 const unsigned int rsize ( result.
size() ) ;
253 for(
unsigned int bin ( 0 ) ;
bin != rsize ; ++
bin )
255 result[
bin ] += (*
shape())( binTime )*signal ;
290 assert( 0 != cellGeometry ) ;
void setupSamples(const DetId &detId)
CLHEP::RandPoissonQ * m_RandPoisson
void setHitFilter(const CaloVHitFilter *filter)
void setHitCorrection(const CaloVHitCorrection *hitCorrection)
const CaloVPECorrection * m_PECorrection
CLHEP::RandGaussQ * m_RandGauss
double timeOfFlight(const DetId &detId) const
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
virtual void run(MixCollection< PCaloHit > &hits)
Main class for Parameters in different subdetectors.
void blankOutUsedSamples()
virtual double delay(const PCaloHit &hit) const =0
virtual void add(const PCaloHit &hit)
CaloSamples * findSignal(const DetId &detId)
double phaseShift() const
CLHEP::RandGaussQ * ranGauss() const
void setGeometry(const CaloSubdetectorGeometry *geometry)
double analogSignalAmplitude(const DetId &id, float energy) const
virtual void putAnalogSignal(const PCaloHit &inputHit)
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
std::vector< CaloSamples > VecSam
double simHitToPhotoelectrons() const
virtual void setRandomEngine(CLHEP::HepRandomEngine &engine) 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)
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
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
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]
CLHEP::RandPoissonQ * ranPois() const
virtual double correctPE(const DetId &detId, double npe) const =0
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