54 m_APDShape ( params.getParameter<double>(
"apdShapeTstart" ) ,
55 params.getParameter<double>(
"apdShapeTau" ) ) ,
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") ) ,
66 m_EBs25notCont ( params.getParameter<double> (
"EBs25notContainment") ) ,
67 m_EEs25notCont ( params.getParameter<double> (
"EEs25notContainment") ) ,
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") ) ) ,
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" ) ,
92 params.getParameter<std::vector<double> > (
"apdNonlParms" ) ) ) ,
94 m_APDResponse ( !m_apdSeparateDigi ? 0 :
109 m_ESResponse ( new
ESHitResponse( m_ParameterMap, &m_ESShape ) ) ,
110 m_ESOldResponse ( new
CaloHitResponse( m_ParameterMap, &m_ESShape ) ) ,
112 m_addESNoise ( params.getParameter<bool> (
"doESNoise") ) ,
113 m_PreMix1 ( params.getParameter<bool> (
"EcalPreMixStage1") ) ,
114 m_PreMix2 ( params.getParameter<bool> (
"EcalPreMixStage2") ) ,
116 m_doFastES ( params.getParameter<bool> (
"doFast" ) ) ,
118 m_ESElectronicsSim ( m_doFastES ? 0 :
121 m_ESOldDigitizer ( m_doFastES ? 0 :
126 m_ESElectronicsSimFast ( !m_doFastES ? 0 :
130 m_ESDigitizer ( !m_doFastES ? 0 :
132 m_ESElectronicsSimFast ,
135 m_APDDigitizer ( 0 ) ,
136 m_BarrelDigitizer ( 0 ) ,
137 m_EndcapDigitizer ( 0 ) ,
138 m_ElectronicsSim ( 0 ) ,
140 m_APDElectronicsSim ( 0 ) ,
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");
161 const bool applyConstantTerm = params.
getParameter<
bool> (
"applyConstantTerm");
162 const double rmsConstantTerm = params.
getParameter<
double> (
"ConstantTerm");
164 const bool addNoise = params.
getParameter<
bool> (
"doENoise");
165 const bool cosmicsPhase = params.
getParameter<
bool> (
"cosmicsPhase");
166 const double cosmicsShift = params.
getParameter<
double> (
"cosmicsShift");
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 ) ) ;
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] ) ;
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 ] ;
267 m_APDShape ( params.getParameter<double>(
"apdShapeTstart" ) ,
268 params.getParameter<double>(
"apdShapeTau" ) ) ,
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") ) ,
279 m_EBs25notCont ( params.getParameter<double> (
"EBs25notContainment") ) ,
280 m_EEs25notCont ( params.getParameter<double> (
"EEs25notContainment") ) ,
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") ) ) ,
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" ) ,
305 params.getParameter<std::vector<double> > (
"apdNonlParms" ) ) ) ,
307 m_APDResponse ( !m_apdSeparateDigi ? 0 :
322 m_ESResponse ( new
ESHitResponse( m_ParameterMap, &m_ESShape ) ) ,
323 m_ESOldResponse ( new
CaloHitResponse( m_ParameterMap, &m_ESShape ) ) ,
325 m_addESNoise ( params.getParameter<bool> (
"doESNoise") ) ,
326 m_PreMix1 ( params.getParameter<bool> (
"EcalPreMixStage1") ) ,
327 m_PreMix2 ( params.getParameter<bool> (
"EcalPreMixStage2") ) ,
329 m_doFastES ( params.getParameter<bool> (
"doFast" ) ) ,
331 m_ESElectronicsSim ( m_doFastES ? 0 :
334 m_ESOldDigitizer ( m_doFastES ? 0 :
339 m_ESElectronicsSimFast ( !m_doFastES ? 0 :
343 m_ESDigitizer ( !m_doFastES ? 0 :
345 m_ESElectronicsSimFast ,
348 m_APDDigitizer ( 0 ) ,
349 m_BarrelDigitizer ( 0 ) ,
350 m_EndcapDigitizer ( 0 ) ,
351 m_ElectronicsSim ( 0 ) ,
353 m_APDElectronicsSim ( 0 ) ,
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");
375 const bool applyConstantTerm = params.
getParameter<
bool> (
"applyConstantTerm");
376 const double rmsConstantTerm = params.
getParameter<
double> (
"ConstantTerm");
378 const bool addNoise = params.
getParameter<
bool> (
"doNoise");
379 const bool cosmicsPhase = params.
getParameter<
bool> (
"cosmicsPhase");
380 const double cosmicsShift = params.
getParameter<
double> (
"cosmicsShift");
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 ) ) ;
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] ) ;
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 ] ;
599 edm::LogInfo(
"DigiInfo") <<
"EB Digis: " << barrelResult->size() ;
603 edm::LogInfo(
"DigiInfo") <<
"APD Digis: " << apdResult->size() ;
607 edm::LogInfo(
"EcalDigi") <<
"EE Digis: " << endcapResult->size() ;
615 edm::LogInfo(
"EcalDigi") <<
"ES Digis: " << preshowerResult->size();
681 theGains[1] = theGains[2]*(defaultRatios->
gain12Over6()) ;
683 LogDebug(
"EcalDigi") <<
" Gains: " <<
"\n" <<
" g1 = " << theGains[1]
684 <<
"\n" <<
" g2 = " << theGains[2]
685 <<
"\n" <<
" g3 = " << theGains[3] ;
687 delete defaultRatios;
689 const double EBscale (
694 <<
"\n" <<
" saturation for EB = " << EBscale
697 const double EEscale (
702 <<
"\n" <<
" saturation for EB = " << EEscale
728 const int ESGain ( 1.1 > esgain->getESGain() ? 1 : 2 ) ;
729 const double ESMIPToGeV ( ( 1 ==
ESGain ) ?
730 esMipToGeV->getESValueLow() :
731 esMipToGeV->getESValueHigh() ) ;
781 const std::vector<DetId>* theESDets (
EEDigitizer * m_EndcapDigitizer
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c)
int bunchCrossing() const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
void setMIPToGeV(double MIPToGeV)
CaloHitResponse * m_ESOldResponse
void setGain(const int gain)
virtual ~EcalDigiProducer()
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
CorrelatedNoisifier< EcalCorrMatrix > * m_EBCorrNoise[3]
const std::string m_ESdigiCollection
const EcalSimParameterMap * m_ParameterMap
void setGain(const int gain)
void setDetIds(const std::vector< DetId > &detIds)
tell the digitizer which cells exist; cannot change during a run
void setEventTime(const edm::TimeValue_t &iTime)
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
const std::string m_hitsProducerTag
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
ESOldDigitizer * m_ESOldDigitizer
void setNoiseSignalGenerator(EcalBaseSignalGenerator *noiseSignalGenerator)
EcalDigiProducer(const edm::ParameterSet ¶ms, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
const std::string m_EEdigiCollection
ESElectronicsSimFast * m_ESElectronicsSimFast
virtual void initializeHits()
ESDigitizer * m_ESDigitizer
const APDSimParameters * m_apdParameters
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 setPedestals(const ESPedestals *peds)
void setPedestals(const ESPedestals *peds)
CorrelatedNoisifier< EcalCorrMatrix > * m_EECorrNoise[3]
const unsigned int m_readoutFrameSize
void setLaserConstants(const EcalLaserDbService *laser, bool &useLCcorrection)
EcalElectronicsSim * m_ElectronicsSim
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
void setIntercal(const EcalIntercalibConstantsMC *ical)
EBHitResponse * m_APDResponse
Creates electronics signals from hits.
const double m_EBs25notCont
void setPedestals(const EcalPedestals *pedestals)
can be fetched every event from the EventSetup
EBHitResponse * m_EBResponse
void setPhaseShift(double phaseShift)
void setGain(const int gain)
ESElectronicsSim * m_ESElectronicsSim
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
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)
ESHitResponse * m_ESResponse
void setGeometry(const CaloSubdetectorGeometry *geometry)
void setGainRatios(const EcalGainRatios *gainRatios)
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
void setFullScaleEnergy(double EBscale, double EEscale)
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
T const * product() const
float gain12Over6() const
T const * product() const
EBDigitizer * m_APDDigitizer
const bool m_apdSeparateDigi
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c)
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
const std::string m_apdDigiTag
void setDetIds(const std::vector< DetId > &detIds)
volatile std::atomic< bool > shutdown_flag false
virtual void run(DigiCollection &output)
void setMIPs(const ESIntercalibConstants *mips)
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
virtual void run(ESDigiCollection &output)
turns hits into digis
EcalElectronicsSim * m_APDElectronicsSim
const double m_EEs25notCont
EEHitResponse * m_EEResponse