43 if (!barrelRecHitsHandle.
isValid()) {
44 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
46 EBRecHits = barrelRecHitsHandle.
product();
50 if (!endcapRecHitsHandle.
isValid()) {
51 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
53 EERecHits = endcapRecHitsHandle.
product();
57 auto RecalibEBRecHitCollection = std::make_unique<EBRecHitCollection>();
58 auto RecalibEERecHitCollection = std::make_unique<EERecHitCollection>();
68 for (itb = EBRecHits->
begin(); itb != EBRecHits->
end(); ++itb) {
74 icalconst = (*icalit);
78 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EBDetId(itb->id())
79 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
85 EcalRecHit aHit(itb->id(), itb->energy() * icalconst, itb->time());
87 RecalibEBRecHitCollection->push_back(aHit);
94 for (ite = EERecHits->
begin(); ite != EERecHits->
end(); ++ite) {
100 icalconst = (*icalit);
103 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EEDetId(ite->id())
104 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
111 EcalRecHit aHit(ite->id(), ite->energy() * icalconst, ite->time());
113 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