40 m_APDDigitizer ( 0 ) ,
41 m_BarrelDigitizer ( 0 ) ,
42 m_EndcapDigitizer ( 0 ) ,
44 m_ESDigitizerFast ( 0 ) ,
45 m_ParameterMap ( 0 ) ,
46 m_APDShape ( params.getParameter<double>(
"apdShapeTstart" ) ,
47 params.getParameter<double>(
"apdShapeTau" ) ) ,
55 m_ElectronicsSim ( 0 ) ,
56 m_ESElectronicsSim ( 0 ) ,
57 m_ESElectronicsSimFast ( 0 ) ,
59 m_APDElectronicsSim ( 0 ) ,
69 const bool addNoise = params.
getParameter<
bool> (
"doNoise");
70 const double simHitToPhotoelectronsBarrel = params.
getParameter<
double> (
"simHitToPhotoelectronsBarrel");
71 const double simHitToPhotoelectronsEndcap = params.
getParameter<
double> (
"simHitToPhotoelectronsEndcap");
72 const double photoelectronsToAnalogBarrel = params.
getParameter<
double> (
"photoelectronsToAnalogBarrel");
73 const double photoelectronsToAnalogEndcap = params.
getParameter<
double> (
"photoelectronsToAnalogEndcap");
74 const double samplingFactor = params.
getParameter<
double> (
"samplingFactor");
75 const double timePhase = params.
getParameter<
double> (
"timePhase");
76 const unsigned int readoutFrameSize = params.
getParameter<
int> (
"readoutFrameSize");
78 const bool doPhotostatistics = params.
getParameter<
bool> (
"doPhotostatistics");
79 const bool syncPhase = params.
getParameter<
bool> (
"syncPhase");
80 const bool cosmicsPhase = params.
getParameter<
bool> (
"cosmicsPhase");
81 const double cosmicsShift = params.
getParameter<
double> (
"cosmicsShift");
82 const std::vector<double> ebCorMatG12 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG12");
83 const std::vector<double> eeCorMatG12 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG12");
84 const std::vector<double> ebCorMatG06 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG06");
85 const std::vector<double> eeCorMatG06 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG06");
86 const std::vector<double> ebCorMatG01 = params.
getParameter< std::vector<double> >(
"EBCorrNoiseMatrixG01");
87 const std::vector<double> eeCorMatG01 = params.
getParameter< std::vector<double> >(
"EECorrNoiseMatrixG01");
88 const bool applyConstantTerm = params.
getParameter<
bool> (
"applyConstantTerm");
89 const double rmsConstantTerm = params.
getParameter<
double> (
"ConstantTerm");
90 const bool addESNoise = params.
getParameter<
bool> (
"doESNoise");
91 const int numESdetId = params.
getParameter<
int> (
"numESdetId");
97 const bool apdAddToBarrel ( params.
getParameter<
bool> (
"apdAddToBarrel") ) ;
98 const bool apdSeparateDigi ( params.
getParameter<
bool> (
"apdSeparateDigi") ) ;
99 const double apdSimToPELow ( params.
getParameter<
double> (
"apdSimToPELow" ) ) ;
100 const double apdSimToPEHigh ( params.
getParameter<
double> (
"apdSimToPEHigh") ) ;
101 const double apdTimeOffset ( params.
getParameter<
double> (
"apdTimeOffset" ) ) ;
102 const double apdTimeOffWidth ( params.
getParameter<
double> (
"apdTimeOffWidth" ) ) ;
103 const bool apdDoPEStats ( params.
getParameter<
bool> (
"apdDoPEStats" ) ) ;
104 const std::string apdDigiTag ( params.
getParameter<std::string>(
"apdDigiTag") ) ;
108 if( apdSeparateDigi ) produces<EBDigiCollection>( apdDigiTag ) ;
116 simHitToPhotoelectronsEndcap ,
117 photoelectronsToAnalogBarrel ,
118 photoelectronsToAnalogEndcap ,
137 if( apdSeparateDigi )
163 assert( ebCorMatG12.size() == readoutFrameSize ) ;
164 assert( eeCorMatG12.size() == readoutFrameSize ) ;
165 assert( ebCorMatG06.size() == readoutFrameSize ) ;
166 assert( eeCorMatG06.size() == readoutFrameSize ) ;
167 assert( ebCorMatG01.size() == readoutFrameSize ) ;
168 assert( eeCorMatG01.size() == readoutFrameSize ) ;
170 assert( 1.
e-7 > fabs( ebCorMatG12[0] - 1.0 ) ) ;
171 assert( 1.
e-7 > fabs( ebCorMatG06[0] - 1.0 ) ) ;
172 assert( 1.
e-7 > fabs( ebCorMatG01[0] - 1.0 ) ) ;
173 assert( 1.
e-7 > fabs( eeCorMatG12[0] - 1.0 ) ) ;
174 assert( 1.
e-7 > fabs( eeCorMatG06[0] - 1.0 ) ) ;
175 assert( 1.
e-7 > fabs( eeCorMatG01[0] - 1.0 ) ) ;
177 for (
unsigned int row ( 0 ) ; row != readoutFrameSize ; ++row )
179 assert( 0 == row || 1. >= ebCorMatG12[row] ) ;
180 assert( 0 == row || 1. >= ebCorMatG06[row] ) ;
181 assert( 0 == row || 1. >= ebCorMatG01[row] ) ;
182 assert( 0 == row || 1. >= eeCorMatG12[row] ) ;
183 assert( 0 == row || 1. >= eeCorMatG06[row] ) ;
184 assert( 0 == row || 1. >= eeCorMatG01[row] ) ;
185 for (
unsigned int column ( 0 ) ; column <= row ; ++column )
187 const unsigned int index ( row - column ) ;
188 ebMatrix[0]( row, column ) = ebCorMatG12[ index ] ;
189 eeMatrix[0]( row, column ) = eeCorMatG12[ index ] ;
190 ebMatrix[1]( row, column ) = ebCorMatG06[ index ] ;
191 eeMatrix[1]( row, column ) = eeCorMatG06[ index ] ;
192 ebMatrix[2]( row, column ) = ebCorMatG01[ index ] ;
193 eeMatrix[2]( row, column ) = eeCorMatG01[ index ] ;
218 if( apdSeparateDigi )
310 event.getByLabel(
"mix",
318 const bool isEB ( crossingFrame.
isValid() &&
323 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
324 << barrelHitsName.c_str() ;
326 event.getByLabel(
"mix",
334 const bool isEE ( crossingFrame.
isValid() &&
339 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
340 << endcapHitsName.c_str() ;
342 event.getByLabel(
"mix",
350 const bool isES ( crossingFrame.
isValid() &&
355 edm::LogError(
"EcalDigiProducer") <<
"Error! can't get the product "
356 << preshowerHitsName.c_str() ;
361 std::auto_ptr<EBDigiCollection> apdResult ( !apdSeparateDigi ? 0 :
371 std::auto_ptr<MixCollection<PCaloHit> > barrelHits( EBHits ) ;
375 edm::LogInfo(
"DigiInfo") <<
"EB Digis: " << barrelResult->size() ;
377 if( apdSeparateDigi )
382 edm::LogInfo(
"DigiInfo") <<
"APD Digis: " << apdResult->size() ;
388 std::auto_ptr<MixCollection<PCaloHit> > endcapHits( EEHits ) ;
391 edm::LogInfo(
"EcalDigi") <<
"EE Digis: " << endcapResult->size() ;
396 std::auto_ptr<MixCollection<PCaloHit> > preshowerHits( ESHits ) ;
406 edm::LogInfo(
"EcalDigi") <<
"ES Digis: " << preshowerResult->size();
412 if( apdSeparateDigi )
413 event.put( apdResult, apdDigiTag ) ;
462 theGains[1] = theGains[2]*(defaultRatios->
gain12Over6()) ;
464 LogDebug(
"EcalDigi") <<
" Gains: " <<
"\n" <<
" g1 = " << theGains[1]
465 <<
"\n" <<
" g2 = " << theGains[2]
466 <<
"\n" <<
" g3 = " << theGains[3] ;
468 delete defaultRatios;
470 const double EBscale (
475 <<
"\n" <<
" saturation for EB = " << EBscale
478 const double EEscale (
483 <<
"\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 setGain(const int gain)
CaloHitRespoNew * m_EEResponse
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
void setGain(const int gain)
virtual ~EcalDigiProducer()
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
void setMIPToGeV(const double MIPToGeV)
CorrelatedNoisifier< EcalCorrMatrix > * m_EBCorrNoise[3]
const APDShape m_APDShape
EcalDigiProducer(const edm::ParameterSet ¶ms)
const EcalSimParameterMap * m_ParameterMap
Creates electronics signals from EB hits , including APD.
void setGain(const int gain)
Creates electronics signals from hits.
void run(MixCollection< PCaloHit > &input, DigiCollection &output)
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
void setIntercalibConstants(const EcalIntercalibConstantsMC *ical)
void run(MixCollection< PCaloHit > &input, ESDigiCollection &output)
turns hits into digis
ESElectronicsSimFast * m_ESElectronicsSimFast
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)
void setPedestals(const ESPedestals *peds)
void setPedestals(const ESPedestals *peds)
CorrelatedNoisifier< EcalCorrMatrix > * m_EECorrNoise[3]
void setGeometry(const CaloSubdetectorGeometry *geometry)
EcalElectronicsSim * m_ElectronicsSim
CaloHitResponse * m_ESResponse
std::string m_EBdigiCollection
void setIntercal(const EcalIntercalibConstantsMC *ical)
EBHitResponse * m_APDResponse
Creates electronics signals from hits.
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
ESElectronicsSim * m_ESElectronicsSim
APDSimParameters * m_apdParameters
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
const CaloGeometry * m_Geometry
void setPhaseShift(double phaseShift)
void checkGeometry(const edm::EventSetup &eventSetup)
void setGainRatios(const EcalGainRatios *gainRatios)
void setFullScaleEnergy(double EBscale, double EEscale)
CaloTDigitizer< ESDigitizerTraits > ESDigitizer
std::string m_ESdigiCollection
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
T const * product() const
edm::SortedCollection< ESDataFrame > ESDigiCollection
float gain12Over6() const
void setDetIds(const std::vector< DetId > &detIds)
tell the digitizer which cells exist
void setGain(const int gain)
set ES Gain
T const * product() const
EBDigitizer * m_APDDigitizer
const std::string & digiTag() const
ESFastTDigitizer * m_ESDigitizerFast
void setDetIds(const std::vector< DetId > &detIds)
virtual void produce(edm::Event &event, const edm::EventSetup &eventSetup)
std::string m_hitsProducerTag
void setMIPs(const ESIntercalibConstants *mips)
void checkCalibrations(const edm::EventSetup &eventSetup)
EcalElectronicsSim * m_APDElectronicsSim
std::string m_EEdigiCollection