10 : ecalHitsProducer_(iConfig.getParameter<
std::
string>(
"ecalRecHitsProducer")),
11 barrelHits_(iConfig.getParameter<
std::
string>(
"barrelHitCollection")),
12 endcapHits_(iConfig.getParameter<
std::
string>(
"endcapHitCollection")),
13 recalibBarrelHits_(iConfig.getParameter<
std::
string>(
"RecalibBarrelHitCollection")),
14 recalibEndcapHits_(iConfig.getParameter<
std::
string>(
"RecalibEndcapHitCollection")),
15 refactor_(iConfig.getUntrackedParameter<double>(
"Refactor", (double)1)),
16 refactor_mean_(iConfig.getUntrackedParameter<double>(
"Refactor_mean", (double)1)),
37 if (!barrelRecHitsHandle.
isValid()) {
38 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
44 if (!endcapRecHitsHandle.
isValid()) {
45 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
51 auto RecalibEBRecHitCollection = std::make_unique<EBRecHitCollection>();
52 auto RecalibEERecHitCollection = std::make_unique<EERecHitCollection>();
65 if (icalit != ical.getMap().end()) {
66 icalconst = (*icalit);
69 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EBDetId(itb->id())
70 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
76 EcalRecHit aHit(itb->id(), itb->energy() * icalconst, itb->time());
78 RecalibEBRecHitCollection->push_back(aHit);
90 if (icalit != ical.getMap().end()) {
91 icalconst = (*icalit);
93 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EEDetId(ite->id())
94 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
101 EcalRecHit aHit(ite->id(), ite->energy() * icalconst, ite->time());
103 RecalibEERecHitCollection->push_back(aHit);
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::EDPutTokenT< EBRecHitCollection > barrelHitsToken_
~EcalRecHitRecalib() override
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHitRecalib(const edm::ParameterSet &)
Log< level::Error, false > LogError
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > intercalibConstsToken_
const edm::EDPutTokenT< EERecHitCollection > endcapHitsToken_
const double refactor_mean_
std::vector< Item >::const_iterator const_iterator
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
void produce(edm::Event &, const edm::EventSetup &) override
float EcalIntercalibConstant