#include <SimCalorimetry/HcalSimAlgos/interface/HcalElectronicsSim.h>
Public Member Functions | |
void | analogToDigital (CaloSamples &linearFrame, ZDCDataFrame &result) |
void | analogToDigital (CaloSamples &linearFrame, HFDataFrame &result) |
void | analogToDigital (CaloSamples &linearFrame, HODataFrame &result) |
void | analogToDigital (CaloSamples &linearFrame, HBHEDataFrame &result) |
HcalElectronicsSim (HcalAmplifier *amplifier, const HcalCoderFactory *coderFactory) | |
void | newEvent () |
Things that need to be initialized every event. | |
void | setRandomEngine (CLHEP::HepRandomEngine &engine) |
~HcalElectronicsSim () | |
Private Member Functions | |
template<class Digi> | |
void | convert (CaloSamples &frame, Digi &result) |
Private Attributes | |
HcalAmplifier * | theAmplifier |
const HcalCoderFactory * | theCoderFactory |
CLHEP::RandFlat * | theRandFlat |
int | theStartingCapId |
Definition at line 19 of file HcalElectronicsSim.h.
HcalElectronicsSim::HcalElectronicsSim | ( | HcalAmplifier * | amplifier, | |
const HcalCoderFactory * | coderFactory | |||
) |
Definition at line 12 of file HcalElectronicsSim.cc.
00013 : theAmplifier(amplifier), 00014 theCoderFactory(coderFactory), 00015 theRandFlat(0), 00016 theStartingCapId(0) 00017 { 00018 }
HcalElectronicsSim::~HcalElectronicsSim | ( | ) |
Definition at line 21 of file HcalElectronicsSim.cc.
References theRandFlat.
00022 { 00023 delete theRandFlat; 00024 }
void HcalElectronicsSim::analogToDigital | ( | CaloSamples & | linearFrame, | |
ZDCDataFrame & | result | |||
) |
void HcalElectronicsSim::analogToDigital | ( | CaloSamples & | linearFrame, | |
HFDataFrame & | result | |||
) |
void HcalElectronicsSim::analogToDigital | ( | CaloSamples & | linearFrame, | |
HODataFrame & | result | |||
) |
void HcalElectronicsSim::analogToDigital | ( | CaloSamples & | linearFrame, | |
HBHEDataFrame & | result | |||
) |
void HcalElectronicsSim::convert | ( | CaloSamples & | frame, | |
Digi & | result | |||
) | [inline, private] |
Definition at line 34 of file HcalElectronicsSim.cc.
References HcalAmplifier::amplify(), HcalCoderFactory::coder(), CaloSamples::id(), CaloSamples::size(), theAmplifier, theCoderFactory, and theStartingCapId.
00034 { 00035 result.setSize(frame.size()); 00036 theAmplifier->amplify(frame); 00037 theCoderFactory->coder(frame.id())->fC2adc(frame, result, theStartingCapId); 00038 }
void HcalElectronicsSim::newEvent | ( | ) |
Things that need to be initialized every event.
Definition at line 60 of file HcalElectronicsSim.cc.
References HcalAmplifier::setStartingCapId(), theAmplifier, theRandFlat, and theStartingCapId.
00060 { 00061 // pick a new starting Capacitor ID 00062 theStartingCapId = theRandFlat->fireInt(4); 00063 theAmplifier->setStartingCapId(theStartingCapId); 00064 }
void HcalElectronicsSim::setRandomEngine | ( | CLHEP::HepRandomEngine & | engine | ) |
Definition at line 27 of file HcalElectronicsSim.cc.
References theRandFlat.
Referenced by HcalDigiProducer::HcalDigiProducer().
00028 { 00029 theRandFlat = new CLHEP::RandFlat(engine); 00030 }
HcalAmplifier* HcalElectronicsSim::theAmplifier [private] |
const HcalCoderFactory* HcalElectronicsSim::theCoderFactory [private] |
CLHEP::RandFlat* HcalElectronicsSim::theRandFlat [private] |
Definition at line 40 of file HcalElectronicsSim.h.
Referenced by newEvent(), setRandomEngine(), and ~HcalElectronicsSim().
int HcalElectronicsSim::theStartingCapId [private] |