CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
EcalDigiProducer Class Reference

#include <EcalDigiProducer.h>

Inheritance diagram for EcalDigiProducer:
DigiAccumulatorMixMod EcalTBDigiProducer

Public Member Functions

virtual void accumulate (edm::Event const &e, edm::EventSetup const &c)
 
virtual void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c)
 
 EcalDigiProducer (const edm::ParameterSet &params, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
 
 EcalDigiProducer (const edm::ParameterSet &params, edm::ConsumesCollector &iC)
 
virtual void finalizeEvent (edm::Event &e, edm::EventSetup const &c)
 
virtual void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
void setEBNoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
void setEENoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
void setESNoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
virtual ~EcalDigiProducer ()
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual ~DigiAccumulatorMixMod ()
 

Protected Attributes

EBHitResponsem_EBResponse
 
EEHitResponsem_EEResponse
 
const EcalSimParameterMapm_ParameterMap
 

Private Types

typedef edm::Handle
< std::vector< PCaloHit > > 
HitsHandle
 

Private Member Functions

void accumulateCaloHits (HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
 
virtual void cacheEBDigis (const EBDigiCollection *ebDigiPtr) const
 
virtual void cacheEEDigis (const EEDigiCollection *eeDigiPtr) const
 
void checkCalibrations (const edm::Event &event, const edm::EventSetup &eventSetup)
 
void checkGeometry (const edm::EventSetup &eventSetup)
 
void updateGeometry ()
 

Private Attributes

const bool m_addESNoise
 
EcalCoderm_APDCoder
 
const std::string m_apdDigiTag
 
EBDigitizerm_APDDigitizer
 
EcalElectronicsSimm_APDElectronicsSim
 
const APDSimParametersm_apdParameters
 
EBHitResponsem_APDResponse
 
const bool m_apdSeparateDigi
 
const APDShape m_APDShape
 
EBDigitizerm_BarrelDigitizer
 
EcalCoderm_Coder
 
const bool m_doFastES
 
CorrelatedNoisifier
< EcalCorrMatrix > * 
m_EBCorrNoise [3]
 
const std::string m_EBdigiCollection
 
const double m_EBs25notCont
 
const EBShape m_EBShape
 
CorrelatedNoisifier
< EcalCorrMatrix > * 
m_EECorrNoise [3]
 
const std::string m_EEdigiCollection
 
const double m_EEs25notCont
 
const EEShape m_EEShape
 
EcalElectronicsSimm_ElectronicsSim
 
EEDigitizerm_EndcapDigitizer
 
const std::string m_ESdigiCollection
 
ESDigitizerm_ESDigitizer
 
ESElectronicsSimm_ESElectronicsSim
 
ESElectronicsSimFastm_ESElectronicsSimFast
 
ESOldDigitizerm_ESOldDigitizer
 
CaloHitResponsem_ESOldResponse
 
ESHitResponsem_ESResponse
 
ESShape m_ESShape
 
const CaloGeometrym_Geometry
 
const std::string m_hitsProducerTag
 
const bool m_PreMix1
 
const bool m_PreMix2
 
const unsigned int m_readoutFrameSize
 
bool m_useLCcorrection
 

Detailed Description

Definition at line 55 of file EcalDigiProducer.h.

Member Typedef Documentation

typedef edm::Handle<std::vector<PCaloHit> > EcalDigiProducer::HitsHandle
private

Definition at line 76 of file EcalDigiProducer.h.

Constructor & Destructor Documentation

EcalDigiProducer::EcalDigiProducer ( const edm::ParameterSet params,
edm::one::EDProducerBase mixMod,
edm::ConsumesCollector iC 
)

Definition at line 52 of file EcalDigiProducer.cc.

References column, edm::ConsumesCollector::consumes(), alignCSCRings::e, edm::ParameterSet::getParameter(), getHLTprescales::index, m_APDCoder, m_apdDigiTag, m_APDDigitizer, m_APDElectronicsSim, m_APDResponse, m_apdSeparateDigi, m_BarrelDigitizer, m_Coder, m_EBCorrNoise, m_EBdigiCollection, m_EBResponse, m_EECorrNoise, m_EEdigiCollection, m_EEResponse, m_ElectronicsSim, m_EndcapDigitizer, m_ESdigiCollection, m_hitsProducerTag, m_ParameterMap, m_PreMix1, m_readoutFrameSize, and EcalHitResponse::setPhaseShift().

52  :
54  m_APDShape ( params.getParameter<double>( "apdShapeTstart" ) ,
55  params.getParameter<double>( "apdShapeTau" ) ) ,
56  m_EBShape ( ) ,
57  m_EEShape ( ) ,
58  m_ESShape ( ) ,
59  m_EBdigiCollection ( params.getParameter<std::string>("EBdigiCollection") ) ,
60  m_EEdigiCollection ( params.getParameter<std::string>("EEdigiCollection") ) ,
61  m_ESdigiCollection ( params.getParameter<std::string>("ESdigiCollection") ) ,
62  m_hitsProducerTag ( params.getParameter<std::string>("hitsProducer" ) ) ,
63  m_useLCcorrection ( params.getUntrackedParameter<bool>("UseLCcorrection") ) ,
64  m_apdSeparateDigi ( params.getParameter<bool> ("apdSeparateDigi") ) ,
65 
66  m_EBs25notCont ( params.getParameter<double> ("EBs25notContainment") ) ,
67  m_EEs25notCont ( params.getParameter<double> ("EEs25notContainment") ) ,
68 
69  m_readoutFrameSize ( params.getParameter<int> ("readoutFrameSize") ) ,
71  params.getParameter<double> ("simHitToPhotoelectronsBarrel") ,
72  params.getParameter<double> ("simHitToPhotoelectronsEndcap") ,
73  params.getParameter<double> ("photoelectronsToAnalogBarrel") ,
74  params.getParameter<double> ("photoelectronsToAnalogEndcap") ,
75  params.getParameter<double> ("samplingFactor") ,
76  params.getParameter<double> ("timePhase") ,
78  params.getParameter<int> ("binOfMaximum") ,
79  params.getParameter<bool> ("doPhotostatistics") ,
80  params.getParameter<bool> ("syncPhase") ) ) ,
81 
82  m_apdDigiTag ( params.getParameter<std::string> ("apdDigiTag" ) ) ,
84  params.getParameter<bool> ("apdAddToBarrel" ) ,
86  params.getParameter<double> ("apdSimToPELow" ) ,
87  params.getParameter<double> ("apdSimToPEHigh" ) ,
88  params.getParameter<double> ("apdTimeOffset" ) ,
89  params.getParameter<double> ("apdTimeOffWidth" ) ,
90  params.getParameter<bool> ("apdDoPEStats" ) ,
91  m_apdDigiTag ,
92  params.getParameter<std::vector<double> > ( "apdNonlParms" ) ) ) ,
93 
96  &m_EBShape ,
97  true ,
99  &m_APDShape ) ) ,
100 
102  &m_EBShape ,
103  false , // barrel
105  &m_APDShape ) ) ,
106 
108  &m_EEShape ) ) ,
111 
112  m_addESNoise ( params.getParameter<bool> ("doESNoise") ) ,
113  m_PreMix1 ( params.getParameter<bool> ("EcalPreMixStage1") ) ,
114  m_PreMix2 ( params.getParameter<bool> ("EcalPreMixStage2") ) ,
115 
116  m_doFastES ( params.getParameter<bool> ("doFast" ) ) ,
117 
119  new ESElectronicsSim( m_addESNoise ) ) ,
120 
124  m_addESNoise ) ) ,
125 
128  m_PreMix1) ) ,
129 
130  m_ESDigitizer ( !m_doFastES ? 0 :
133  m_addESNoise ) ) ,
134 
135  m_APDDigitizer ( 0 ) ,
136  m_BarrelDigitizer ( 0 ) ,
137  m_EndcapDigitizer ( 0 ) ,
138  m_ElectronicsSim ( 0 ) ,
139  m_Coder ( 0 ) ,
140  m_APDElectronicsSim ( 0 ) ,
141  m_APDCoder ( 0 ) ,
142  m_Geometry ( 0 ) ,
143  m_EBCorrNoise ( ) ,
144  m_EECorrNoise ( )
145 {
146  if(m_apdSeparateDigi) mixMod.produces<EBDigiCollection>(m_apdDigiTag);
147  mixMod.produces<EBDigiCollection>(m_EBdigiCollection);
148  mixMod.produces<EEDigiCollection>(m_EEdigiCollection);
149  mixMod.produces<ESDigiCollection>(m_ESdigiCollection);
150  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"));
151  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"));
152  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsES"));
153 
154  const std::vector<double> ebCorMatG12 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG12");
155  const std::vector<double> eeCorMatG12 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG12");
156  const std::vector<double> ebCorMatG06 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG06");
157  const std::vector<double> eeCorMatG06 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG06");
158  const std::vector<double> ebCorMatG01 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG01");
159  const std::vector<double> eeCorMatG01 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG01");
160 
161  const bool applyConstantTerm = params.getParameter<bool> ("applyConstantTerm");
162  const double rmsConstantTerm = params.getParameter<double> ("ConstantTerm");
163 
164  const bool addNoise = params.getParameter<bool> ("doENoise");
165  const bool cosmicsPhase = params.getParameter<bool> ("cosmicsPhase");
166  const double cosmicsShift = params.getParameter<double> ("cosmicsShift");
167 
168 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
169 
170  // further phase for cosmics studies
171  if( cosmicsPhase )
172  {
173  m_EBResponse->setPhaseShift( 1. + cosmicsShift ) ;
174  m_EEResponse->setPhaseShift( 1. + cosmicsShift ) ;
175  }
176 
177  EcalCorrMatrix ebMatrix[ 3 ] ;
178  EcalCorrMatrix eeMatrix[ 3 ] ;
179 
180  assert( ebCorMatG12.size() == m_readoutFrameSize ) ;
181  assert( eeCorMatG12.size() == m_readoutFrameSize ) ;
182  assert( ebCorMatG06.size() == m_readoutFrameSize ) ;
183  assert( eeCorMatG06.size() == m_readoutFrameSize ) ;
184  assert( ebCorMatG01.size() == m_readoutFrameSize ) ;
185  assert( eeCorMatG01.size() == m_readoutFrameSize ) ;
186 
187  assert( 1.e-7 > fabs( ebCorMatG12[0] - 1.0 ) ) ;
188  assert( 1.e-7 > fabs( ebCorMatG06[0] - 1.0 ) ) ;
189  assert( 1.e-7 > fabs( ebCorMatG01[0] - 1.0 ) ) ;
190  assert( 1.e-7 > fabs( eeCorMatG12[0] - 1.0 ) ) ;
191  assert( 1.e-7 > fabs( eeCorMatG06[0] - 1.0 ) ) ;
192  assert( 1.e-7 > fabs( eeCorMatG01[0] - 1.0 ) ) ;
193 
194  for ( unsigned int row ( 0 ) ; row != m_readoutFrameSize ; ++row )
195  {
196  assert( 0 == row || 1. >= ebCorMatG12[row] ) ;
197  assert( 0 == row || 1. >= ebCorMatG06[row] ) ;
198  assert( 0 == row || 1. >= ebCorMatG01[row] ) ;
199  assert( 0 == row || 1. >= eeCorMatG12[row] ) ;
200  assert( 0 == row || 1. >= eeCorMatG06[row] ) ;
201  assert( 0 == row || 1. >= eeCorMatG01[row] ) ;
202  for ( unsigned int column ( 0 ) ; column <= row ; ++column )
203  {
204  const unsigned int index ( row - column ) ;
205  ebMatrix[0]( row, column ) = ebCorMatG12[ index ] ;
206  eeMatrix[0]( row, column ) = eeCorMatG12[ index ] ;
207  ebMatrix[1]( row, column ) = ebCorMatG06[ index ] ;
208  eeMatrix[1]( row, column ) = eeCorMatG06[ index ] ;
209  ebMatrix[2]( row, column ) = ebCorMatG01[ index ] ;
210  eeMatrix[2]( row, column ) = eeCorMatG01[ index ] ;
211  }
212  }
213 
214  m_EBCorrNoise[0] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[0] ) ;
215  m_EECorrNoise[0] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[0] ) ;
216  m_EBCorrNoise[1] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[1] ) ;
217  m_EECorrNoise[1] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[1] ) ;
218  m_EBCorrNoise[2] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[2] ) ;
219  m_EECorrNoise[2] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[2] ) ;
220 
221  m_Coder = new EcalCoder( addNoise ,
222  m_PreMix1 ,
223  m_EBCorrNoise[0] ,
224  m_EECorrNoise[0] ,
225  m_EBCorrNoise[1] ,
226  m_EECorrNoise[1] ,
227  m_EBCorrNoise[2] ,
228  m_EECorrNoise[2] ) ;
229 
231  m_Coder ,
232  applyConstantTerm ,
233  rmsConstantTerm ) ;
234 
235  if( m_apdSeparateDigi )
236  {
237  m_APDCoder = new EcalCoder( false ,
238  m_EBCorrNoise[0] ,
239  m_EECorrNoise[0] ,
240  m_EBCorrNoise[1] ,
241  m_EECorrNoise[1] ,
242  m_EBCorrNoise[2] ,
243  m_EECorrNoise[2] ) ;
244 
246  m_APDCoder ,
247  applyConstantTerm ,
248  rmsConstantTerm ) ;
249 
252  false ) ;
253  }
254 
257  addNoise ) ;
258 
261  addNoise ) ;
262 }
EEDigitizer * m_EndcapDigitizer
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CaloHitResponse * m_ESOldResponse
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
CorrelatedNoisifier< EcalCorrMatrix > * m_EBCorrNoise[3]
const APDShape m_APDShape
const std::string m_ESdigiCollection
const EcalSimParameterMap * m_ParameterMap
const std::string m_hitsProducerTag
ESOldDigitizer * m_ESOldDigitizer
const std::string m_EEdigiCollection
ESElectronicsSimFast * m_ESElectronicsSimFast
ESDigitizer * m_ESDigitizer
const APDSimParameters * m_apdParameters
const bool m_addESNoise
CorrelatedNoisifier< EcalCorrMatrix > * m_EECorrNoise[3]
const unsigned int m_readoutFrameSize
EcalElectronicsSim * m_ElectronicsSim
EBHitResponse * m_APDResponse
Creates electronics signals from hits.
const double m_EBs25notCont
EBHitResponse * m_EBResponse
void setPhaseShift(double phaseShift)
ESElectronicsSim * m_ESElectronicsSim
EBDigitizer * m_BarrelDigitizer
math::ErrorD< CaloSamples::MAXSAMPLES >::type EcalCorrMatrix
const CaloGeometry * m_Geometry
EcalCoder * m_APDCoder
ESHitResponse * m_ESResponse
#define column(...)
Definition: DbCore.h:74
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
const std::string m_apdDigiTag
const EEShape m_EEShape
const EBShape m_EBShape
const std::string m_EBdigiCollection
EcalElectronicsSim * m_APDElectronicsSim
const double m_EEs25notCont
EEHitResponse * m_EEResponse
EcalDigiProducer::EcalDigiProducer ( const edm::ParameterSet params,
edm::ConsumesCollector iC 
)

Definition at line 265 of file EcalDigiProducer.cc.

References column, edm::ConsumesCollector::consumes(), alignCSCRings::e, edm::ParameterSet::getParameter(), getHLTprescales::index, m_APDCoder, m_APDDigitizer, m_APDElectronicsSim, m_APDResponse, m_apdSeparateDigi, m_BarrelDigitizer, m_Coder, m_EBCorrNoise, m_EBResponse, m_EECorrNoise, m_EEResponse, m_ElectronicsSim, m_EndcapDigitizer, m_hitsProducerTag, m_ParameterMap, m_PreMix1, m_readoutFrameSize, and EcalHitResponse::setPhaseShift().

265  :
267  m_APDShape ( params.getParameter<double>( "apdShapeTstart" ) ,
268  params.getParameter<double>( "apdShapeTau" ) ) ,
269  m_EBShape ( ) ,
270  m_EEShape ( ) ,
271  m_ESShape ( ) ,
272  m_EBdigiCollection ( params.getParameter<std::string>("EBdigiCollection") ) ,
273  m_EEdigiCollection ( params.getParameter<std::string>("EEdigiCollection") ) ,
274  m_ESdigiCollection ( params.getParameter<std::string>("ESdigiCollection") ) ,
275  m_hitsProducerTag ( params.getParameter<std::string>("hitsProducer" ) ) ,
276  m_useLCcorrection ( params.getUntrackedParameter<bool>("UseLCcorrection") ) ,
277  m_apdSeparateDigi ( params.getParameter<bool> ("apdSeparateDigi") ) ,
278 
279  m_EBs25notCont ( params.getParameter<double> ("EBs25notContainment") ) ,
280  m_EEs25notCont ( params.getParameter<double> ("EEs25notContainment") ) ,
281 
282  m_readoutFrameSize ( params.getParameter<int> ("readoutFrameSize") ) ,
284  params.getParameter<double> ("simHitToPhotoelectronsBarrel") ,
285  params.getParameter<double> ("simHitToPhotoelectronsEndcap") ,
286  params.getParameter<double> ("photoelectronsToAnalogBarrel") ,
287  params.getParameter<double> ("photoelectronsToAnalogEndcap") ,
288  params.getParameter<double> ("samplingFactor") ,
289  params.getParameter<double> ("timePhase") ,
291  params.getParameter<int> ("binOfMaximum") ,
292  params.getParameter<bool> ("doPhotostatistics") ,
293  params.getParameter<bool> ("syncPhase") ) ) ,
294 
295  m_apdDigiTag ( params.getParameter<std::string> ("apdDigiTag" ) ) ,
297  params.getParameter<bool> ("apdAddToBarrel" ) ,
299  params.getParameter<double> ("apdSimToPELow" ) ,
300  params.getParameter<double> ("apdSimToPEHigh" ) ,
301  params.getParameter<double> ("apdTimeOffset" ) ,
302  params.getParameter<double> ("apdTimeOffWidth" ) ,
303  params.getParameter<bool> ("apdDoPEStats" ) ,
304  m_apdDigiTag ,
305  params.getParameter<std::vector<double> > ( "apdNonlParms" ) ) ) ,
306 
309  &m_EBShape ,
310  true ,
312  &m_APDShape ) ) ,
313 
315  &m_EBShape ,
316  false , // barrel
318  &m_APDShape ) ) ,
319 
321  &m_EEShape ) ) ,
324 
325  m_addESNoise ( params.getParameter<bool> ("doESNoise") ) ,
326  m_PreMix1 ( params.getParameter<bool> ("EcalPreMixStage1") ) ,
327  m_PreMix2 ( params.getParameter<bool> ("EcalPreMixStage2") ) ,
328 
329  m_doFastES ( params.getParameter<bool> ("doFast" ) ) ,
330 
332  new ESElectronicsSim( m_addESNoise ) ) ,
333 
337  m_addESNoise ) ) ,
338 
341  m_PreMix1 ) ) ,
342 
343  m_ESDigitizer ( !m_doFastES ? 0 :
346  m_addESNoise ) ) ,
347 
348  m_APDDigitizer ( 0 ) ,
349  m_BarrelDigitizer ( 0 ) ,
350  m_EndcapDigitizer ( 0 ) ,
351  m_ElectronicsSim ( 0 ) ,
352  m_Coder ( 0 ) ,
353  m_APDElectronicsSim ( 0 ) ,
354  m_APDCoder ( 0 ) ,
355  m_Geometry ( 0 ) ,
356  m_EBCorrNoise ( ) ,
357  m_EECorrNoise ( )
358 {
359  // "produces" statements taken care of elsewhere.
360  // if(m_apdSeparateDigi) mixMod.produces<EBDigiCollection>(m_apdDigiTag);
361  // mixMod.produces<EBDigiCollection>(m_EBdigiCollection);
362  // mixMod.produces<EEDigiCollection>(m_EEdigiCollection);
363  // mixMod.produces<ESDigiCollection>(m_ESdigiCollection);
364  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"));
365  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"));
366  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(m_hitsProducerTag, "EcalHitsES"));
367 
368  const std::vector<double> ebCorMatG12 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG12");
369  const std::vector<double> eeCorMatG12 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG12");
370  const std::vector<double> ebCorMatG06 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG06");
371  const std::vector<double> eeCorMatG06 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG06");
372  const std::vector<double> ebCorMatG01 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG01");
373  const std::vector<double> eeCorMatG01 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG01");
374 
375  const bool applyConstantTerm = params.getParameter<bool> ("applyConstantTerm");
376  const double rmsConstantTerm = params.getParameter<double> ("ConstantTerm");
377 
378  const bool addNoise = params.getParameter<bool> ("doNoise");
379  const bool cosmicsPhase = params.getParameter<bool> ("cosmicsPhase");
380  const double cosmicsShift = params.getParameter<double> ("cosmicsShift");
381 
382 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
383 
384  // further phase for cosmics studies
385  if( cosmicsPhase )
386  {
387  m_EBResponse->setPhaseShift( 1. + cosmicsShift ) ;
388  m_EEResponse->setPhaseShift( 1. + cosmicsShift ) ;
389  }
390 
391  EcalCorrMatrix ebMatrix[ 3 ] ;
392  EcalCorrMatrix eeMatrix[ 3 ] ;
393 
394  assert( ebCorMatG12.size() == m_readoutFrameSize ) ;
395  assert( eeCorMatG12.size() == m_readoutFrameSize ) ;
396  assert( ebCorMatG06.size() == m_readoutFrameSize ) ;
397  assert( eeCorMatG06.size() == m_readoutFrameSize ) ;
398  assert( ebCorMatG01.size() == m_readoutFrameSize ) ;
399  assert( eeCorMatG01.size() == m_readoutFrameSize ) ;
400 
401  assert( 1.e-7 > fabs( ebCorMatG12[0] - 1.0 ) ) ;
402  assert( 1.e-7 > fabs( ebCorMatG06[0] - 1.0 ) ) ;
403  assert( 1.e-7 > fabs( ebCorMatG01[0] - 1.0 ) ) ;
404  assert( 1.e-7 > fabs( eeCorMatG12[0] - 1.0 ) ) ;
405  assert( 1.e-7 > fabs( eeCorMatG06[0] - 1.0 ) ) ;
406  assert( 1.e-7 > fabs( eeCorMatG01[0] - 1.0 ) ) ;
407 
408  for ( unsigned int row ( 0 ) ; row != m_readoutFrameSize ; ++row )
409  {
410  assert( 0 == row || 1. >= ebCorMatG12[row] ) ;
411  assert( 0 == row || 1. >= ebCorMatG06[row] ) ;
412  assert( 0 == row || 1. >= ebCorMatG01[row] ) ;
413  assert( 0 == row || 1. >= eeCorMatG12[row] ) ;
414  assert( 0 == row || 1. >= eeCorMatG06[row] ) ;
415  assert( 0 == row || 1. >= eeCorMatG01[row] ) ;
416  for ( unsigned int column ( 0 ) ; column <= row ; ++column )
417  {
418  const unsigned int index ( row - column ) ;
419  ebMatrix[0]( row, column ) = ebCorMatG12[ index ] ;
420  eeMatrix[0]( row, column ) = eeCorMatG12[ index ] ;
421  ebMatrix[1]( row, column ) = ebCorMatG06[ index ] ;
422  eeMatrix[1]( row, column ) = eeCorMatG06[ index ] ;
423  ebMatrix[2]( row, column ) = ebCorMatG01[ index ] ;
424  eeMatrix[2]( row, column ) = eeCorMatG01[ index ] ;
425  }
426  }
427 
428  m_EBCorrNoise[0] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[0] ) ;
429  m_EECorrNoise[0] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[0] ) ;
430  m_EBCorrNoise[1] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[1] ) ;
431  m_EECorrNoise[1] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[1] ) ;
432  m_EBCorrNoise[2] = new CorrelatedNoisifier<EcalCorrMatrix>( ebMatrix[2] ) ;
433  m_EECorrNoise[2] = new CorrelatedNoisifier<EcalCorrMatrix>( eeMatrix[2] ) ;
434 
435  m_Coder = new EcalCoder( addNoise ,
436  m_PreMix1 ,
437  m_EBCorrNoise[0] ,
438  m_EECorrNoise[0] ,
439  m_EBCorrNoise[1] ,
440  m_EECorrNoise[1] ,
441  m_EBCorrNoise[2] ,
442  m_EECorrNoise[2] ) ;
443 
445  m_Coder ,
446  applyConstantTerm ,
447  rmsConstantTerm ) ;
448 
449  if( m_apdSeparateDigi )
450  {
451  m_APDCoder = new EcalCoder( false ,
452  m_EBCorrNoise[0] ,
453  m_EECorrNoise[0] ,
454  m_EBCorrNoise[1] ,
455  m_EECorrNoise[1] ,
456  m_EBCorrNoise[2] ,
457  m_EECorrNoise[2] ) ;
458 
460  m_APDCoder ,
461  applyConstantTerm ,
462  rmsConstantTerm ) ;
463 
466  false ) ;
467  }
468 
471  addNoise ) ;
472 
475  addNoise ) ;
476 }
EEDigitizer * m_EndcapDigitizer
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CaloHitResponse * m_ESOldResponse
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
CorrelatedNoisifier< EcalCorrMatrix > * m_EBCorrNoise[3]
const APDShape m_APDShape
const std::string m_ESdigiCollection
const EcalSimParameterMap * m_ParameterMap
const std::string m_hitsProducerTag
ESOldDigitizer * m_ESOldDigitizer
const std::string m_EEdigiCollection
ESElectronicsSimFast * m_ESElectronicsSimFast
ESDigitizer * m_ESDigitizer
const APDSimParameters * m_apdParameters
const bool m_addESNoise
CorrelatedNoisifier< EcalCorrMatrix > * m_EECorrNoise[3]
const unsigned int m_readoutFrameSize
EcalElectronicsSim * m_ElectronicsSim
EBHitResponse * m_APDResponse
Creates electronics signals from hits.
const double m_EBs25notCont
EBHitResponse * m_EBResponse
void setPhaseShift(double phaseShift)
ESElectronicsSim * m_ESElectronicsSim
EBDigitizer * m_BarrelDigitizer
math::ErrorD< CaloSamples::MAXSAMPLES >::type EcalCorrMatrix
const CaloGeometry * m_Geometry
EcalCoder * m_APDCoder
ESHitResponse * m_ESResponse
#define column(...)
Definition: DbCore.h:74
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
const std::string m_apdDigiTag
const EEShape m_EEShape
const EBShape m_EBShape
const std::string m_EBdigiCollection
EcalElectronicsSim * m_APDElectronicsSim
const double m_EEs25notCont
EEHitResponse * m_EEResponse
EcalDigiProducer::~EcalDigiProducer ( )
virtual

Definition at line 479 of file EcalDigiProducer.cc.

References m_APDCoder, m_APDDigitizer, m_APDElectronicsSim, m_apdParameters, m_APDResponse, m_BarrelDigitizer, m_Coder, m_EBCorrNoise, m_EBResponse, m_EECorrNoise, m_EEResponse, m_ElectronicsSim, m_EndcapDigitizer, m_ESDigitizer, m_ESElectronicsSim, m_ESElectronicsSimFast, m_ESOldDigitizer, m_ESOldResponse, m_ESResponse, and m_ParameterMap.

480 {
481  delete m_EndcapDigitizer ;
482  delete m_BarrelDigitizer ;
483  delete m_APDDigitizer ;
484  delete m_APDElectronicsSim ;
485  delete m_APDCoder ;
486  delete m_ElectronicsSim ;
487  delete m_Coder ;
488  delete m_EBCorrNoise[0] ;
489  delete m_EECorrNoise[0] ;
490  delete m_EBCorrNoise[1] ;
491  delete m_EECorrNoise[1] ;
492  delete m_EBCorrNoise[2] ;
493  delete m_EECorrNoise[2] ;
494 
495  delete m_ESDigitizer ;
496  delete m_ESElectronicsSimFast ;
497  delete m_ESOldDigitizer ;
498  delete m_ESElectronicsSim ;
499 
500  delete m_ESOldResponse ;
501  delete m_ESResponse ;
502  delete m_EEResponse ;
503  delete m_EBResponse ;
504  delete m_APDResponse ;
505 
506  delete m_apdParameters ;
507  delete m_ParameterMap ;
508 }
EEDigitizer * m_EndcapDigitizer
CaloHitResponse * m_ESOldResponse
CorrelatedNoisifier< EcalCorrMatrix > * m_EBCorrNoise[3]
const EcalSimParameterMap * m_ParameterMap
ESOldDigitizer * m_ESOldDigitizer
ESElectronicsSimFast * m_ESElectronicsSimFast
ESDigitizer * m_ESDigitizer
const APDSimParameters * m_apdParameters
CorrelatedNoisifier< EcalCorrMatrix > * m_EECorrNoise[3]
EcalElectronicsSim * m_ElectronicsSim
EBHitResponse * m_APDResponse
EBHitResponse * m_EBResponse
ESElectronicsSim * m_ESElectronicsSim
EBDigitizer * m_BarrelDigitizer
EcalCoder * m_APDCoder
ESHitResponse * m_ESResponse
EBDigitizer * m_APDDigitizer
EcalElectronicsSim * m_APDElectronicsSim
EEHitResponse * m_EEResponse

Member Function Documentation

void EcalDigiProducer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 550 of file EcalDigiProducer.cc.

References accumulateCaloHits(), edm::Event::getByLabel(), and m_hitsProducerTag.

Referenced by edm::DataMixingEcalDigiWorkerProd::addEcalSignals().

550  {
551  // Step A: Get Inputs
552  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
554  e.getByLabel(ebTag, ebHandle);
555 
556  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
558  e.getByLabel(eeTag, eeHandle);
559 
560  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
562  e.getByLabel(esTag, esHandle);
563 
564  accumulateCaloHits(ebHandle, eeHandle, esHandle, 0);
565 }
const std::string m_hitsProducerTag
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
void EcalDigiProducer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 568 of file EcalDigiProducer.cc.

References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), PileUpEventPrincipal::getByLabel(), and m_hitsProducerTag.

568  {
569  // Step A: Get Inputs
570  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
572  e.getByLabel(ebTag, ebHandle);
573 
574  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
576  e.getByLabel(eeTag, eeHandle);
577 
578  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
580  e.getByLabel(esTag, esHandle);
581 
582  accumulateCaloHits(ebHandle, eeHandle, esHandle, e.bunchCrossing());
583 }
const std::string m_hitsProducerTag
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
void EcalDigiProducer::accumulateCaloHits ( HitsHandle const &  ebHandle,
HitsHandle const &  eeHandle,
HitsHandle const &  esHandle,
int  bunchCrossing 
)
private

Definition at line 527 of file EcalDigiProducer.cc.

References EcalTDigitizer< Traits >::add(), CaloTDigitizer< Traits >::add(), edm::HandleBase::isValid(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_doFastES, m_EndcapDigitizer, m_ESDigitizer, m_ESOldDigitizer, and edm::Handle< T >::product().

Referenced by accumulate().

527  {
528  if(ebHandle.isValid()) {
529  m_BarrelDigitizer->add(*ebHandle.product(), bunchCrossing);
530 
531  if(m_apdSeparateDigi) {
532  m_APDDigitizer->add(*ebHandle.product(), bunchCrossing);
533  }
534  }
535 
536  if(eeHandle.isValid()) {
537  m_EndcapDigitizer->add(*eeHandle.product(), bunchCrossing);
538  }
539 
540  if(esHandle.isValid()) {
541  if(m_doFastES) {
542  m_ESDigitizer->add(*esHandle.product(), bunchCrossing);
543  } else {
544  m_ESOldDigitizer->add(*esHandle.product(), bunchCrossing);
545  }
546  }
547 }
EEDigitizer * m_EndcapDigitizer
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
ESOldDigitizer * m_ESOldDigitizer
ESDigitizer * m_ESDigitizer
EBDigitizer * m_BarrelDigitizer
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
virtual void EcalDigiProducer::cacheEBDigis ( const EBDigiCollection ebDigiPtr) const
inlineprivatevirtual

Reimplemented in EcalTBDigiProducer.

Definition at line 73 of file EcalDigiProducer.h.

Referenced by finalizeEvent().

73 { }
virtual void EcalDigiProducer::cacheEEDigis ( const EEDigiCollection eeDigiPtr) const
inlineprivatevirtual

Reimplemented in EcalTBDigiProducer.

Definition at line 74 of file EcalDigiProducer.h.

Referenced by finalizeEvent().

74 { }
void EcalDigiProducer::checkCalibrations ( const edm::Event event,
const edm::EventSetup eventSetup 
)
private

Definition at line 629 of file EcalDigiProducer.cc.

References EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), edm::EventSetup::get(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), LogDebug, m_APDCoder, m_APDResponse, m_Coder, m_doFastES, m_EBResponse, m_EBs25notCont, m_EEResponse, m_EEs25notCont, m_ESDigitizer, m_ESElectronicsSim, m_ESElectronicsSimFast, m_ESOldDigitizer, m_ESShape, m_useLCcorrection, EcalCoder::MAXADC, EcalCoder::NGAINS, edm::ESHandle< class >::product(), EcalHitResponse::setEventTime(), EcalCoder::setFullScaleEnergy(), ESElectronicsSim::setGain(), ESShape::setGain(), ESDigitizer::setGain(), EcalCoder::setGainRatios(), EBHitResponse::setIntercal(), EcalCoder::setIntercalibConstants(), EcalHitResponse::setLaserConstants(), ESElectronicsSim::setMIPs(), ESElectronicsSimFast::setMIPs(), ESElectronicsSim::setMIPToGeV(), ESElectronicsSimFast::setMIPToGeV(), ESElectronicsSim::setPedestals(), ESElectronicsSimFast::setPedestals(), and EcalCoder::setPedestals().

Referenced by initializeEvent().

630 {
631  // Pedestals from event setup
632 
634  eventSetup.get<EcalPedestalsRcd>().get( dbPed ) ;
635  const EcalPedestals* pedestals ( dbPed.product() ) ;
636 
637  m_Coder->setPedestals( pedestals ) ;
638  if( 0 != m_APDCoder ) m_APDCoder->setPedestals( pedestals ) ;
639 
640  // Ecal Intercalibration Constants
642  eventSetup.get<EcalIntercalibConstantsMCRcd>().get( pIcal ) ;
643  const EcalIntercalibConstantsMC* ical ( pIcal.product() ) ;
644 
646  if( 0 != m_APDCoder) m_APDCoder->setIntercalibConstants( ical ) ;
647 
648  m_EBResponse->setIntercal( ical ) ;
649  if( 0 != m_APDResponse ) m_APDResponse->setIntercal( ical ) ;
650 
651  // Ecal LaserCorrection Constants
653  eventSetup.get<EcalLaserDbRecord>().get(laser);
654  const edm::TimeValue_t eventTimeValue = event.time().value();
655 
656  m_EBResponse->setEventTime(eventTimeValue);
658 
659  m_EEResponse->setEventTime(eventTimeValue);
661 
662  // ADC -> GeV Scale
664  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
665  const EcalADCToGeVConstant* agc = pAgc.product();
666 
667  // Gain Ratios
669  eventSetup.get<EcalGainRatiosRcd>().get(pRatio);
670  const EcalGainRatios* gr = pRatio.product();
671 
672  m_Coder->setGainRatios( gr );
673  if( 0 != m_APDCoder) m_APDCoder->setGainRatios( gr );
674 
675  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
676 
677  double theGains[m_Coder->NGAINS+1];
678  theGains[0] = 0.;
679  theGains[3] = 1.;
680  theGains[2] = defaultRatios->gain6Over1() ;
681  theGains[1] = theGains[2]*(defaultRatios->gain12Over6()) ;
682 
683  LogDebug("EcalDigi") << " Gains: " << "\n" << " g1 = " << theGains[1]
684  << "\n" << " g2 = " << theGains[2]
685  << "\n" << " g3 = " << theGains[3] ;
686 
687  delete defaultRatios;
688 
689  const double EBscale (
690  ( agc->getEBValue())*theGains[1]*(m_Coder->MAXADC)*m_EBs25notCont ) ;
691 
692  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEBValue()
693  << "\n" << " notCont = " << m_EBs25notCont
694  << "\n" << " saturation for EB = " << EBscale
695  << ", " << m_EBs25notCont ;
696 
697  const double EEscale (
698  (agc->getEEValue())*theGains[1]*(m_Coder->MAXADC)*m_EEs25notCont ) ;
699 
700  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEEValue()
701  << "\n" << " notCont = " << m_EEs25notCont
702  << "\n" << " saturation for EB = " << EEscale
703  << ", " << m_EEs25notCont ;
704 
705  m_Coder->setFullScaleEnergy( EBscale ,
706  EEscale ) ;
707  if( 0 != m_APDCoder ) m_APDCoder->setFullScaleEnergy( EBscale ,
708  EEscale ) ;
709 
710  if( 0 != m_ESOldDigitizer ||
711  0 != m_ESDigitizer )
712  {
713  // ES condition objects
714  edm::ESHandle<ESGain> hesgain ;
716  edm::ESHandle<ESPedestals> hesPedestals ;
718 
719  eventSetup.get<ESGainRcd>(). get( hesgain ) ;
720  eventSetup.get<ESMIPToGeVConstantRcd>(). get( hesMIPToGeV ) ;
721  eventSetup.get<ESPedestalsRcd>(). get( hesPedestals ) ;
722  eventSetup.get<ESIntercalibConstantsRcd>().get( hesMIPs ) ;
723 
724  const ESGain* esgain ( hesgain.product() ) ;
725  const ESPedestals* espeds ( hesPedestals.product() ) ;
726  const ESIntercalibConstants* esmips ( hesMIPs.product() ) ;
727  const ESMIPToGeVConstant* esMipToGeV ( hesMIPToGeV.product() ) ;
728  const int ESGain ( 1.1 > esgain->getESGain() ? 1 : 2 ) ;
729  const double ESMIPToGeV ( ( 1 == ESGain ) ?
730  esMipToGeV->getESValueLow() :
731  esMipToGeV->getESValueHigh() ) ;
732 
734 
735  if( !m_doFastES )
736  {
738  m_ESElectronicsSim->setPedestals( espeds ) ;
739  m_ESElectronicsSim->setMIPs( esmips ) ;
740  m_ESElectronicsSim->setMIPToGeV( ESMIPToGeV ) ;
741  }
742  else
743  {
746  m_ESElectronicsSimFast->setMIPs( esmips ) ;
747  m_ESElectronicsSimFast->setMIPToGeV( ESMIPToGeV ) ;
748  }
749  }
750 }
#define LogDebug(id)
void setMIPToGeV(double MIPToGeV)
void setGain(const int gain)
Definition: ESGain.h:5
void setGain(const int gain)
Definition: ESShape.h:26
void setEventTime(const edm::TimeValue_t &iTime)
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
Definition: EcalCoder.cc:63
ESOldDigitizer * m_ESOldDigitizer
ESElectronicsSimFast * m_ESElectronicsSimFast
ESDigitizer * m_ESDigitizer
void setPedestals(const ESPedestals *peds)
void setPedestals(const ESPedestals *peds)
void setLaserConstants(const EcalLaserDbService *laser, bool &useLCcorrection)
void setIntercal(const EcalIntercalibConstantsMC *ical)
EBHitResponse * m_APDResponse
const double m_EBs25notCont
void setPedestals(const EcalPedestals *pedestals)
can be fetched every event from the EventSetup
Definition: EcalCoder.cc:51
EBHitResponse * m_EBResponse
void setGain(const int gain)
Definition: ESDigitizer.cc:61
ESElectronicsSim * m_ESElectronicsSim
float gain6Over1() const
unsigned long long TimeValue_t
Definition: Timestamp.h:28
EcalCoder * m_APDCoder
void setGainRatios(const EcalGainRatios *gainRatios)
Definition: EcalCoder.cc:57
void setFullScaleEnergy(double EBscale, double EEscale)
Definition: EcalCoder.cc:42
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
float gain12Over6() const
void setMIPs(const ESIntercalibConstants *mips)
const double m_EEs25notCont
EEHitResponse * m_EEResponse
void EcalDigiProducer::checkGeometry ( const edm::EventSetup eventSetup)
private

Definition at line 753 of file EcalDigiProducer.cc.

References edm::EventSetup::get(), m_Geometry, and updateGeometry().

Referenced by initializeEvent().

754 {
755  // TODO find a way to avoid doing this every event
756  edm::ESHandle<CaloGeometry> hGeometry ;
757  eventSetup.get<CaloGeometryRecord>().get( hGeometry ) ;
758 
759  const CaloGeometry* pGeometry = &*hGeometry;
760 
761  if( pGeometry != m_Geometry )
762  {
763  m_Geometry = pGeometry;
764  updateGeometry();
765  }
766 }
const CaloGeometry * m_Geometry
const T & get() const
Definition: EventSetup.h:55
void EcalDigiProducer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Reimplemented in EcalTBDigiProducer.

Definition at line 586 of file EcalDigiProducer.cc.

References cacheEBDigis(), cacheEEDigis(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_doFastES, m_EBdigiCollection, m_EEdigiCollection, m_EndcapDigitizer, m_ESdigiCollection, m_ESDigitizer, m_ESOldDigitizer, ESDigitizer::run(), EcalTDigitizer< Traits >::run(), and CaloTDigitizer< Traits >::run().

Referenced by EcalTBDigiProducer::finalizeEvent(), and edm::DataMixingEcalDigiWorkerProd::putEcal().

586  {
587  // Step B: Create empty output
588  std::auto_ptr<EBDigiCollection> apdResult ( !m_apdSeparateDigi ? 0 :
589  new EBDigiCollection() ) ;
590  std::auto_ptr<EBDigiCollection> barrelResult ( new EBDigiCollection() ) ;
591  std::auto_ptr<EEDigiCollection> endcapResult ( new EEDigiCollection() ) ;
592  std::auto_ptr<ESDigiCollection> preshowerResult( new ESDigiCollection() ) ;
593 
594  // run the algorithm
595 
596  m_BarrelDigitizer->run( *barrelResult ) ;
597  cacheEBDigis( &*barrelResult ) ;
598 
599  edm::LogInfo("DigiInfo") << "EB Digis: " << barrelResult->size() ;
600 
601  if( m_apdSeparateDigi ) {
602  m_APDDigitizer->run( *apdResult ) ;
603  edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size() ;
604  }
605 
606  m_EndcapDigitizer->run( *endcapResult ) ;
607  edm::LogInfo("EcalDigi") << "EE Digis: " << endcapResult->size() ;
608  cacheEEDigis( &*endcapResult ) ;
609 
610  if(m_doFastES) {
611  m_ESDigitizer->run( *preshowerResult ) ;
612  } else {
613  m_ESOldDigitizer->run( *preshowerResult ) ;
614  }
615  edm::LogInfo("EcalDigi") << "ES Digis: " << preshowerResult->size();
616 
617 
618  // Step D: Put outputs into event
619  if( m_apdSeparateDigi ) {
620  //event.put( apdResult, m_apdDigiTag ) ;
621  }
622 
623  event.put( barrelResult, m_EBdigiCollection ) ;
624  event.put( endcapResult, m_EEdigiCollection ) ;
625  event.put( preshowerResult, m_ESdigiCollection ) ;
626 }
EEDigitizer * m_EndcapDigitizer
const std::string m_ESdigiCollection
ESOldDigitizer * m_ESOldDigitizer
const std::string m_EEdigiCollection
ESDigitizer * m_ESDigitizer
EBDigitizer * m_BarrelDigitizer
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
virtual void run(DigiCollection &output)
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
virtual void run(ESDigiCollection &output)
turns hits into digis
Definition: ESDigitizer.cc:189
void EcalDigiProducer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Reimplemented in EcalTBDigiProducer.

Definition at line 511 of file EcalDigiProducer.cc.

References checkCalibrations(), checkGeometry(), EcalTDigitizer< Traits >::initializeHits(), CaloTDigitizer< Traits >::initializeHits(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_doFastES, m_EndcapDigitizer, m_ESDigitizer, and m_ESOldDigitizer.

Referenced by EcalTBDigiProducer::initializeEvent(), and edm::DataMixingEcalDigiWorkerProd::initializeEvent().

511  {
512  checkGeometry( eventSetup );
513  checkCalibrations( event, eventSetup );
515  if(m_apdSeparateDigi) {
517  }
519  if(m_doFastES) {
521  } else {
523  }
524 }
EEDigitizer * m_EndcapDigitizer
void initializeHits()
ESOldDigitizer * m_ESOldDigitizer
virtual void initializeHits()
ESDigitizer * m_ESDigitizer
EBDigitizer * m_BarrelDigitizer
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
void checkGeometry(const edm::EventSetup &eventSetup)
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
void EcalDigiProducer::setEBNoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 799 of file EcalDigiProducer.cc.

References m_BarrelDigitizer, and EcalTDigitizer< Traits >::setNoiseSignalGenerator().

799  {
800  //noiseGenerator->setParameterMap(theParameterMap);
802 }
void setNoiseSignalGenerator(EcalBaseSignalGenerator *noiseSignalGenerator)
EBDigitizer * m_BarrelDigitizer
void EcalDigiProducer::setEENoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 804 of file EcalDigiProducer.cc.

References m_EndcapDigitizer, and EcalTDigitizer< Traits >::setNoiseSignalGenerator().

804  {
805  //noiseGenerator->setParameterMap(theParameterMap);
807 }
EEDigitizer * m_EndcapDigitizer
void setNoiseSignalGenerator(EcalBaseSignalGenerator *noiseSignalGenerator)
void EcalDigiProducer::setESNoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 809 of file EcalDigiProducer.cc.

References m_ESDigitizer, and EcalTDigitizer< Traits >::setNoiseSignalGenerator().

809  {
810  //noiseGenerator->setParameterMap(theParameterMap);
812 }
void setNoiseSignalGenerator(EcalBaseSignalGenerator *noiseSignalGenerator)
ESDigitizer * m_ESDigitizer
void EcalDigiProducer::updateGeometry ( )
private

Definition at line 769 of file EcalDigiProducer.cc.

References DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, CaloGeometry::getSubdetectorGeometry(), CaloSubdetectorGeometry::getValidDetIds(), m_APDResponse, m_doFastES, m_EBResponse, m_EEResponse, m_ESDigitizer, m_ESOldDigitizer, m_ESOldResponse, m_ESResponse, m_Geometry, ESDigitizer::setDetIds(), CaloTDigitizer< Traits >::setDetIds(), EcalHitResponse::setGeometry(), and CaloHitResponse::setGeometry().

Referenced by checkGeometry().

770 {
780 
781  const std::vector<DetId>* theESDets (
784 
785  if( !m_doFastES )
786  {
787  if( 0 != m_ESOldDigitizer &&
788  0 != theESDets )
789  m_ESOldDigitizer->setDetIds( *theESDets ) ;
790  }
791  else
792  {
793  if( 0 != m_ESDigitizer &&
794  0 != theESDets )
795  m_ESDigitizer->setDetIds( *theESDets ) ;
796  }
797 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
CaloHitResponse * m_ESOldResponse
void setDetIds(const std::vector< DetId > &detIds)
tell the digitizer which cells exist; cannot change during a run
Definition: ESDigitizer.cc:53
ESOldDigitizer * m_ESOldDigitizer
ESDigitizer * m_ESDigitizer
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)
EBHitResponse * m_APDResponse
EBHitResponse * m_EBResponse
const CaloGeometry * m_Geometry
ESHitResponse * m_ESResponse
void setGeometry(const CaloSubdetectorGeometry *geometry)
void setDetIds(const std::vector< DetId > &detIds)
EEHitResponse * m_EEResponse

Member Data Documentation

const bool EcalDigiProducer::m_addESNoise
private

Definition at line 117 of file EcalDigiProducer.h.

EcalCoder* EcalDigiProducer::m_APDCoder
private

Definition at line 136 of file EcalDigiProducer.h.

Referenced by checkCalibrations(), EcalDigiProducer(), and ~EcalDigiProducer().

const std::string EcalDigiProducer::m_apdDigiTag
private

Definition at line 106 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer().

EBDigitizer* EcalDigiProducer::m_APDDigitizer
private
EcalElectronicsSim* EcalDigiProducer::m_APDElectronicsSim
private

Definition at line 135 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and ~EcalDigiProducer().

const APDSimParameters* EcalDigiProducer::m_apdParameters
private

Definition at line 107 of file EcalDigiProducer.h.

Referenced by ~EcalDigiProducer().

EBHitResponse* EcalDigiProducer::m_APDResponse
private
const bool EcalDigiProducer::m_apdSeparateDigi
private
const APDShape EcalDigiProducer::m_APDShape
private

Definition at line 85 of file EcalDigiProducer.h.

EBDigitizer* EcalDigiProducer::m_BarrelDigitizer
private
EcalCoder* EcalDigiProducer::m_Coder
private

Definition at line 133 of file EcalDigiProducer.h.

Referenced by checkCalibrations(), EcalDigiProducer(), and ~EcalDigiProducer().

const bool EcalDigiProducer::m_doFastES
private
CorrelatedNoisifier<EcalCorrMatrix>* EcalDigiProducer::m_EBCorrNoise[3]
private

Definition at line 140 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and ~EcalDigiProducer().

const std::string EcalDigiProducer::m_EBdigiCollection
private

Definition at line 90 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

EBHitResponse* EcalDigiProducer::m_EBResponse
protected
const double EcalDigiProducer::m_EBs25notCont
private

Definition at line 99 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

const EBShape EcalDigiProducer::m_EBShape
private

Definition at line 86 of file EcalDigiProducer.h.

CorrelatedNoisifier<EcalCorrMatrix>* EcalDigiProducer::m_EECorrNoise[3]
private

Definition at line 141 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and ~EcalDigiProducer().

const std::string EcalDigiProducer::m_EEdigiCollection
private

Definition at line 91 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

EEHitResponse* EcalDigiProducer::m_EEResponse
protected
const double EcalDigiProducer::m_EEs25notCont
private

Definition at line 100 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

const EEShape EcalDigiProducer::m_EEShape
private

Definition at line 87 of file EcalDigiProducer.h.

EcalElectronicsSim* EcalDigiProducer::m_ElectronicsSim
private

Definition at line 132 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and ~EcalDigiProducer().

EEDigitizer* EcalDigiProducer::m_EndcapDigitizer
private
const std::string EcalDigiProducer::m_ESdigiCollection
private

Definition at line 92 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

ESDigitizer* EcalDigiProducer::m_ESDigitizer
private
ESElectronicsSim* EcalDigiProducer::m_ESElectronicsSim
private

Definition at line 123 of file EcalDigiProducer.h.

Referenced by checkCalibrations(), and ~EcalDigiProducer().

ESElectronicsSimFast* EcalDigiProducer::m_ESElectronicsSimFast
private

Definition at line 125 of file EcalDigiProducer.h.

Referenced by checkCalibrations(), and ~EcalDigiProducer().

ESOldDigitizer* EcalDigiProducer::m_ESOldDigitizer
private
CaloHitResponse* EcalDigiProducer::m_ESOldResponse
private

Definition at line 115 of file EcalDigiProducer.h.

Referenced by updateGeometry(), and ~EcalDigiProducer().

ESHitResponse* EcalDigiProducer::m_ESResponse
private

Definition at line 114 of file EcalDigiProducer.h.

Referenced by updateGeometry(), and ~EcalDigiProducer().

ESShape EcalDigiProducer::m_ESShape
private

Definition at line 88 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

const CaloGeometry* EcalDigiProducer::m_Geometry
private

Definition at line 138 of file EcalDigiProducer.h.

Referenced by checkGeometry(), and updateGeometry().

const std::string EcalDigiProducer::m_hitsProducerTag
private

Definition at line 93 of file EcalDigiProducer.h.

Referenced by accumulate(), and EcalDigiProducer().

const EcalSimParameterMap* EcalDigiProducer::m_ParameterMap
protected
const bool EcalDigiProducer::m_PreMix1
private

Definition at line 118 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer().

const bool EcalDigiProducer::m_PreMix2
private

Definition at line 119 of file EcalDigiProducer.h.

const unsigned int EcalDigiProducer::m_readoutFrameSize
private

Definition at line 102 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer().

bool EcalDigiProducer::m_useLCcorrection
private

Definition at line 95 of file EcalDigiProducer.h.

Referenced by checkCalibrations().