00001 00002 #ifndef EcalSimAlgos_EcalElectronicsSim_h 00003 #define EcalSimAlgos_EcalElectronicsSim_h 1 00004 00005 00006 #include "CalibFormats/CaloObjects/interface/CaloTSamples.h" 00007 #include "CLHEP/Random/RandGaussQ.h" 00008 00009 00010 class EcalCoder ; 00011 class EcalDataFrame ; 00012 class EcalSimParameterMap ; 00013 00014 00015 /* \class EcalElectronicsSim 00016 * \brief Converts CaloDataFrame in CaloTimeSample and vice versa. 00017 * 00018 */ 00019 00020 class EcalElectronicsSim 00021 { 00022 public: 00023 00024 typedef CaloTSamples<float,10> EcalSamples ; 00025 00026 EcalElectronicsSim( const EcalSimParameterMap* parameterMap , 00027 EcalCoder* coder , 00028 bool applyConstantTerm , 00029 double rmsConstantTerm ) ; 00030 00031 ~EcalElectronicsSim() ; 00032 00034 void analogToDigital( EcalSamples& clf, EcalDataFrame& df ) const ; 00035 00036 void newEvent() {} 00037 00038 private: 00039 00041 void amplify( EcalSamples& clf ) const ; 00042 00044 00045 const EcalSimParameterMap* m_simMap ; 00046 00047 EcalCoder* m_theCoder ; 00048 00049 CLHEP::RandGaussQ* m_gaussQDistribution ; 00050 } ; 00051 00052 00053 #endif