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];
50 int maxbin = samples.
size();
56 double scale_factor = 0.6;
57 double scale = data[4] / scale_factor;
64 smearns = CLHEP::RandGaussQ::shoot(engine)*
rms;
65 LogDebug(
"HcalTimeSlewSim") <<
"TimeSmear charge "
66 << scale <<
" rms " << rms
67 <<
" smearns " << smearns;
70 for(
int i = 0;
i < samples.
size()-1; ++
i) {
71 double totalCharge = data[
i]/scale_factor;
74 double delay = smearns;
75 if(totalCharge <= 0.) totalCharge = eps;
77 if(delay <= 0.) delay = eps;
80 int firstbin = floor(t/25.);
81 double f = t/25. - firstbin;
82 int nextbin = firstbin + 1;
83 double v2 = (nextbin < 0 || nextbin >= maxbin) ? 0. : data[nextbin];
85 data[
i+1] = data[
i+1] + (v2 - data[
i]);
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
double charge(const CaloSamples &samples) const
char data[epos_bytes_allocation]
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...