CMS 3D CMS Logo

EcalDigiProducer.cc
Go to the documentation of this file.
14 //#include "SimCalorimetry/EcalSimAlgos/interface/ESFastTDigitizer.h"
45 
55 
56 
58  EcalDigiProducer(params, iC)
59 {
61 
65 }
66 
67 // version for Pre-Mixing, for use outside of MixingModule
70  m_APDShape ( params.getParameter<double>( "apdShapeTstart" ) ,
71  params.getParameter<double>( "apdShapeTau" ) ) ,
72  m_EBShape ( ) ,
73  m_EEShape ( ) ,
74  m_ESShape ( ) ,
75  m_EBdigiCollection ( params.getParameter<std::string>("EBdigiCollection") ) ,
76  m_EEdigiCollection ( params.getParameter<std::string>("EEdigiCollection") ) ,
77  m_ESdigiCollection ( params.getParameter<std::string>("ESdigiCollection") ) ,
78  m_hitsProducerTag ( params.getParameter<std::string>("hitsProducer" ) ) ,
79  m_useLCcorrection ( params.getUntrackedParameter<bool>("UseLCcorrection") ) ,
80  m_apdSeparateDigi ( params.getParameter<bool> ("apdSeparateDigi") ) ,
81 
82  m_EBs25notCont ( params.getParameter<double> ("EBs25notContainment") ) ,
83  m_EEs25notCont ( params.getParameter<double> ("EEs25notContainment") ) ,
84 
85  m_readoutFrameSize ( params.getParameter<int> ("readoutFrameSize") ) ,
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") ) ) ,
97 
98  m_apdDigiTag ( params.getParameter<std::string> ("apdDigiTag" ) ) ,
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" ) ,
107  m_apdDigiTag ,
108  params.getParameter<std::vector<double> > ( "apdNonlParms" ) ) ) ,
109 
112  &m_EBShape ,
113  true ,
114  m_apdParameters.get() ,
115  &m_APDShape ) ) ,
116 
118  &m_EBShape ,
119  false , // barrel
120  m_apdParameters.get() ,
121  &m_APDShape ) ) ,
122 
124  &m_EEShape ) ) ,
127 
128  m_addESNoise ( params.getParameter<bool> ("doESNoise") ) ,
129  m_PreMix1 ( params.getParameter<bool> ("EcalPreMixStage1") ) ,
130  m_PreMix2 ( params.getParameter<bool> ("EcalPreMixStage2") ) ,
131 
132  m_doFastES ( params.getParameter<bool> ("doFast" ) ) ,
133 
134  m_doEB ( params.getParameter<bool> ("doEB" ) ) ,
135  m_doEE ( params.getParameter<bool> ("doEE" ) ) ,
136  m_doES ( params.getParameter<bool> ("doES" ) ) ,
137 
139  new ESElectronicsSim( m_addESNoise ) ) ,
140 
144  m_addESNoise ) ) ,
145 
148  m_PreMix1 ) ) ,
149 
151  new ESDigitizer( m_ESResponse.get() ,
153  m_addESNoise ) ) ,
154 
155  m_APDDigitizer ( nullptr ) ,
159  m_Coder ( nullptr ) ,
161  m_APDCoder ( nullptr ) ,
162  m_Geometry ( nullptr ) ,
163  m_EBCorrNoise ( { {nullptr, nullptr, nullptr} } ) ,
164  m_EECorrNoise ( { {nullptr, nullptr, nullptr} } )
165 {
166  // "produces" statements taken care of elsewhere.
167  // if(m_apdSeparateDigi) mixMod.produces<EBDigiCollection>(m_apdDigiTag);
168  // mixMod.produces<EBDigiCollection>(m_EBdigiCollection);
169  // mixMod.produces<EEDigiCollection>(m_EEdigiCollection);
170  // mixMod.produces<ESDigiCollection>(m_ESdigiCollection);
171  if ( m_doEB ) iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"));
172  if ( m_doEE ) iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"));
173  if ( m_doES ) iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsES"));
174 
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");
181 
182  const bool applyConstantTerm = params.getParameter<bool> ("applyConstantTerm");
183  const double rmsConstantTerm = params.getParameter<double> ("ConstantTerm");
184 
185  const bool addNoise = params.getParameter<bool> ("doENoise");
186  const bool cosmicsPhase = params.getParameter<bool> ("cosmicsPhase");
187  const double cosmicsShift = params.getParameter<double> ("cosmicsShift");
188 
189 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
190 
191  // further phase for cosmics studies
192  if( cosmicsPhase )
193  {
194  if( m_doEB ) m_EBResponse->setPhaseShift( 1. + cosmicsShift ) ;
195  if( m_doEE ) m_EEResponse->setPhaseShift( 1. + cosmicsShift ) ;
196  }
197 
198  EcalCorrMatrix ebMatrix[ 3 ] ;
199  EcalCorrMatrix eeMatrix[ 3 ] ;
200 
201  assert( ebCorMatG12.size() == m_readoutFrameSize ) ;
202  assert( eeCorMatG12.size() == m_readoutFrameSize ) ;
203  assert( ebCorMatG06.size() == m_readoutFrameSize ) ;
204  assert( eeCorMatG06.size() == m_readoutFrameSize ) ;
205  assert( ebCorMatG01.size() == m_readoutFrameSize ) ;
206  assert( eeCorMatG01.size() == m_readoutFrameSize ) ;
207 
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 ) ) ;
214 
215  for ( unsigned int row ( 0 ) ; row != m_readoutFrameSize ; ++row )
216  {
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 )
224  {
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 ] ;
232  }
233  }
234 
235  m_EBCorrNoise[0].reset( new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[0] ) );
236  m_EECorrNoise[0].reset( new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[0] ) );
237  m_EBCorrNoise[1].reset( new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[1] ) );
238  m_EECorrNoise[1].reset( new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[1] ) );
239  m_EBCorrNoise[2].reset( new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[2] ) );
240  m_EECorrNoise[2].reset( new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[2] ) );
241 
242  m_Coder.reset( new EcalCoder( addNoise ,
243  m_PreMix1 ,
244  m_EBCorrNoise[0].get() ,
245  m_EECorrNoise[0].get() ,
246  m_EBCorrNoise[1].get() ,
247  m_EECorrNoise[1].get() ,
248  m_EBCorrNoise[2].get() ,
249  m_EECorrNoise[2].get() ) );
250 
252  m_Coder.get() ,
254  rmsConstantTerm ) );
255 
256  if( m_apdSeparateDigi )
257  {
258  m_APDCoder.reset( new EcalCoder( false ,
259  m_PreMix1 ,
260  m_EBCorrNoise[0].get() ,
261  m_EECorrNoise[0].get() ,
262  m_EBCorrNoise[1].get() ,
263  m_EECorrNoise[1].get() ,
264  m_EBCorrNoise[2].get() ,
265  m_EECorrNoise[2].get() ) );
266 
268  m_APDCoder.get() ,
270  rmsConstantTerm ) );
271 
272  m_APDDigitizer.reset( new EBDigitizer( m_APDResponse.get() ,
273  m_APDElectronicsSim.get() ,
274  false ) );
275  }
276 
277  if( m_doEB ) {
278  m_BarrelDigitizer.reset( new EBDigitizer( m_EBResponse.get() ,
279  m_ElectronicsSim.get() ,
280  addNoise ) );
281  }
282 
283  if( m_doEE ) {
284  m_EndcapDigitizer.reset( new EEDigitizer( m_EEResponse.get() ,
285  m_ElectronicsSim.get() ,
286  addNoise ) );
287  }
288 }
289 
290 
292 {}
293 
294 void
297  randomEngine_ = &rng->getEngine(event.streamID());
298 
299  checkGeometry( eventSetup );
300  checkCalibrations( event, eventSetup );
301  if( m_doEB ) {
302  m_BarrelDigitizer->initializeHits();
303  if(m_apdSeparateDigi) {
304  m_APDDigitizer->initializeHits();
305  }
306  }
307  if( m_doEE ) {
308  m_EndcapDigitizer->initializeHits();
309  }
310  if( m_doES ) {
311  if(m_doFastES) {
312  m_ESDigitizer->initializeHits();
313  } else {
314  m_ESOldDigitizer->initializeHits();
315  }
316  }
317 }
318 
319 void
320 EcalDigiProducer::accumulateCaloHits(HitsHandle const& ebHandle, HitsHandle const& eeHandle, HitsHandle const& esHandle, int bunchCrossing) {
321  if(m_doEB && ebHandle.isValid()) {
322  m_BarrelDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
323 
324  if(m_apdSeparateDigi) {
325  m_APDDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
326  }
327  }
328 
329  if(m_doEE && eeHandle.isValid()) {
330  m_EndcapDigitizer->add(*eeHandle.product(), bunchCrossing, randomEngine_);
331  }
332 
333  if(m_doES && esHandle.isValid()) {
334  if(m_doFastES) {
335  m_ESDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
336  } else {
337  m_ESOldDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
338  }
339  }
340 }
341 
342 void
344  // Step A: Get Inputs
346  if(m_doEB) {
347  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
348  e.getByLabel(ebTag, ebHandle);
349  }
350 
352  if(m_doEE) {
353  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
354  e.getByLabel(eeTag, eeHandle);
355  }
356 
358  if(m_doES) {
359  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
360  e.getByLabel(esTag, esHandle);
361  }
362 
363  accumulateCaloHits(ebHandle, eeHandle, esHandle, 0);
364 }
365 
366 void
368  // Step A: Get Inputs
370  if(m_doEB) {
371  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
372  e.getByLabel(ebTag, ebHandle);
373  }
374 
376  if(m_doEE) {
377  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
378  e.getByLabel(eeTag, eeHandle);
379  }
380 
382  if(m_doES) {
383  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
384  e.getByLabel(esTag, esHandle);
385  }
386 
387  accumulateCaloHits(ebHandle, eeHandle, esHandle, e.bunchCrossing());
388 }
389 
390 void
392  // Step B: Create empty output
393  std::unique_ptr<EBDigiCollection> apdResult ( !m_apdSeparateDigi || !m_doEB ? nullptr :
394  new EBDigiCollection() ) ;
395  std::unique_ptr<EBDigiCollection> barrelResult ( new EBDigiCollection() ) ;
396  std::unique_ptr<EEDigiCollection> endcapResult ( new EEDigiCollection() ) ;
397  std::unique_ptr<ESDigiCollection> preshowerResult( new ESDigiCollection() ) ;
398 
399  // run the algorithm
400 
401  if( m_doEB ) {
402  m_BarrelDigitizer->run( *barrelResult, randomEngine_ ) ;
403  cacheEBDigis( &*barrelResult ) ;
404 
405  edm::LogInfo("DigiInfo") << "EB Digis: " << barrelResult->size() ;
406 
407  if( m_apdSeparateDigi ) {
408  m_APDDigitizer->run( *apdResult, randomEngine_ ) ;
409  edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size() ;
410  }
411  }
412 
413  if( m_doEE ) {
414  m_EndcapDigitizer->run( *endcapResult, randomEngine_ ) ;
415  edm::LogInfo("EcalDigi") << "EE Digis: " << endcapResult->size() ;
416  cacheEEDigis( &*endcapResult ) ;
417  }
418  if( m_doES ) {
419  if(m_doFastES) {
420  m_ESDigitizer->run( *preshowerResult, randomEngine_ ) ;
421  } else {
422  m_ESOldDigitizer->run( *preshowerResult, randomEngine_ ) ;
423  }
424  edm::LogInfo("EcalDigi") << "ES Digis: " << preshowerResult->size();
425  }
426 
427 
428  // Step D: Put outputs into event
429  if( m_apdSeparateDigi ) {
430  //event.put(std::move(apdResult), m_apdDigiTag ) ;
431  }
432 
433  event.put(std::move(barrelResult), m_EBdigiCollection ) ;
434  event.put(std::move(endcapResult), m_EEdigiCollection ) ;
435  event.put(std::move(preshowerResult), m_ESdigiCollection ) ;
436 
437  randomEngine_ = nullptr; // to prevent access outside event
438 }
439 
440 void
442 {
444  if ( ! rng.isAvailable() ) {
445  throw cms::Exception("Configuration") <<
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.";
449  }
450  CLHEP::HepRandomEngine* engine = &rng->getEngine(lumi.index());
451 
452  if( m_doEB ) {
453  if( nullptr != m_APDResponse ) m_APDResponse->initialize(engine);
454  m_EBResponse->initialize(engine);
455  }
456 }
457 
458 void
460 {
461  // Pedestals from event setup
462 
464  eventSetup.get<EcalPedestalsRcd>().get( dbPed ) ;
465  const EcalPedestals* pedestals ( dbPed.product() ) ;
466 
467  m_Coder->setPedestals( pedestals ) ;
468  if( nullptr != m_APDCoder ) m_APDCoder->setPedestals( pedestals ) ;
469 
470  // Ecal Intercalibration Constants
472  eventSetup.get<EcalIntercalibConstantsMCRcd>().get( pIcal ) ;
473  const EcalIntercalibConstantsMC* ical ( pIcal.product() ) ;
474 
475  m_Coder->setIntercalibConstants( ical ) ;
476  if( nullptr != m_APDCoder) m_APDCoder->setIntercalibConstants( ical ) ;
477 
478  m_EBResponse->setIntercal( ical ) ;
479  if( nullptr != m_APDResponse ) m_APDResponse->setIntercal( ical ) ;
480 
481  // Ecal LaserCorrection Constants
483  eventSetup.get<EcalLaserDbRecord>().get(laser);
484  const edm::TimeValue_t eventTimeValue = event.time().value();
485 
486  m_EBResponse->setEventTime(eventTimeValue);
487  m_EBResponse->setLaserConstants(laser.product(), m_useLCcorrection);
488 
489  m_EEResponse->setEventTime(eventTimeValue);
490  m_EEResponse->setLaserConstants(laser.product(), m_useLCcorrection);
491 
492  // ADC -> GeV Scale
494  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
495  const EcalADCToGeVConstant* agc = pAgc.product();
496 
497  // Gain Ratios
499  eventSetup.get<EcalGainRatiosRcd>().get(pRatio);
500  const EcalGainRatios* gr = pRatio.product();
501 
502  m_Coder->setGainRatios( gr );
503  if( nullptr != m_APDCoder) m_APDCoder->setGainRatios( gr );
504 
505  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
506 
507  double theGains[m_Coder->NGAINS+1];
508  theGains[0] = 0.;
509  theGains[3] = 1.;
510  theGains[2] = defaultRatios->gain6Over1() ;
511  theGains[1] = theGains[2]*(defaultRatios->gain12Over6()) ;
512 
513  LogDebug("EcalDigi") << " Gains: " << "\n" << " g1 = " << theGains[1]
514  << "\n" << " g2 = " << theGains[2]
515  << "\n" << " g3 = " << theGains[3] ;
516 
517  delete defaultRatios;
518 
519  const double EBscale (
520  ( agc->getEBValue())*theGains[1]*(m_Coder->MAXADC)*m_EBs25notCont ) ;
521 
522  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEBValue()
523  << "\n" << " notCont = " << m_EBs25notCont
524  << "\n" << " saturation for EB = " << EBscale
525  << ", " << m_EBs25notCont ;
526 
527  const double EEscale (
528  (agc->getEEValue())*theGains[1]*(m_Coder->MAXADC)*m_EEs25notCont ) ;
529 
530  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEEValue()
531  << "\n" << " notCont = " << m_EEs25notCont
532  << "\n" << " saturation for EB = " << EEscale
533  << ", " << m_EEs25notCont ;
534 
535  m_Coder->setFullScaleEnergy( EBscale ,
536  EEscale ) ;
537  if( nullptr != m_APDCoder ) m_APDCoder->setFullScaleEnergy( EBscale ,
538  EEscale ) ;
539 
540  if( nullptr != m_ESOldDigitizer ||
541  nullptr != m_ESDigitizer )
542  {
543  // ES condition objects
544  edm::ESHandle<ESGain> hesgain ;
546  edm::ESHandle<ESPedestals> hesPedestals ;
548 
549  eventSetup.get<ESGainRcd>(). get( hesgain ) ;
550  eventSetup.get<ESMIPToGeVConstantRcd>(). get( hesMIPToGeV ) ;
551  eventSetup.get<ESPedestalsRcd>(). get( hesPedestals ) ;
552  eventSetup.get<ESIntercalibConstantsRcd>().get( hesMIPs ) ;
553 
554  const ESGain* esgain ( hesgain.product() ) ;
555  const ESPedestals* espeds ( hesPedestals.product() ) ;
556  const ESIntercalibConstants* esmips ( hesMIPs.product() ) ;
557  const ESMIPToGeVConstant* esMipToGeV ( hesMIPToGeV.product() ) ;
558  const int ESGain ( 1.1 > esgain->getESGain() ? 1 : 2 ) ;
559  const double ESMIPToGeV ( ( 1 == ESGain ) ?
560  esMipToGeV->getESValueLow() :
561  esMipToGeV->getESValueHigh() ) ;
562 
563  if( m_doES ) {
565  if( !m_doFastES )
566  {
567  m_ESElectronicsSim->setGain( ESGain ) ;
568  m_ESElectronicsSim->setPedestals( espeds ) ;
569  m_ESElectronicsSim->setMIPs( esmips ) ;
570  m_ESElectronicsSim->setMIPToGeV( ESMIPToGeV ) ;
571  }
572  else
573  {
574  m_ESDigitizer->setGain( ESGain ) ;
575  m_ESElectronicsSimFast->setPedestals( espeds ) ;
576  m_ESElectronicsSimFast->setMIPs( esmips ) ;
577  m_ESElectronicsSimFast->setMIPToGeV( ESMIPToGeV ) ;
578  }
579  }
580  }
581 }
582 
583 void
585 {
586  // TODO find a way to avoid doing this every event
587  edm::ESHandle<CaloGeometry> hGeometry ;
588  eventSetup.get<CaloGeometryRecord>().get( hGeometry ) ;
589 
590  const CaloGeometry* pGeometry = &*hGeometry;
591 
592  if( pGeometry != m_Geometry )
593  {
594  m_Geometry = pGeometry;
595  updateGeometry();
596  }
597 }
598 
599 void
601 {
602  if( m_doEB ) {
603  if( nullptr != m_APDResponse ) m_APDResponse->setGeometry(
605  m_EBResponse->setGeometry(
607  }
608  if( m_doEE ) {
609  m_EEResponse->setGeometry(
611  }
612  if( m_doES ) {
613  m_ESResponse->setGeometry(
615  m_ESOldResponse->setGeometry( m_Geometry ) ;
616 
617  const std::vector<DetId>* theESDets (
620 
621  if( !m_doFastES )
622  {
623  if( nullptr != m_ESOldDigitizer &&
624  nullptr != theESDets )
625  m_ESOldDigitizer->setDetIds( *theESDets ) ;
626  }
627  else
628  {
629  if( nullptr != m_ESDigitizer &&
630  nullptr != theESDets )
631  m_ESDigitizer->setDetIds( *theESDets ) ;
632  }
633  }
634 }
635 
637  //noiseGenerator->setParameterMap(theParameterMap);
638  if(nullptr != m_BarrelDigitizer) m_BarrelDigitizer->setNoiseSignalGenerator(noiseGenerator);
639 }
640 
642  //noiseGenerator->setParameterMap(theParameterMap);
643  if(nullptr != m_EndcapDigitizer) m_EndcapDigitizer->setNoiseSignalGenerator(noiseGenerator);
644 }
645 
647  //noiseGenerator->setParameterMap(theParameterMap);
648  if(nullptr != m_ESDigitizer) m_ESDigitizer->setNoiseSignalGenerator(noiseGenerator);
649 }
650 
651 
#define LogDebug(id)
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
std::unique_ptr< EcalCoder > m_APDCoder
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
std::unique_ptr< EcalElectronicsSim > m_ElectronicsSim
adds noise to the given frame.
Definition: EcalCoder.h:11
EcalDigiProducer(const edm::ParameterSet &params, 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
Definition: ESGain.h:7
void setGain(const int gain)
Definition: ESShape.h:26
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)
Definition: GeneralSetup.py:1
#define nullptr
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)
const bool m_addESNoise
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
bool isAvailable() const
Definition: Service.h:46
std::unique_ptr< CaloHitResponse > m_ESOldResponse
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
float gain6Over1() const
math::ErrorD< CaloSamples::MAXSAMPLES >::type EcalCorrMatrix
bool isValid() const
Definition: HandleBase.h:74
unsigned long long TimeValue_t
Definition: Timestamp.h:28
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:535
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
Definition: Handle.h:81
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
T get() const
Definition: EventSetup.h:63
StreamID streamID() const
Definition: Event.h:96
const std::string m_apdDigiTag
std::unique_ptr< EBHitResponse > m_EBResponse
const EEShape m_EEShape
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
std::unique_ptr< EcalElectronicsSim > m_APDElectronicsSim
~EcalDigiProducer() override
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const EBShape m_EBShape
const std::string m_EBdigiCollection
T const * product() const
Definition: ESHandle.h:86
std::unique_ptr< EBDigitizer > m_APDDigitizer
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
def move(src, dest)
Definition: eostools.py:510
T get(const Candidate &c)
Definition: component.h:55
const double m_EEs25notCont
Definition: event.py:1
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters