96 agc_eb = float(agc->getEBValue());
97 agc_ee = float(agc->getEEValue());
104 ical = pIcal.product();
126 if( icalit!=icalMap.
end() ){
127 icalconst = (*icalit);
129 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EBDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? "
134 float lasercalib = 1;
136 lasercalib = pLaser->getLaserCorrection(
EBDetId(it->id()), evt.
time() );
143 icalconst = 1.0/icalconst;
146 lasercalib = 1.0/lasercalib;
149 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_eb * icalconst * lasercalib, (*it).time() );
150 EBRecalibRecHits->push_back( aHit );
165 if( icalit!=icalMap.
end() ) {
166 icalconst = (*icalit);
168 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EEDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? ";
172 float lasercalib = 1;
174 lasercalib = pLaser->getLaserCorrection(
EEDetId(it->id()), evt.
time() );
182 icalconst = 1.0/icalconst;
185 lasercalib = 1.0/lasercalib;
188 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_ee * icalconst * lasercalib, (*it).time() );
189 EERecalibRecHits->push_back( aHit );
193 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EB re-calibrated rechits: " << EBRecalibRecHits->size();
194 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EE re-calibrated rechits: " << EERecalibRecHits->size();
edm::EDGetTokenT< EERecHitCollection > EERecHitToken_
T getParameter(std::string const &) const
std::string EERecalibRecHitCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const self & getMap() const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHitAbsAlgo * EBalgo_
edm::InputTag EERecHitCollection_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool doIntercalibInverse_
std::string EBRecalibRecHitCollection_
bool doEnergyScaleInverse_
EcalRecHitAbsAlgo * EEalgo_
edm::EDGetTokenT< EBRecHitCollection > EBRecHitToken_
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
bool doLaserCorrectionsInverse_
~EcalRecalibRecHitProducer()
float EcalIntercalibConstant