41 edm::FileInPath hcalfiletmp(
"CalibCalorimetry/CaloMiscalibTools/data/"+hcalfileinpath_);
82 if (!HBHERecHitsHandle.isValid()) {
83 LogDebug(
"") <<
"HcalREcHitRecalib: Error! can't get product!" << std::endl;
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;
115 std::auto_ptr< HFRecHitCollection > RecalibHFRecHitCollection(
new HFRecHitCollection );
116 std::auto_ptr< HORecHitCollection > RecalibHORecHitCollection(
new HORecHitCollection );
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);
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()
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_