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.";
45 results.reserve(timeframe.
size());
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_;
78 results.emplace_back(adc);
const ESIntercalibConstants * mips_
virtual void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
const ESDetId & id() const
unique_ptr< ClusterSequence > cs
const self & getMap() const
std::vector< ESSample > encode(const CaloSamples &timeframe, CLHEP::HepRandomEngine *) const
virtual void analogToDigital(CLHEP::HepRandomEngine *, const CaloSamples &cs, ESDataFrame &df) const
ESElectronicsSim(bool addNoise)
const_iterator find(uint32_t rawId) const
double decode(const ESSample &sample, const DetId &detId) const
void setSample(int i, const ESSample &sam)
int size() const
get the size
std::vector< Item >::const_iterator const_iterator
virtual ~ESElectronicsSim()
DetId id() const
get the (generic) id
const ESPedestals * peds_
uint16_t *__restrict__ uint16_t const *__restrict__ adc