CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
EcalElectronicsSim Class Reference

#include <EcalElectronicsSim.h>

Public Types

typedef CaloTSamples< float, 10 > EcalSamples
 

Public Member Functions

void analogToDigital (CLHEP::HepRandomEngine *, EcalSamples &clf, EcalDataFrame &df) const
 from EcalSamples to EcalDataFrame More...
 
 EcalElectronicsSim (const EcalSimParameterMap *parameterMap, EcalCoder *coder, bool applyConstantTerm, double rmsConstantTerm)
 
void newEvent ()
 
void setNoiseSignalGenerator (const CaloVNoiseSignalGenerator *noiseSignalGenerator)
 
 ~EcalElectronicsSim ()
 

Private Member Functions

void amplify (EcalSamples &clf, CLHEP::HepRandomEngine *) const
 input signal is in pe. Converted in GeV More...
 

Private Attributes

const bool m_applyConstantTerm
 
const EcalSimParameterMapm_simMap
 map of parameters More...
 
EcalCoderm_theCoder
 
const double m_thisCT
 
const CaloVNoiseSignalGeneratortheNoiseSignalGenerator
 

Detailed Description

Definition at line 20 of file EcalElectronicsSim.h.

Member Typedef Documentation

◆ EcalSamples

Definition at line 22 of file EcalElectronicsSim.h.

Constructor & Destructor Documentation

◆ EcalElectronicsSim()

EcalElectronicsSim::EcalElectronicsSim ( const EcalSimParameterMap parameterMap,
EcalCoder coder,
bool  applyConstantTerm,
double  rmsConstantTerm 
)

Definition at line 13 of file EcalElectronicsSim.cc.

17  : m_simMap(parameterMap), m_theCoder(coder), m_thisCT(rmsConstantTerm), m_applyConstantTerm(applyConstantTerm) {}

◆ ~EcalElectronicsSim()

EcalElectronicsSim::~EcalElectronicsSim ( )

Definition at line 19 of file EcalElectronicsSim.cc.

19 {}

Member Function Documentation

◆ amplify()

void EcalElectronicsSim::amplify ( EcalElectronicsSim::EcalSamples clf,
CLHEP::HepRandomEngine *  engine 
) const
private

input signal is in pe. Converted in GeV

Definition at line 30 of file EcalElectronicsSim.cc.

30  {
31  const double fac(m_simMap->simParameters(clf.id()).photoelectronsToAnalog());
32  if (m_applyConstantTerm) {
33  clf *= fac * CLHEP::RandGaussQ::shoot(engine, 1.0, m_thisCT);
34  } else {
35  clf *= fac;
36  }
37 }

References CaloTSamplesBase< Ttype >::id(), m_applyConstantTerm, m_simMap, m_thisCT, es_hardcode_cfi::photoelectronsToAnalog, and EcalSimParameterMap::simParameters().

Referenced by analogToDigital().

◆ analogToDigital()

void EcalElectronicsSim::analogToDigital ( CLHEP::HepRandomEngine *  engine,
EcalElectronicsSim::EcalSamples clf,
EcalDataFrame df 
) const

from EcalSamples to EcalDataFrame

Definition at line 21 of file EcalElectronicsSim.cc.

23  {
24  //PG input signal is in pe. Converted in GeV
25  amplify(clf, engine);
26 
27  m_theCoder->analogToDigital(engine, clf, df);
28 }

References amplify(), EcalCoder::analogToDigital(), and m_theCoder.

◆ newEvent()

void EcalElectronicsSim::newEvent ( )
inline

Definition at line 34 of file EcalElectronicsSim.h.

34 {}

◆ setNoiseSignalGenerator()

void EcalElectronicsSim::setNoiseSignalGenerator ( const CaloVNoiseSignalGenerator noiseSignalGenerator)
inline

Definition at line 36 of file EcalElectronicsSim.h.

36  {
37  theNoiseSignalGenerator = noiseSignalGenerator;
38  }

References theNoiseSignalGenerator.

Member Data Documentation

◆ m_applyConstantTerm

const bool EcalElectronicsSim::m_applyConstantTerm
private

Definition at line 53 of file EcalElectronicsSim.h.

Referenced by amplify().

◆ m_simMap

const EcalSimParameterMap* EcalElectronicsSim::m_simMap
private

map of parameters

Definition at line 46 of file EcalElectronicsSim.h.

Referenced by amplify().

◆ m_theCoder

EcalCoder* EcalElectronicsSim::m_theCoder
private

Definition at line 50 of file EcalElectronicsSim.h.

Referenced by analogToDigital().

◆ m_thisCT

const double EcalElectronicsSim::m_thisCT
private

Definition at line 52 of file EcalElectronicsSim.h.

Referenced by amplify().

◆ theNoiseSignalGenerator

const CaloVNoiseSignalGenerator* EcalElectronicsSim::theNoiseSignalGenerator
private

Definition at line 48 of file EcalElectronicsSim.h.

Referenced by setNoiseSignalGenerator().

CaloTSamplesBase::id
DetId id() const
ecalElectronicsSim_cff.applyConstantTerm
applyConstantTerm
Definition: ecalElectronicsSim_cff.py:6
EcalElectronicsSim::m_applyConstantTerm
const bool m_applyConstantTerm
Definition: EcalElectronicsSim.h:53
EcalCoder::analogToDigital
virtual void analogToDigital(CLHEP::HepRandomEngine *, const EcalSamples &clf, EcalDataFrame &df) const
from EcalSamples to EcalDataFrame
Definition: EcalCoder.cc:53
EcalElectronicsSim::amplify
void amplify(EcalSamples &clf, CLHEP::HepRandomEngine *) const
input signal is in pe. Converted in GeV
Definition: EcalElectronicsSim.cc:30
EcalSimParameterMap::simParameters
const CaloSimParameters & simParameters(const DetId &id) const override
return the sim parameters relative to the right subdet
Definition: EcalSimParameterMap.cc:52
EcalElectronicsSim::m_theCoder
EcalCoder * m_theCoder
Definition: EcalElectronicsSim.h:50
EcalElectronicsSim::theNoiseSignalGenerator
const CaloVNoiseSignalGenerator * theNoiseSignalGenerator
Definition: EcalElectronicsSim.h:48
EcalElectronicsSim::m_simMap
const EcalSimParameterMap * m_simMap
map of parameters
Definition: EcalElectronicsSim.h:46
EcalElectronicsSim::m_thisCT
const double m_thisCT
Definition: EcalElectronicsSim.h:52
es_hardcode_cfi.photoelectronsToAnalog
photoelectronsToAnalog
Definition: es_hardcode_cfi.py:93