13 #include "CLHEP/Random/RandPoissonQ.h"
14 #include "CLHEP/Random/RandGaussQ.h"
17 #include "CLHEP/Units/GlobalPhysicalConstants.h"
18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
25 m_parameterMap ( parameterMap ) ,
27 m_hitCorrection ( 0 ) ,
28 m_PECorrection ( 0 ) ,
55 <<
"CaloHitRespoNew requires the RandomNumberGeneratorService\n"
56 "which is not present in the configuration file. You must add the service\n"
57 "in the configuration file or remove the modules that require it.";
73 <<
"CaloHitRespoNew requires the RandomNumberGeneratorService\n"
74 "which is not present in the configuration file. You must add the service\n"
75 "in the configuration file or remove the modules that require it.";
173 const unsigned int nPre ( parameters.
binOfMaximum() - 1 ) ;
177 const unsigned int size ( m_vSamp.size() ) ;
179 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
182 m_vSamp[
i ].setSize( rSize ) ;
183 m_vSamp[
i ].setPresamples( nPre ) ;
193 for(
unsigned int i ( 0 ) ;
i !=
size ; ++
i )
210 hitItr != hits.
end() ; ++hitItr )
213 const int bunch ( hitItr.bunch() ) ;
229 const DetId detId ( hit.
id() ) ;
238 + parameters->timePhase()
242 double binTime ( tzero ) ;
246 const unsigned int rsize ( result.
size() ) ;
248 for(
unsigned int bin ( 0 ) ;
bin != rsize ; ++
bin )
250 result[
bin ] += (*
shape())( binTime )*signal ;
266 const DetId& detId ( hit.
id() ) ;
273 double npe ( hit.
energy()*parameters.simHitToPhotoelectrons( detId ) ) ;
276 if( parameters.doPhotostatistics() ) npe =
ranPois()->fire( npe ) ;
287 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)
Electronic response of the preamp.
virtual void run(MixCollection< PCaloHit > &hits)
Main class for Parameters in different subdetectors.
void blankOutUsedSamples()
CaloHitRespoNew(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
CaloSamples * findSignal(const DetId &detId)
double phaseShift() const
CLHEP::RandGaussQ * ranGauss() const
void setGeometry(const CaloSubdetectorGeometry *geometry)
virtual void putAnalogSignal(const PCaloHit &inputHit)
const CaloSubdetectorGeometry * geometry() const
const CaloVSimParameterMap * m_parameterMap
virtual void correct(PCaloHit &hit) const =0
std::vector< CaloSamples > VecSam
virtual void setRandomEngine(CLHEP::HepRandomEngine &engine) const
virtual double timeToRise() const =0
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
double analogSignalAmplitude(const PCaloHit &hit) const
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
virtual ~CaloHitRespoNew()
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
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
const CaloVHitCorrection * m_hitCorrection
tuple size
Write out results.
const CaloVHitFilter * m_hitFilter