40 edm::FileInPath hcalfiletmp(
"CalibCalorimetry/CaloMiscalibTools/data/"+hcalfileinpath_);
81 if (!HBHERecHitsHandle.isValid()) {
82 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
88 if (!HORecHitsHandle.isValid()) {
89 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
91 HORecHits = HORecHitsHandle.product();
95 if (!HFRecHitsHandle.isValid()) {
96 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
114 std::auto_ptr< HFRecHitCollection > RecalibHFRecHitCollection(
new HFRecHitCollection );
115 std::auto_ptr< HORecHitCollection > RecalibHORecHitCollection(
new HORecHitCollection );
143 float icalconst=(
mapHcal_.
get().find(itHBHE->id().rawId()))->second;
147 HBHERecHit aHit(itHBHE->id(),itHBHE->energy()*icalconst,itHBHE->time());
149 RecalibHBHERecHitCollection->push_back( aHit);
176 float icalconst=(
mapHcal_.
get().find(itHF->id().rawId()))->second;
178 HFRecHit aHit(itHF->id(),itHF->energy()*icalconst,itHF->time());
180 RecalibHFRecHitCollection->push_back( aHit);
189 for (itHO=HORecHits->begin(); itHO!=HORecHits->end(); itHO++) {
207 float icalconst=(
mapHcal_.
get().find(itHO->id().rawId()))->second;
209 HORecHit aHit(itHO->id(),itHO->energy()*icalconst,itHO->time());
211 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()
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_
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string hcalfileinpath_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string RecalibHOHits_
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::string RecalibHBHEHits_
virtual void produce(edm::Event &, const edm::EventSetup &) override
CaloMiscalibMapHcal mapHcal_
void prefillMap(const HcalTopology &topology)
edm::EDGetTokenT< HORecHitCollection > tok_ho_