Description: Producer to miscalibrate (calibrated) Hcal RecHit
Implementation: <Notes on="" implementation>="">
Definition at line 37 of file HcalRecHitRecalib.h.
Definition at line 45 of file HcalRecHitRecalib.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), CaloMiscalibMapHcal::get(), egHLT::errCodes::HBHERecHits, egHLT::errCodes::HFRecHits, iEvent, edm::HandleBase::isValid(), LogDebug, mapHcal_, eostools::move(), edm::Handle< T >::product(), recalibHBHEHits_, recalibHFHits_, recalibHOHits_, refactor_, refactor_mean_, tok_hbhe_, tok_hf_, and tok_ho_.
58 if (!HBHERecHitsHandle.
isValid()) {
59 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
65 if (!HORecHitsHandle.
isValid()) {
66 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
68 HORecHits = HORecHitsHandle.
product();
72 if (!HFRecHitsHandle.
isValid()) {
73 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
79 auto RecalibHBHERecHitCollection = std::make_unique<HBHERecHitCollection>();
80 auto RecalibHFRecHitCollection = std::make_unique<HFRecHitCollection>();
81 auto RecalibHORecHitCollection = std::make_unique<HORecHitCollection>();
87 float icalconst = (
mapHcal_.
get().find(itHBHE->id().rawId()))->second;
90 HBHERecHit aHit(itHBHE->id(), itHBHE->energy() * icalconst, itHBHE->time());
92 RecalibHBHERecHitCollection->push_back(aHit);
100 float icalconst = (
mapHcal_.
get().find(itHF->id().rawId()))->second;
103 HFRecHit aHit(itHF->id(), itHF->energy() * icalconst, itHF->time());
105 RecalibHFRecHitCollection->push_back(aHit);
111 for (itHO = HORecHits->
begin(); itHO != HORecHits->
end(); ++itHO) {
113 float icalconst = (
mapHcal_.
get().find(itHO->id().rawId()))->second;
116 HORecHit aHit(itHO->id(), itHO->energy() * icalconst, itHO->time());
118 RecalibHORecHitCollection->push_back(aHit);
const std::map< uint32_t, float > & get()
T const * product() const
std::vector< T >::const_iterator const_iterator
const std::string recalibHOHits_
const edm::EDGetTokenT< HFRecHitCollection > tok_hf_
const std::string recalibHFHits_
const edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const_iterator begin() const
const_iterator end() const
const std::string recalibHBHEHits_
CaloMiscalibMapHcal mapHcal_
const edm::EDGetTokenT< HORecHitCollection > tok_ho_
const double refactor_mean_