diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx index 0c0f8c58498b02fa2a9dcbd7d383d759e1cdf42b..41edf201dda8fe95c5e64e22427eb40f0323c77c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx @@ -100,20 +100,26 @@ namespace Muon { MuonStationIndex::DetectorRegionIndex regionIndex = intersection.layerSurface.regionIndex; MuonStationIndex::LayerIndex layerIndex = intersection.layerSurface.layerIndex; + // get hough data + SG::ReadHandle<MuonLayerHoughTool::HoughDataPerSectorVec> houghDataPerSectorVec {m_houghDataPerSectorVecKey}; + if (!houghDataPerSectorVec.isValid()) { + ATH_MSG_ERROR("Hough data per sector vector not found"); + return; + } // sanity check - if( static_cast<int>(m_layerHoughTool->houghData().size()) <= sector-1 ){ - ATH_MSG_WARNING(" m_layerHoughTool->houghData().size() smaller than sector " << m_layerHoughTool->houghData().size() + if( static_cast<int>(houghDataPerSectorVec->size()) <= sector-1 ){ + ATH_MSG_WARNING(" m_layerHoughTool->houghData().size() smaller than sector " << houghDataPerSectorVec->size() << " sector " << sector ); return; } // get hough maxima in the layer unsigned int sectorLayerHash = MuonStationIndex::sectorLayerHash( regionIndex,layerIndex ); - const MuonLayerHoughTool::HoughDataPerSector& houghDataPerSector = m_layerHoughTool->houghData()[sector-1]; + const MuonLayerHoughTool::HoughDataPerSector& houghDataPerSector = (*houghDataPerSectorVec)[sector-1]; ATH_MSG_DEBUG(" findMdtSegmentsFromHough: sector " << sector << " " << MuonStationIndex::regionName(regionIndex) << " " << MuonStationIndex::layerName(layerIndex) << " sector hash " << sectorLayerHash - << " houghData " << m_layerHoughTool->houghData().size() << " " << houghDataPerSector.maxVec.size()); + << " houghData " << houghDataPerSectorVec->size() << " " << houghDataPerSector.maxVec.size()); // sanity check if( houghDataPerSector.maxVec.size() <= sectorLayerHash ){ diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h index 43a860fd113a87176891d46a5344ddb2c464a0dd..8ca36cf34206957079eeabae875e2f4b5f7cb968 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h @@ -16,6 +16,8 @@ #include "MuonLayerEvent/MuonSystemExtension.h" #include "MuonDetDescrUtils/MuonSectorMapping.h" +#include "MuonHoughPatternTools/MuonLayerHoughTool.h" + class ICscSegmentFinder; namespace Muon { @@ -29,7 +31,6 @@ namespace Muon { class IMuonClusterSegmentFinder; class IMuonClusterSegmentFinderTool; class IMuonRecoValidationTool; - class MuonLayerHoughTool; class MdtDriftCircleOnTrack; class MuonClusterOnTrack; class MuonLayerSegmentFinderTool : virtual public IMuonLayerSegmentFinderTool, public AthAlgTool { @@ -66,6 +67,10 @@ namespace Muon { const std::vector<const MuonClusterOnTrack*>& clusters, std::vector< std::shared_ptr<const Muon::MuonSegment> >& segments ) const; + /** storegate */ + SG::ReadHandleKey<MuonLayerHoughTool::HoughDataPerSectorVec> m_houghDataPerSectorVecKey {this, + "Key_MuonLayerHoughToolHoughDataPerSectorVec", "HoughDataPerSectorVec", "HoughDataPerSectorVec key"}; + /** tool handles */ ToolHandle<MuonIdHelperTool> m_idHelper; ToolHandle<MuonEDMPrinterTool> m_printer;