Skip to content
Snippets Groups Projects
Commit dda99298 authored by Pascal Boeschoten's avatar Pascal Boeschoten
Browse files

MuonLayerSegmentFinderTool: get HoughDataPerSectorVec from SG

parent 7811c771
No related branches found
No related tags found
10 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!24246Making MuonLayerHoughTool thread-safe,!23553WIP: Making MuonLayerHoughTool thread-safe
......@@ -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 ){
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment