41 edm::FileInPath hcalfiletmp(
"CalibCalorimetry/CaloMiscalibTools/data/"+hcalfileinpath_);
82 if (!HBHERecHitsHandle.
isValid()) {
83 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
85 HBHERecHits = HBHERecHitsHandle.
product();
89 if (!HORecHitsHandle.
isValid()) {
90 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
92 HORecHits = HORecHitsHandle.
product();
96 if (!HFRecHitsHandle.
isValid()) {
97 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
99 HFRecHits = HFRecHitsHandle.
product();
114 auto RecalibHBHERecHitCollection = std::make_unique<HBHERecHitCollection>();
115 auto RecalibHFRecHitCollection = std::make_unique<HFRecHitCollection>();
116 auto RecalibHORecHitCollection = std::make_unique<HORecHitCollection>();
128 for (itHBHE=HBHERecHits->
begin(); itHBHE!=HBHERecHits->
end(); ++itHBHE) {
144 float icalconst=(
mapHcal_.
get().find(itHBHE->id().rawId()))->second;
148 HBHERecHit aHit(itHBHE->id(),itHBHE->energy()*icalconst,itHBHE->time());
150 RecalibHBHERecHitCollection->push_back( aHit);
159 for (itHF=HFRecHits->
begin(); itHF!=HFRecHits->
end(); ++itHF) {
177 float icalconst=(
mapHcal_.
get().find(itHF->id().rawId()))->second;
179 HFRecHit aHit(itHF->id(),itHF->energy()*icalconst,itHF->time());
181 RecalibHFRecHitCollection->push_back( aHit);
190 for (itHO=HORecHits->
begin(); itHO!=HORecHits->
end(); ++itHO) {
208 float icalconst=(
mapHcal_.
get().find(itHO->id().rawId()))->second;
210 HORecHit aHit(itHO->id(),itHO->energy()*icalconst,itHO->time());
212 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< HBHERecHit >::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