Skip to content
Snippets Groups Projects
Commit c0eefb76 authored by Edward Moyse's avatar Edward Moyse Committed by Tadej Novak
Browse files

MuonEventCnvTools: Remove detStore retrieve of MuonDetectorManager

Remove m_useAlignedGeo
Minor fix to match standard naming convention
parent ec3e74b4
No related branches found
No related tags found
No related merge requests found
/*
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.
......
/*
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
......
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