4 using rndm::NuRandomService;
5 using CLHEP::HepJamesRandom;
10 :m_noise(noise), m_vsen(vsen), m_vmax(0.0), m_adcmax(0), m_random_engine(nullptr) {
14 seedSvc->registerEngine(NuRandomService::CLHEPengineSeeder(
m_random_engine),
"NoisyAdcSimulator");
16 if ( nbit == 0 )
return;
17 unsigned int nbitmax = 8*
sizeof(
Count);
18 if ( nbit > nbitmax )
return;
20 for (
unsigned int ibit=0; ibit<nbit; ++ibit ) {
32 std::cout <<
"Digitisation noise : " <<
m_noise <<
"\n";
43 double halfsen = 0.5*
m_vsen;
44 if (
m_vsen <= 0.0 )
return 0;
45 if ( vin < halfsen )
return 0;
Count count(double vin, Channel chan=0, Tick tick=0) const override
T get(std::string const &key) const
static constexpr double ps
CLHEP::HepRandomEngine * m_random_engine
NoisyAdcSimulator(double vsen, unsigned int nbit, int noise)