47 m_APDShape ( params.getParameter<double>(
"apdShapeTstart" ) ,
48 params.getParameter<double>(
"apdShapeTau" ) ) ,
52 m_EBdigiCollection ( params.getParameter<std::string>(
"EBdigiCollection") ) ,
53 m_EEdigiCollection ( params.getParameter<std::string>(
"EEdigiCollection") ) ,
54 m_ESdigiCollection ( params.getParameter<std::string>(
"ESdigiCollection") ) ,
55 m_hitsProducerTag ( params.getParameter<std::string>(
"hitsProducer" ) ) ,
56 m_useLCcorrection ( params.getParameter<bool> (
"UseLCcorrection") ) ,
57 m_apdSeparateDigi ( params.getParameter<bool> (
"apdSeparateDigi") ) ,
59 m_EBs25notCont ( params.getParameter<double> (
"EBs25notContainment") ) ,
60 m_EEs25notCont ( params.getParameter<double> (
"EEs25notContainment") ) ,
62 m_readoutFrameSize ( params.getParameter<int> (
"readoutFrameSize") ) ,
64 params.getParameter<double> (
"simHitToPhotoelectronsBarrel") ,
65 params.getParameter<double> (
"simHitToPhotoelectronsEndcap") ,
66 params.getParameter<double> (
"photoelectronsToAnalogBarrel") ,
67 params.getParameter<double> (
"photoelectronsToAnalogEndcap") ,
68 params.getParameter<double> (
"samplingFactor") ,
69 params.getParameter<double> (
"timePhase") ,
71 params.getParameter<int> (
"binOfMaximum") ,
72 params.getParameter<bool> (
"doPhotostatistics") ,
73 params.getParameter<bool> (
"syncPhase") ) ) ,
75 m_apdDigiTag ( params.getParameter<std::string> (
"apdDigiTag" ) ) ,
77 params.getParameter<bool> (
"apdAddToBarrel" ) ,
79 params.getParameter<double> (
"apdSimToPELow" ) ,
80 params.getParameter<double> (
"apdSimToPEHigh" ) ,
81 params.getParameter<double> (
"apdTimeOffset" ) ,
82 params.getParameter<double> (
"apdTimeOffWidth" ) ,
83 params.getParameter<bool> (
"apdDoPEStats" ) ,
85 params.getParameter<std::vector<double> > (
"apdNonlParms" ) ) ) ,
87 m_APDResponse ( !m_apdSeparateDigi ? 0 :
102 m_ESResponse ( new
ESHitResponse( m_ParameterMap, &m_ESShape ) ) ,
103 m_ESOldResponse ( new
CaloHitResponse( m_ParameterMap, &m_ESShape ) ) ,
105 m_addESNoise ( params.getParameter<bool> (
"doESNoise") ) ,
106 m_doFastES ( params.getParameter<bool> (
"doFast" ) ) ,
108 m_ESElectronicsSim ( m_doFastES ? 0 :
111 m_ESOldDigitizer ( m_doFastES ? 0 :
116 m_ESElectronicsSimFast ( !m_doFastES ? 0 :
119 m_ESDigitizer ( !m_doFastES ? 0 :
121 m_ESElectronicsSimFast ,
124 m_APDDigitizer ( 0 ) ,
125 m_BarrelDigitizer ( 0 ) ,
126 m_EndcapDigitizer ( 0 ) ,
127 m_ElectronicsSim ( 0 ) ,
129 m_APDElectronicsSim ( 0 ) ,
135 const std::vector<double> ebCorMatG12 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG12");
136 const std::vector<double> eeCorMatG12 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG12");
137 const std::vector<double> ebCorMatG06 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG06");
138 const std::vector<double> eeCorMatG06 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG06");
139 const std::vector<double> ebCorMatG01 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG01");
140 const std::vector<double> eeCorMatG01 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG01");
143 const bool applyConstantTerm = params.
getParameter<
bool> (
"applyConstantTerm");
144 const double rmsConstantTerm = params.
getParameter<
double> (
"ConstantTerm");
146 const bool addNoise = params.
getParameter<
bool> (
"doNoise");
147 const bool cosmicsPhase = params.
getParameter<
bool> (
"cosmicsPhase");
148 const double cosmicsShift = params.
getParameter<
double> (
"cosmicsShift");
174 assert( 1.
e-7 > fabs( ebCorMatG12[0] - 1.0 ) ) ;
175 assert( 1.
e-7 > fabs( ebCorMatG06[0] - 1.0 ) ) ;
176 assert( 1.
e-7 > fabs( ebCorMatG01[0] - 1.0 ) ) ;
177 assert( 1.
e-7 > fabs( eeCorMatG12[0] - 1.0 ) ) ;
178 assert( 1.
e-7 > fabs( eeCorMatG06[0] - 1.0 ) ) ;
179 assert( 1.
e-7 > fabs( eeCorMatG01[0] - 1.0 ) ) ;
183 assert( 0 == row || 1. >= ebCorMatG12[row] ) ;
184 assert( 0 == row || 1. >= ebCorMatG06[row] ) ;
185 assert( 0 == row || 1. >= ebCorMatG01[row] ) ;
186 assert( 0 == row || 1. >= eeCorMatG12[row] ) ;
187 assert( 0 == row || 1. >= eeCorMatG06[row] ) ;
188 assert( 0 == row || 1. >= eeCorMatG01[row] ) ;
189 for (
unsigned int column ( 0 ) ; column <= row ; ++column )
191 const unsigned int index ( row - column ) ;
192 ebMatrix[0]( row, column ) = ebCorMatG12[ index ] ;
193 eeMatrix[0]( row, column ) = eeCorMatG12[ index ] ;
194 ebMatrix[1]( row, column ) = ebCorMatG06[ index ] ;
195 eeMatrix[1]( row, column ) = eeCorMatG06[ index ] ;
196 ebMatrix[2]( row, column ) = ebCorMatG01[ index ] ;
197 eeMatrix[2]( row, column ) = eeCorMatG01[ index ] ;
298 event.getByLabel(
"mix",
306 const bool isEB ( crossingFrame.
isValid() &&
311 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
312 << barrelHitsName.c_str() ;
314 event.getByLabel(
"mix",
322 const bool isEE ( crossingFrame.
isValid() &&
327 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
328 << endcapHitsName.c_str() ;
330 event.getByLabel(
"mix",
338 const bool isES ( crossingFrame.
isValid() &&
343 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
344 << preshowerHitsName.c_str() ;
357 std::auto_ptr<MixCollection<PCaloHit> > barrelHits( EBHits ) ;
362 edm::LogInfo(
"DigiInfo") <<
"EB Digis: " << barrelResult->size() ;
369 edm::LogInfo(
"DigiInfo") <<
"APD Digis: " << apdResult->size() ;
375 std::auto_ptr<MixCollection<PCaloHit> > endcapHits( EEHits ) ;
378 edm::LogInfo(
"EcalDigi") <<
"EE Digis: " << endcapResult->size() ;
384 std::auto_ptr<MixCollection<PCaloHit> > preshowerHits( ESHits ) ;
395 edm::LogInfo(
"EcalDigi") <<
"ES Digis: " << preshowerResult->size();
460 theGains[1] = theGains[2]*(defaultRatios->
gain12Over6()) ;
462 LogDebug(
"EcalDigi") <<
" Gains: " <<
"\n" <<
" g1 = " << theGains[1]
463 <<
"\n" <<
" g2 = " << theGains[2]
464 <<
"\n" <<
" g3 = " << theGains[3] ;
466 delete defaultRatios;
468 const double EBscale (
473 <<
"\n" <<
" saturation for EB = " << EBscale
476 const double EEscale (
481 <<
"\n" <<
" saturation for EB = " << EEscale
507 const int ESGain ( 1.1 > esgain->getESGain() ? 1 : 2 ) ;
508 const double ESMIPToGeV ( ( 1 ==
ESGain ) ?
509 esMipToGeV->getESValueLow() :
510 esMipToGeV->getESValueHigh() ) ;
560 const std::vector<DetId>* theESDets (
EEDigitizer * m_EndcapDigitizer
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]
EcalDigiProducer(const edm::ParameterSet ¶ms)
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)
const std::string m_hitsProducerTag
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
ESOldDigitizer * m_ESOldDigitizer
virtual void run(MixCollection< PCaloHit > &input, DigiCollection &output)
turns hits into digis
const std::string m_EEdigiCollection
ESElectronicsSimFast * m_ESElectronicsSimFast
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 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 setIntercal(const EcalIntercalibConstantsMC *ical)
EBHitResponse * m_APDResponse
Creates electronics signals from hits.
const double m_EBs25notCont
virtual void run(MixCollection< PCaloHit > &input, DigiCollection &output)
void setPedestals(const EcalPedestals *pedestals)
can be fetched every event from the EventSetup
void run(MixCollection< PCaloHit > &input, DigiCollection &output)
turns hits into digis
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
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)
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
const std::string m_apdDigiTag
void setDetIds(const std::vector< DetId > &detIds)
virtual void produce(edm::Event &event, const edm::EventSetup &eventSetup)
void setMIPs(const ESIntercalibConstants *mips)
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
EcalElectronicsSim * m_APDElectronicsSim
const double m_EEs25notCont
EEHitResponse * m_EEResponse