74 if ( pEBRecHits.isValid() ) {
77 LogDebug(
"EcalRecHitDebug") <<
"total # EB rechits to be re-calibrated: " <<
EBRecHits->size();
86 if ( pEERecHits.isValid() ) {
89 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits to be re-calibrated: " <<
EERecHits->size();
108 agc = pAgc.product();
110 agc_eb = float(agc->getEBValue());
111 agc_ee = float(agc->getEEValue());
118 ical = pIcal.product();
133 if( icalit!=icalMap.
end() ){
134 icalconst = (*icalit);
136 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EBDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? "
141 float lasercalib = 1;
143 lasercalib = pLaser->getLaserCorrection(
EBDetId(it->id()), evt.
time() );
148 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_eb * icalconst * lasercalib, (*it).time() );
149 EBRecalibRecHits->push_back( aHit );
164 if( icalit!=icalMap.
end() ) {
165 icalconst = (*icalit);
167 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EEDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? ";
171 float lasercalib = 1;
173 lasercalib = pLaser->getLaserCorrection(
EEDetId(it->id()), evt.
time() );
179 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_ee * icalconst * lasercalib, (*it).time() );
180 EERecalibRecHits->push_back( aHit );
184 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EB re-calibrated rechits: " << EBRecalibRecHits->size();
185 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EE re-calibrated rechits: " << EERecalibRecHits->size();
T getParameter(std::string const &) const
std::string EERecalibRecHitCollection_
const self & getMap() const
#define DEFINE_FWK_MODULE(type)
std::vector< T >::const_iterator const_iterator
EcalRecHitAbsAlgo * EBalgo_
edm::InputTag EERecHitCollection_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string EBRecalibRecHitCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
EcalRecHitAbsAlgo * EEalgo_
EcalRecalibRecHitProducer(const edm::ParameterSet &ps)
std::vector< Item >::const_iterator const_iterator
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
edm::InputTag EBRecHitCollection_
const_iterator find(uint32_t rawId) const
const_iterator end() const
edm::Timestamp time() const
~EcalRecalibRecHitProducer()
float EcalIntercalibConstant