39 edm::FileInPath hcalfiletmp(
"CalibCalorimetry/CaloMiscalibTools/data/" + hcalfileinpath_);
72 if (!HBHERecHitsHandle.
isValid()) {
73 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
75 HBHERecHits = HBHERecHitsHandle.
product();
79 if (!HORecHitsHandle.
isValid()) {
80 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
82 HORecHits = HORecHitsHandle.
product();
86 if (!HFRecHitsHandle.
isValid()) {
87 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
89 HFRecHits = HFRecHitsHandle.
product();
102 auto RecalibHBHERecHitCollection = std::make_unique<HBHERecHitCollection>();
103 auto RecalibHFRecHitCollection = std::make_unique<HFRecHitCollection>();
104 auto RecalibHORecHitCollection = std::make_unique<HORecHitCollection>();
114 for (itHBHE = HBHERecHits->
begin(); itHBHE != HBHERecHits->
end(); ++itHBHE) {
129 float icalconst = (
mapHcal_.
get().find(itHBHE->id().rawId()))->second;
134 HBHERecHit aHit(itHBHE->id(), itHBHE->energy() * icalconst, itHBHE->time());
136 RecalibHBHERecHitCollection->push_back(aHit);
143 for (itHF = HFRecHits->
begin(); itHF != HFRecHits->
end(); ++itHF) {
160 float icalconst = (
mapHcal_.
get().find(itHF->id().rawId()))->second;
163 HFRecHit aHit(itHF->id(), itHF->energy() * icalconst, itHF->time());
165 RecalibHFRecHitCollection->push_back(aHit);
172 for (itHO = HORecHits->
begin(); itHO != HORecHits->
end(); ++itHO) {
189 float icalconst = (
mapHcal_.
get().find(itHO->id().rawId()))->second;
192 HORecHit aHit(itHO->id(), itHO->energy() * icalconst, itHO->time());
194 RecalibHORecHitCollection->push_back(aHit);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const std::map< uint32_t, float > & get()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~HcalRecHitRecalib() override
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< T >::const_iterator const_iterator
bool parseXMLMiscalibFile(std::string configFile)
HcalRecHitRecalib(const edm::ParameterSet &)
std::string RecalibHFHits_
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string hcalfileinpath_
std::string RecalibHOHits_
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::string RecalibHBHEHits_
const_iterator end() const
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
CaloMiscalibMapHcal mapHcal_
void prefillMap(const HcalTopology &topology)
edm::EDGetTokenT< HORecHitCollection > tok_ho_
const_iterator begin() const