Go to the documentation of this file.
7 #include "CLHEP/Random/RandGaussQ.h"
21 std::vector<ESSample> essamples =
encode(
cs, engine);
24 for (
int i = 0;
i < df.
size();
i++) {
30 for (
int i = 0;
i < df.
size();
i++) {
39 <<
"ESElectroncSim requires the RandomNumberGeneratorService\n"
40 "which is not present in the configuration file. You must add the service\n"
41 "in the configuration file or remove the modules that require it.";
49 int baseline_ = (
int)it_ped->getMean();
50 double sigma_ = (double)it_ped->getRms();
51 double MIPADC_ = (double)(*it_mip);
56 for (
int i = 0;
i < timeframe.
size();
i++) {
61 noi = CLHEP::RandGaussQ::shoot(engine, 0., sigma_);
64 signal = timeframe[
i] * ADCGeV + noi + baseline_;
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
unique_ptr< ClusterSequence > cs
int size() const
get the size
std::vector< ESSample > encode(const CaloSamples &timeframe, CLHEP::HepRandomEngine *) const
const_iterator find(uint32_t rawId) const
const ESPedestals * peds_
std::vector< Item >::const_iterator const_iterator
const ESIntercalibConstants * mips_
virtual ~ESElectronicsSim()
virtual void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
void setSample(int i, const ESSample &sam)
DetId id() const
get the (generic) id
double decode(const ESSample &sample, const DetId &detId) const
const self & getMap() const
const ESDetId & id() const
ESElectronicsSim(bool addNoise)
virtual void analogToDigital(CLHEP::HepRandomEngine *, const CaloSamples &cs, ESDataFrame &df) const