CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalElectronicsSim< CoderType, SamplesType, DataFrameType > Class Template Reference

#include <EcalElectronicsSim.h>

Public Member Functions

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

Private Member Functions

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

Private Attributes

const bool m_applyConstantTerm
 
const EcalSimParameterMapm_simMap
 map of parameters More...
 
CoderType * m_theCoder
 
const double m_thisCT
 
const CaloVNoiseSignalGeneratortheNoiseSignalGenerator
 

Detailed Description

template<typename CoderType, typename SamplesType, typename DataFrameType>
class EcalElectronicsSim< CoderType, SamplesType, DataFrameType >

Definition at line 20 of file EcalElectronicsSim.h.

Constructor & Destructor Documentation

◆ EcalElectronicsSim()

template<typename CoderType , typename SamplesType , typename DataFrameType >
EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::EcalElectronicsSim ( const EcalSimParameterMap parameterMap,
CoderType *  coder,
bool  applyConstantTerm,
double  rmsConstantTerm 
)
inline

Definition at line 22 of file EcalElectronicsSim.h.

26  : m_simMap(parameterMap), m_theCoder(coder), m_thisCT(rmsConstantTerm), m_applyConstantTerm(applyConstantTerm) {}
const EcalSimParameterMap * m_simMap
map of parameters
const bool m_applyConstantTerm

Member Function Documentation

◆ amplify()

template<typename CoderType , typename SamplesType , typename DataFrameType >
void EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::amplify ( SamplesType &  clf,
CLHEP::HepRandomEngine *  engine 
) const
inlineprivate

input signal is in pe. Converted in GeV

Definition at line 44 of file EcalElectronicsSim.h.

References EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_applyConstantTerm, EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_simMap, EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_thisCT, Hcal_Conditions_forGlobalTag_cff::photoelectronsToAnalog, and EcalSimParameterMap::simParameters().

Referenced by EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::analogToDigital().

44  {
45  const double fac(m_simMap->simParameters(clf.id()).photoelectronsToAnalog());
46  if (m_applyConstantTerm) {
47  clf *= fac * CLHEP::RandGaussQ::shoot(engine, 1.0, m_thisCT);
48  } else {
49  clf *= fac;
50  }
51  }
const CaloSimParameters & simParameters(const DetId &id) const override
return the sim parameters relative to the right subdet
const EcalSimParameterMap * m_simMap
map of parameters
const bool m_applyConstantTerm

◆ analogToDigital()

template<typename CoderType , typename SamplesType , typename DataFrameType >
void EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::analogToDigital ( CLHEP::HepRandomEngine *  engine,
SamplesType &  clf,
DataFrameType &  df 
) const
inline

from EcalSamples to EcalDataFrame

Definition at line 30 of file EcalElectronicsSim.h.

References EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::amplify(), isotrackApplyRegressor::df, and EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_theCoder.

30  {
31  // input signal is in pe. Converted in GeV
32  amplify(clf, engine);
33  m_theCoder->analogToDigital(engine, clf, df);
34  }
void amplify(SamplesType &clf, CLHEP::HepRandomEngine *engine) const
input signal is in pe. Converted in GeV

◆ newEvent()

template<typename CoderType , typename SamplesType , typename DataFrameType >
void EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::newEvent ( )
inline

Definition at line 36 of file EcalElectronicsSim.h.

36 {}

◆ setNoiseSignalGenerator()

template<typename CoderType , typename SamplesType , typename DataFrameType >
void EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::setNoiseSignalGenerator ( const CaloVNoiseSignalGenerator noiseSignalGenerator)
inline

Definition at line 38 of file EcalElectronicsSim.h.

References EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::theNoiseSignalGenerator.

38  {
39  theNoiseSignalGenerator = noiseSignalGenerator;
40  }
const CaloVNoiseSignalGenerator * theNoiseSignalGenerator

Member Data Documentation

◆ m_applyConstantTerm

template<typename CoderType , typename SamplesType , typename DataFrameType >
const bool EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_applyConstantTerm
private

◆ m_simMap

template<typename CoderType , typename SamplesType , typename DataFrameType >
const EcalSimParameterMap* EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_simMap
private

map of parameters

Definition at line 55 of file EcalElectronicsSim.h.

Referenced by EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::amplify().

◆ m_theCoder

template<typename CoderType , typename SamplesType , typename DataFrameType >
CoderType* EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_theCoder
private

◆ m_thisCT

template<typename CoderType , typename SamplesType , typename DataFrameType >
const double EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::m_thisCT
private

◆ theNoiseSignalGenerator

template<typename CoderType , typename SamplesType , typename DataFrameType >
const CaloVNoiseSignalGenerator* EcalElectronicsSim< CoderType, SamplesType, DataFrameType >::theNoiseSignalGenerator
private