diff --git a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.cxx b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.cxx index 8606e05e96ccb3e303c73ce2ce18ef870eaa7f25..d9f0d07dcbbba7f9b90e0743811560d6e12466b1 100755 --- a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #include "MuonEventCnvTool.h" @@ -35,8 +35,7 @@ StatusCode Muon::MuonEventCnvTool::initialize() { ATH_CHECK(m_rpcPrdKey.initialize()); ATH_CHECK(m_tgcPrdKey.initialize()); ATH_CHECK(m_mdtPrdKey.initialize()); - ATH_CHECK(detStore()->retrieve(m_muonDetMgr)); - ATH_CHECK(m_DetectorManagerKey.initialize(m_useAlignedGeo)); + ATH_CHECK(m_detectorManagerKey.initialize()); ATH_CHECK(m_cscPrdKey.initialize(!m_cscPrdKey.empty())); // check for layouts without CSCs ATH_CHECK(m_mmPrdKey.initialize(!m_mmPrdKey.empty())); // check for layouts without MicroMegas ATH_CHECK(m_stgcPrdKey.initialize(!m_stgcPrdKey.empty())); // check for layouts without STGCs @@ -166,14 +165,12 @@ const Trk::TrkDetElementBase* Muon::MuonEventCnvTool::getDetectorElement(const I const Trk::TrkDetElementBase* Muon::MuonEventCnvTool::getDetectorElement(const Identifier& id) const { const EventContext& ctx = Gaudi::Hive::currentContext(); const MuonGM::MuonDetectorManager* muonMgr{nullptr}; - if (m_useAlignedGeo) { - SG::ReadCondHandle muonMgrHandle{m_DetectorManagerKey, ctx}; - if (!muonMgrHandle.isValid()) { - ATH_MSG_ERROR("Failed to retrieve the Muon detector manager from the conditions store"); - return nullptr; - } - muonMgr = muonMgrHandle.cptr(); - } else muonMgr = m_muonDetMgr; + SG::ReadCondHandle muonMgrHandle{m_detectorManagerKey, ctx}; + if (!muonMgrHandle.isValid()) { + ATH_MSG_ERROR("Failed to retrieve the Muon detector manager from the conditions store"); + return nullptr; + } + muonMgr = muonMgrHandle.cptr(); const Trk::TrkDetElementBase* detEl = nullptr; // TODO Check that these are in the most likely ordering, for speed. EJWM. diff --git a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.h b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.h index c419553e24d25dee13a8442b9b84a264eb15357f..6b67e94c761dbd1ba87757d80b24cbce6fba907e 100755 --- a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.h +++ b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/src/MuonEventCnvTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONEVENTCNVTOOL_H @@ -74,17 +74,14 @@ namespace Muon { SG::ReadHandleKey<MMPrepDataContainer> m_mmPrdKey{this, "MM_ClusterContainer", "MM_Measurements", "Location for MM PRDs"}; SG::ReadHandleKey<sTgcPrepDataContainer> m_stgcPrdKey{this, "STGC_ClusterContainer", "STGC_Measurements", "Location for sTGC PRDs"}; - const MuonGM::MuonDetectorManager* m_muonDetMgr{nullptr}; - SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_DetectorManagerKey{this, "DetectorManagerKey", "MuonDetectorManager", + SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_detectorManagerKey{this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}; /** If true, search for PRDs manually - i.e. do not rely on ElementLink working @warning This functionality is left in primarily for debugging - will probably be removed in near future.*/ Gaudi::Property<bool> m_manuallyFindPRDs{this, "FindPRDsManually", false, "If true, search for PRDs manually - i.e. do not rely on ElementLink working"}; - Gaudi::Property<bool> m_fixTGCs{this, "FixTGCs", false, "If true, try to fix broken EL, e.g. ATLASRECTS-5151"}; - - Gaudi::Property<bool> m_useAlignedGeo{this, "UseAlignedGeometry", true, "If true the DetectorManager is retrieved from the conditions store instead of the DetectorStore"}; + Gaudi::Property<bool> m_fixTGCs{this, "FixTGCs", false, "If true, try to fix broken EL, e.g. ATLASRECTS-5151"}; }; } // namespace Muon