4 #include "CLHEP/Random/RandGaussQ.h" 9 : m_addNoise(addNoise), m_PreMix1(PreMix1), m_MIPToGeV(0), m_peds(nullptr), m_mips(nullptr) {
30 df.setSize(
cs.size());
36 const double baseline((
double)it_ped->getMean());
37 const double sigma(isNoise ? 0. : (
double)it_ped->getRms());
38 const double MIPADC(isNoise ? 0. : (
double)(*it_mip));
39 const double ADCGeV(isNoise ? 1. : MIPADC /
m_MIPToGeV);
43 for (
unsigned int i(0);
i !=
cs.size(); ++
i) {
44 const double noi(isNoise || (!
m_addNoise) ? 0 : sigma * CLHEP::RandGaussQ::shoot(engine, 0, 1));
48 signal =
cs[
i] * ADCGeV + noi + baseline;
50 signal =
cs[
i] * ADCGeV;
63 if (0.5 < signal -
adc)
void setMIPToGeV(double MIPToGeV)
const ESIntercalibConstants * m_mips
const_iterator find(uint32_t rawId) const
void setPedestals(const ESPedestals *peds)
const_iterator end() const
ESElectronicsSimFast(bool addNoise, bool PreMix1)
const ESPedestals * m_peds
std::vector< Item >::const_iterator const_iterator
const self & getMap() const
void setMIPs(const ESIntercalibConstants *mips)
void analogToDigital(CLHEP::HepRandomEngine *, ESSamples &cs, ESDataFrame &df, bool isNoise=false) const
uint16_t *__restrict__ uint16_t const *__restrict__ adc