Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run2-hcx134 Make use of HcalGeometry for getPosition of Hcal DetIds #19176

Merged
merged 1 commit into from Jun 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Calibration/EcalAlCaRecoProducers/plugins/BuildFile.xml
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
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