52 if (!barrelRecHitsHandle.isValid()) {
53 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
55 EBRecHits = barrelRecHitsHandle.product();
59 if (!endcapRecHitsHandle.isValid()) {
60 LogDebug(
"") <<
"EcalREcHitMiscalib: Error! can't get product!" << std::endl;
62 EERecHits = endcapRecHitsHandle.product();
66 std::auto_ptr< EBRecHitCollection > RecalibEBRecHitCollection(
new EBRecHitCollection );
67 std::auto_ptr< EERecHitCollection > RecalibEERecHitCollection(
new EERecHitCollection );
86 if( icalit!=ical->getMap().end() ){
87 icalconst = (*icalit);
91 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EBDetId(itb->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? "
97 EcalRecHit aHit(itb->id(),itb->energy()*icalconst,itb->time());
99 RecalibEBRecHitCollection->push_back( aHit);
114 if( icalit!=ical->getMap().end() ){
115 icalconst = (*icalit);
118 edm::LogError(
"EcalRecHitRecalib") <<
"No intercalib const found for xtal " <<
EEDetId(ite->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? "
125 EcalRecHit aHit(ite->id(),ite->energy()*icalconst,ite->time());
127 RecalibEERecHitCollection->push_back( aHit);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const self & getMap() const
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHitRecalib(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string RecalibEndcapHits_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< Item >::const_iterator const_iterator
std::string RecalibBarrelHits_
const_iterator find(uint32_t rawId) const
std::string ecalHitsProducer_
virtual void produce(edm::Event &, const edm::EventSetup &)
float EcalIntercalibConstant