11 #include "CLHEP/Random/RandGaussQ.h"
14 : theParameterMap(parameterMap)
22 double totalCharge = 0.;
23 for(
int i = 0;
i < 4; ++
i) {
25 if(bin < samples.
size()) {
26 totalCharge += samples[
bin];
48 double totalCharge =
charge(samples);
49 if(totalCharge <= 0.) totalCharge = 1.e-6;
55 double smearns=CLHEP::RandGaussQ::shoot(engine)*
rms;
57 LogDebug(
"HcalTimeSlewSim") <<
"TimeSmear charge " << totalCharge <<
" rms " << rms <<
" delay " << delay <<
" smearns " << smearns;
HcalSubdetector subdet() const
get the subdetector
int presamples() const
access presample information
void delay(CaloSamples &samples, CLHEP::HepRandomEngine *) const
double timeSmearRMS(double ampl) const
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
const CaloVSimParameterMap * theParameterMap
static const int SubdetectorId
int size() const
get the size
CaloSamples & offsetTime(double offset)
shift all the samples by a time, in ns, interpolating
double charge(const CaloSamples &samples) const
DetId id() const
get the (generic) id
HcalTimeSlewSim(const CaloVSimParameterMap *parameterMap)
static double delay(double fC, BiasSetting bias=Medium)
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...