#include <ESElectronicsSim.h>
Definition at line 16 of file ESElectronicsSim.h.
ESElectronicsSim::ESElectronicsSim |
( |
bool |
addNoise | ) |
|
Definition at line 11 of file ESElectronicsSim.cc.
const ESIntercalibConstants * mips_
const ESPedestals * peds_
ESElectronicsSim::~ESElectronicsSim |
( |
| ) |
|
|
virtual |
void ESElectronicsSim::analogToDigital |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
const CaloSamples & |
cs, |
|
|
ESDataFrame & |
df |
|
) |
| const |
|
virtual |
double ESElectronicsSim::decode |
( |
const ESSample & |
sample, |
|
|
const DetId & |
detId |
|
) |
| const |
|
private |
std::vector< ESSample > ESElectronicsSim::encode |
( |
const CaloSamples & |
timeframe, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| const |
|
private |
Definition at line 45 of file ESElectronicsSim.cc.
References ecalMGPA::adc(), addNoise_, Exception, ESCondObjectContainer< T >::find(), ESCondObjectContainer< T >::getMap(), i, CaloSamples::id(), edm::Service< T >::isAvailable(), MAXADC, MINADC, mips_, MIPToGeV_, peds_, mps_update::results, and CaloSamples::size().
Referenced by analogToDigital().
50 <<
"ESElectroncSim requires the RandomNumberGeneratorService\n"
51 "which is not present in the configuration file. You must add the service\n"
52 "in the configuration file or remove the modules that require it.";
57 results.reserve(timeframe.
size());
61 int baseline_ = (int) it_ped->getMean();
62 double sigma_ = (double) it_ped->getRms();
63 double MIPADC_ = (double) (*it_mip);
68 for (
int i=0;
i<timeframe.
size();
i++) {
74 noi = CLHEP::RandGaussQ::shoot(engine, 0., sigma_);
77 signal = timeframe[
i]*ADCGeV + noi + baseline_;
89 results.emplace_back(adc);
int adc(sample_type sample)
get the ADC sample (12 bits)
const ESIntercalibConstants * mips_
const self & getMap() const
const_iterator find(uint32_t rawId) const
int size() const
get the size
std::vector< Item >::const_iterator const_iterator
DetId id() const
get the (generic) id
const ESPedestals * peds_
void ESElectronicsSim::newEvent |
( |
CLHEP::HepRandomEngine * |
| ) |
|
|
inline |
void ESElectronicsSim::setGain |
( |
const int |
gain | ) |
|
|
inline |
void ESElectronicsSim::setMIPToGeV |
( |
const double |
MIPToGeV | ) |
|
|
inline |
void ESElectronicsSim::setPedestals |
( |
const ESPedestals * |
peds | ) |
|
|
inline |
bool ESElectronicsSim::addNoise_ |
|
private |
int ESElectronicsSim::gain_ |
|
private |
double ESElectronicsSim::MIPToGeV_ |
|
private |