CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 22 of file EcalElectronicsSim.h.

Member Typedef Documentation

Definition at line 26 of file EcalElectronicsSim.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file EcalElectronicsSim.cc.

16  :
17  m_simMap ( parameterMap ) ,
18  m_theCoder ( coder ) ,
19  m_thisCT ( rmsConstantTerm ),
20  m_applyConstantTerm ( applyConstantTerm )
21 {
22 }
const bool m_applyConstantTerm
const EcalSimParameterMap * m_simMap
map of parameters
EcalElectronicsSim::~EcalElectronicsSim ( )

Definition at line 24 of file EcalElectronicsSim.cc.

25 {
26 }

Member Function Documentation

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

input signal is in pe. Converted in GeV

Definition at line 41 of file EcalElectronicsSim.cc.

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

Referenced by analogToDigital().

42 {
43  const double fac ( m_simMap->simParameters( clf.id() ).photoelectronsToAnalog() ) ;
45  {
46  clf *= fac*CLHEP::RandGaussQ::shoot(engine, 1.0, m_thisCT);
47  }
48  else
49  {
50  clf *= fac ;
51  }
52 }
virtual const CaloSimParameters & simParameters(const DetId &id) const
return the sim parameters relative to the right subdet
const bool m_applyConstantTerm
DetId id() const
const EcalSimParameterMap * m_simMap
map of parameters
void EcalElectronicsSim::analogToDigital ( CLHEP::HepRandomEngine *  engine,
EcalElectronicsSim::EcalSamples clf,
EcalDataFrame df 
) const

from EcalSamples to EcalDataFrame

Definition at line 29 of file EcalElectronicsSim.cc.

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

32 {
33 
34  //PG input signal is in pe. Converted in GeV
35  amplify( clf, engine ) ;
36 
37  m_theCoder->analogToDigital( engine, clf, df ) ;
38 }
virtual void analogToDigital(CLHEP::HepRandomEngine *, const EcalSamples &clf, EcalDataFrame &df) const
from EcalSamples to EcalDataFrame
Definition: EcalCoder.cc:75
void amplify(EcalSamples &clf, CLHEP::HepRandomEngine *) const
input signal is in pe. Converted in GeV
void EcalElectronicsSim::newEvent ( )
inline

Definition at line 38 of file EcalElectronicsSim.h.

38 {}
void EcalElectronicsSim::setNoiseSignalGenerator ( const CaloVNoiseSignalGenerator noiseSignalGenerator)
inline

Definition at line 40 of file EcalElectronicsSim.h.

References theNoiseSignalGenerator.

40  {
41  theNoiseSignalGenerator = noiseSignalGenerator;
42  }
const CaloVNoiseSignalGenerator * theNoiseSignalGenerator

Member Data Documentation

const bool EcalElectronicsSim::m_applyConstantTerm
private

Definition at line 58 of file EcalElectronicsSim.h.

Referenced by amplify().

const EcalSimParameterMap* EcalElectronicsSim::m_simMap
private

map of parameters

Definition at line 51 of file EcalElectronicsSim.h.

Referenced by amplify().

EcalCoder* EcalElectronicsSim::m_theCoder
private

Definition at line 55 of file EcalElectronicsSim.h.

Referenced by analogToDigital().

const double EcalElectronicsSim::m_thisCT
private

Definition at line 57 of file EcalElectronicsSim.h.

Referenced by amplify().

const CaloVNoiseSignalGenerator* EcalElectronicsSim::theNoiseSignalGenerator
private

Definition at line 53 of file EcalElectronicsSim.h.

Referenced by setNoiseSignalGenerator().