4 #include "CLHEP/Random/RandGaussQ.h"
9 m_addNoise ( addNoise ) ,
10 m_PreMix1 ( PreMix1 ) ,
60 const double baseline ( (
double) it_ped->getMean() ) ;
61 const double sigma ( isNoise ? 0. : (
double) it_ped->getRms() ) ;
62 const double MIPADC ( isNoise ? 0. : (
double) (*it_mip) ) ;
63 const double ADCGeV ( isNoise ? 1. : MIPADC/
m_MIPToGeV ) ;
67 for(
unsigned int i ( 0 ) ;
i != cs.
size(); ++
i )
69 const double noi ( isNoise || (!
m_addNoise) ? 0 :
70 sigma*CLHEP::RandGaussQ::shoot(engine, 0, 1) ) ;
73 if(!
m_PreMix1) signal = cs[
i]*ADCGeV + noi + baseline ;
74 else signal = cs[
i]*ADCGeV ;
89 if( 0.5 < signal - adc ) ++
adc ;
int adc(sample_type sample)
get the ADC sample (12 bits)
void setMIPToGeV(double MIPToGeV)
auto_ptr< ClusterSequence > cs
const ESIntercalibConstants * m_mips
const_iterator end() const
const self & getMap() const
void analogToDigital(CLHEP::HepRandomEngine *, ESSamples &cs, ESDataFrame &df, bool isNoise=false) const
void setPedestals(const ESPedestals *peds)
const_iterator find(uint32_t rawId) const
void setSample(int i, const ESSample &sam)
ESElectronicsSimFast(bool addNoise, bool PreMix1)
const ESPedestals * m_peds
std::vector< Item >::const_iterator const_iterator
void setMIPs(const ESIntercalibConstants *mips)