Skip to content

Commit

Permalink
Merge pull request #19176 from bsunanda/Run2-hcx134
Browse files Browse the repository at this point in the history
Run2-hcx134 Make use of HcalGeometry for getPosition of Hcal DetIds
  • Loading branch information
davidlange6 authored Jun 11, 2017
2 parents af5a052 + dff8a13 commit e7b534b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Calibration/EcalAlCaRecoProducers/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<use name="FWCore/ParameterSet"/>
<use name="clhep"/>
<use name="Geometry/CaloTopology"/>
<use name="Geometry/HcalTowerAlgo"/>
<use name="Geometry/Records"/>
<use name="DataFormats/TrackReco"/>
<use name="CommonTools/UtilAlgos"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

// Geometry
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
// strip geometry
#include "CalibFormats/SiStripObjects/interface/SiStripRegionCabling.h"
Expand Down Expand Up @@ -471,8 +472,8 @@ void SelectedElectronFEDListProducer<TEle,TCand>::produce(edm::Event & iEvent, c
HBHERecHitCollection::const_iterator itHcalRecHit = hcalRecHitCollection->begin();
for( ; itHcalRecHit != hcalRecHitCollection->end() ; ++itHcalRecHit) {
HcalDetId recHitId(itHcalRecHit->id());
const CaloCellGeometry* cellGeometry = GeometryCalo_->getSubdetectorGeometry(recHitId)->getGeometry(recHitId);
float dR = reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition().eta(),cellGeometry->getPosition().phi());
const HcalGeometry* cellGeometry = (HcalGeometry*)(GeometryCalo_->getSubdetectorGeometry(recHitId));
float dR = reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition(recHitId).eta(),cellGeometry->getPosition(recHitId).phi());
if(dR <= dRHcalRegion_) {
const HcalElectronicsId electronicId = HcalReadoutMap_->lookup(recHitId);
int hitFED = electronicId.dccid() + FEDNumbering::MINHCALFEDID;
Expand Down

0 comments on commit e7b534b

Please sign in to comment.