52 if (!barrelRecHitsHandle.
isValid()) {
53 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
55 EBRecHits = barrelRecHitsHandle.
product();
59 if (!endcapRecHitsHandle.
isValid()) {
60 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
62 EERecHits = endcapRecHitsHandle.
product();
66 auto RecalibEBRecHitCollection = std::make_unique<EBRecHitCollection>();
67 auto RecalibEERecHitCollection = std::make_unique<EERecHitCollection>();
80 for (itb=EBRecHits->
begin(); itb!=EBRecHits->
end(); ++itb) {
87 icalconst = (*icalit);
91 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EBDetId(itb->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? " 97 EcalRecHit aHit(itb->id(),itb->energy()*icalconst,itb->time());
99 RecalibEBRecHitCollection->push_back( aHit);
108 for (ite=EERecHits->
begin(); ite!=EERecHits->
end(); ++ite) {
115 icalconst = (*icalit);
118 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EEDetId(ite->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? " 125 EcalRecHit aHit(ite->id(),ite->energy()*icalconst,ite->time());
127 RecalibEERecHitCollection->push_back( aHit);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~EcalRecHitRecalib() override
const self & getMap() const
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHitRecalib(const edm::ParameterSet &)
std::string RecalibEndcapHits_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
T const * product() const
std::vector< Item >::const_iterator const_iterator
std::string RecalibBarrelHits_
void produce(edm::Event &, const edm::EventSetup &) override
const_iterator find(uint32_t rawId) const
const_iterator end() const
std::string ecalHitsProducer_
const_iterator begin() const
float EcalIntercalibConstant