#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 35 of file ESElectronicsSim.cc.
References ecalMGPA::adc(), addNoise_, Exception, ESCondObjectContainer< T >::find(), ESCondObjectContainer< T >::getMap(), mps_fire::i, CaloSamples::id(), createfilelist::int, edm::Service< T >::isAvailable(), MAXADC, MINADC, mips_, MIPToGeV_, peds_, mps_update::results, and CaloSamples::size().
Referenced by analogToDigital().
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_
const self & getMap() const
const_iterator find(uint32_t rawId) const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
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 |