CMS 3D CMS Logo

HcalElectronicsSim Class Reference

#include <SimCalorimetry/HcalSimAlgos/interface/HcalElectronicsSim.h>

List of all members.

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

HcalAmplifiertheAmplifier
const HcalCoderFactorytheCoderFactory
CLHEP::RandFlat * theRandFlat
int theStartingCapId


Detailed Description

Definition at line 19 of file HcalElectronicsSim.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

void HcalElectronicsSim::analogToDigital ( CaloSamples linearFrame,
ZDCDataFrame result 
)

Definition at line 55 of file HcalElectronicsSim.cc.

00055                                                                                 {
00056   convert<ZDCDataFrame>(lf, result);
00057 }

void HcalElectronicsSim::analogToDigital ( CaloSamples linearFrame,
HFDataFrame result 
)

Definition at line 51 of file HcalElectronicsSim.cc.

00051                                                                                {
00052   convert<HFDataFrame>(lf, result);
00053 }

void HcalElectronicsSim::analogToDigital ( CaloSamples linearFrame,
HODataFrame result 
)

Definition at line 46 of file HcalElectronicsSim.cc.

00046                                                                                {
00047   convert<HODataFrame>(lf, result);
00048 }

void HcalElectronicsSim::analogToDigital ( CaloSamples linearFrame,
HBHEDataFrame result 
)

Definition at line 41 of file HcalElectronicsSim.cc.

00041                                                                                  {
00042   convert<HBHEDataFrame>(lf, result);
00043 }

template<class Digi>
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 }


Member Data Documentation

HcalAmplifier* HcalElectronicsSim::theAmplifier [private]

Definition at line 38 of file HcalElectronicsSim.h.

Referenced by convert(), and newEvent().

const HcalCoderFactory* HcalElectronicsSim::theCoderFactory [private]

Definition at line 39 of file HcalElectronicsSim.h.

Referenced by convert().

CLHEP::RandFlat* HcalElectronicsSim::theRandFlat [private]

Definition at line 40 of file HcalElectronicsSim.h.

Referenced by newEvent(), setRandomEngine(), and ~HcalElectronicsSim().

int HcalElectronicsSim::theStartingCapId [private]

Definition at line 42 of file HcalElectronicsSim.h.

Referenced by convert(), and newEvent().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:41 2009 for CMSSW by  doxygen 1.5.4