70 m_APDShape ( params.getParameter<double>(
"apdShapeTstart" ) ,
71 params.getParameter<double>(
"apdShapeTau" ) ) ,
82 m_EBs25notCont ( params.getParameter<double> (
"EBs25notContainment") ) ,
83 m_EEs25notCont ( params.getParameter<double> (
"EEs25notContainment") ) ,
87 params.getParameter<double> (
"simHitToPhotoelectronsBarrel") ,
88 params.getParameter<double> (
"simHitToPhotoelectronsEndcap") ,
89 params.getParameter<double> (
"photoelectronsToAnalogBarrel") ,
90 params.getParameter<double> (
"photoelectronsToAnalogEndcap") ,
91 params.getParameter<double> (
"samplingFactor") ,
92 params.getParameter<double> (
"timePhase") ,
94 params.getParameter<
int> (
"binOfMaximum") ,
95 params.getParameter<
bool> (
"doPhotostatistics") ,
96 params.getParameter<
bool> (
"syncPhase") ) ) ,
100 params.getParameter<
bool> (
"apdAddToBarrel" ) ,
102 params.getParameter<double> (
"apdSimToPELow" ) ,
103 params.getParameter<double> (
"apdSimToPEHigh" ) ,
104 params.getParameter<double> (
"apdTimeOffset" ) ,
105 params.getParameter<double> (
"apdTimeOffWidth" ) ,
106 params.getParameter<
bool> (
"apdDoPEStats" ) ,
108 params.getParameter<
std::vector<double> > (
"apdNonlParms" ) ) ) ,
129 m_PreMix1 ( params.getParameter<
bool> (
"EcalPreMixStage1") ) ,
130 m_PreMix2 ( params.getParameter<
bool> (
"EcalPreMixStage2") ) ,
134 m_doEB ( params.getParameter<
bool> (
"doEB" ) ) ,
135 m_doEE ( params.getParameter<
bool> (
"doEE" ) ) ,
136 m_doES ( params.getParameter<
bool> (
"doES" ) ) ,
175 const std::vector<double> ebCorMatG12 = params.getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG12");
176 const std::vector<double> eeCorMatG12 = params.getParameter< std::vector<double> >(
"EECorrNoiseMatrixG12");
177 const std::vector<double> ebCorMatG06 = params.getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG06");
178 const std::vector<double> eeCorMatG06 = params.getParameter< std::vector<double> >(
"EECorrNoiseMatrixG06");
179 const std::vector<double> ebCorMatG01 = params.getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG01");
180 const std::vector<double> eeCorMatG01 = params.getParameter< std::vector<double> >(
"EECorrNoiseMatrixG01");
183 const double rmsConstantTerm = params.getParameter<
double> (
"ConstantTerm");
185 const bool addNoise = params.getParameter<
bool> (
"doENoise");
186 const bool cosmicsPhase = params.getParameter<
bool> (
"cosmicsPhase");
187 const double cosmicsShift = params.getParameter<
double> (
"cosmicsShift");
208 assert( 1.
e-7 > fabs( ebCorMatG12[0] - 1.0 ) ) ;
209 assert( 1.
e-7 > fabs( ebCorMatG06[0] - 1.0 ) ) ;
210 assert( 1.
e-7 > fabs( ebCorMatG01[0] - 1.0 ) ) ;
211 assert( 1.
e-7 > fabs( eeCorMatG12[0] - 1.0 ) ) ;
212 assert( 1.
e-7 > fabs( eeCorMatG06[0] - 1.0 ) ) ;
213 assert( 1.
e-7 > fabs( eeCorMatG01[0] - 1.0 ) ) ;
217 assert( 0 == row || 1. >= ebCorMatG12[row] ) ;
218 assert( 0 == row || 1. >= ebCorMatG06[row] ) ;
219 assert( 0 == row || 1. >= ebCorMatG01[row] ) ;
220 assert( 0 == row || 1. >= eeCorMatG12[row] ) ;
221 assert( 0 == row || 1. >= eeCorMatG06[row] ) ;
222 assert( 0 == row || 1. >= eeCorMatG01[row] ) ;
223 for (
unsigned int column ( 0 ) ; column <= row ; ++column )
225 const unsigned int index ( row - column ) ;
226 ebMatrix[0]( row, column ) = ebCorMatG12[ index ] ;
227 eeMatrix[0]( row, column ) = eeCorMatG12[ index ] ;
228 ebMatrix[1]( row, column ) = ebCorMatG06[ index ] ;
229 eeMatrix[1]( row, column ) = eeCorMatG06[ index ] ;
230 ebMatrix[2]( row, column ) = ebCorMatG01[ index ] ;
231 eeMatrix[2]( row, column ) = eeCorMatG01[ index ] ;
397 std::unique_ptr<ESDigiCollection> preshowerResult(
new ESDigiCollection() ) ;
405 edm::LogInfo(
"DigiInfo") <<
"EB Digis: " << barrelResult->size() ;
409 edm::LogInfo(
"DigiInfo") <<
"APD Digis: " << apdResult->size() ;
415 edm::LogInfo(
"EcalDigi") <<
"EE Digis: " << endcapResult->size() ;
424 edm::LogInfo(
"EcalDigi") <<
"ES Digis: " << preshowerResult->size();
446 "RandomNumberGenerator service is not available.\n" 447 "You must add the service in the configuration file\n" 448 "or remove the module that requires it.";
467 m_Coder->setPedestals( pedestals ) ;
475 m_Coder->setIntercalibConstants( ical ) ;
507 double theGains[
m_Coder->NGAINS+1];
511 theGains[1] = theGains[2]*(defaultRatios->
gain12Over6()) ;
513 LogDebug(
"EcalDigi") <<
" Gains: " <<
"\n" <<
" g1 = " << theGains[1]
514 <<
"\n" <<
" g2 = " << theGains[2]
515 <<
"\n" <<
" g3 = " << theGains[3] ;
517 delete defaultRatios;
519 const double EBscale (
524 <<
"\n" <<
" saturation for EB = " << EBscale
527 const double EEscale (
532 <<
"\n" <<
" saturation for EB = " << EEscale
535 m_Coder->setFullScaleEnergy( EBscale ,
558 const int ESGain ( 1.1 > esgain->getESGain() ? 1 : 2 ) ;
559 const double ESMIPToGeV ( ( 1 ==
ESGain ) ?
560 esMipToGeV->getESValueLow() :
561 esMipToGeV->getESValueHigh() ) ;
617 const std::vector<DetId>* theESDets (
624 nullptr != theESDets )
630 nullptr != theESDets )
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
std::unique_ptr< EcalCoder > m_APDCoder
int bunchCrossing() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::unique_ptr< EcalElectronicsSim > m_ElectronicsSim
EcalDigiProducer(const edm::ParameterSet ¶ms, edm::ProducerBase &mixMod, edm::ConsumesCollector &iC)
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
const APDShape m_APDShape
LuminosityBlockIndex index() const
const std::string m_ESdigiCollection
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
void setGain(const int gain)
std::unique_ptr< EBHitResponse > m_APDResponse
const std::string m_hitsProducerTag
std::unique_ptr< EcalCoder > m_Coder
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
def setup(process, global_tag, zero_tesla=False)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
const std::string m_EEdigiCollection
std::unique_ptr< ESHitResponse > m_ESResponse
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
const unsigned int m_readoutFrameSize
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Creates electronics signals from hits.
const double m_EBs25notCont
std::unique_ptr< CaloHitResponse > m_ESOldResponse
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
unsigned long long TimeValue_t
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const CaloGeometry * m_Geometry
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
void checkGeometry(const edm::EventSetup &eventSetup)
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
CLHEP::HepRandomEngine * randomEngine_
T const * product() const
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
std::unique_ptr< EEHitResponse > m_EEResponse
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
float gain12Over6() const
const bool m_apdSeparateDigi
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
const std::string m_apdDigiTag
std::unique_ptr< EBHitResponse > m_EBResponse
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
std::unique_ptr< EcalElectronicsSim > m_APDElectronicsSim
~EcalDigiProducer() override
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
T const * product() const
std::unique_ptr< EBDigitizer > m_APDDigitizer
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
T get(const Candidate &c)
const double m_EEs25notCont
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters