From 452654bdfe7760851b43cce790e38044ebbd2fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= Date: Tue, 9 Apr 2019 17:01:15 +0200 Subject: [PATCH] add UseCSC property to MuonDetectorTool and DetDescrCnvSvc --- .../DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h | 1 + .../DetDescrCnvSvc/src/DetDescrCnvSvc.cxx | 10 +++++++--- .../MuonGeoModel/MuonDetectorFactory001.h | 5 ++++- .../MuonGeoModel/MuonGeoModel/MuonDetectorTool.h | 1 + .../MuonGeoModel/src/MuonDetectorFactory001.cxx | 14 ++++++++------ .../MuonGeoModel/src/MuonDetectorTool.cxx | 3 +++ 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h b/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h index 0089037427d..97fe7e2df3b 100755 --- a/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h +++ b/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h @@ -117,6 +117,7 @@ private: BooleanProperty m_compact_ids_only; BooleanProperty m_do_checks; BooleanProperty m_do_neighbours; + BooleanProperty m_useCSC; }; #endif diff --git a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx index f146001eebc..1ed610f8306 100755 --- a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx +++ b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx @@ -38,7 +38,8 @@ DetDescrCnvSvc::DetDescrCnvSvc(const std::string& name, ISvcLocator* svc) m_detElemsfromDetNodes(false), m_compact_ids_only(false), m_do_checks(false), - m_do_neighbours(true) + m_do_neighbours(true), + m_useCSC(true) { declareProperty("DetectorManagers", m_detMgrs); declareProperty("DetectorNodes", m_detNodes ); @@ -52,6 +53,7 @@ DetDescrCnvSvc::DetDescrCnvSvc(const std::string& name, ISvcLocator* svc) declareProperty("CompactIDsOnly", m_compact_ids_only); declareProperty("DoIdChecks", m_do_checks); declareProperty("DoInitNeighbours", m_do_neighbours); + declareProperty("UseCSC", m_useCSC); declareProperty("AtlasIDFileName", m_idDictATLASName); declareProperty("InDetIDFileName", m_idDictInDetName); @@ -197,8 +199,10 @@ DetDescrCnvSvc::initialize() { if (status != StatusCode::SUCCESS) return status; status = addToDetStore(4170, "MDTIDHELPER"); if (status != StatusCode::SUCCESS) return status; - status = addToDetStore(4171, "CSCIDHELPER"); - if (status != StatusCode::SUCCESS) return status; + if (m_useCSC) { + status = addToDetStore(4171, "CSCIDHELPER"); + if (status != StatusCode::SUCCESS) return status; + } status = addToDetStore(4172, "RPCIDHELPER"); if (status != StatusCode::SUCCESS) return status; status = addToDetStore(4173, "TGCIDHELPER"); diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h index 545d3e4e6df..e34c5f99119 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h @@ -62,6 +62,7 @@ public: inline void setMdtDeformationFlag(int mdtDeformationFlag); inline void setMdtAsBuiltParaFlag(int mdtAsBuiltParaFlag); inline void setFineClashFixingFlag(int value); + inline void useCSC(bool value); private: @@ -89,7 +90,8 @@ private: int m_mdtAsBuiltParaFlag; bool m_dumpMemoryBreakDown; int m_enableFineClashFixing; - + bool m_useCSC; + std::vector m_selectedStations; std::vector m_selectedStEta; std::vector m_selectedStPhi; @@ -134,6 +136,7 @@ void MuonDetectorFactory001::setMdtDeformationFlag(int value){m_mdtDeformationFl void MuonDetectorFactory001::setMdtAsBuiltParaFlag(int value){m_mdtAsBuiltParaFlag = value;} void MuonDetectorFactory001::setDumpMemoryBreakDown(bool value){m_dumpMemoryBreakDown = value;} void MuonDetectorFactory001::setFineClashFixingFlag(int value){m_enableFineClashFixing = value;} +void MuonDetectorFactory001::useCSC(bool value){m_useCSC = value;} } // namespace MuonGM diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h index ffb01783b59..bcd716f61ff 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h @@ -58,6 +58,7 @@ private: int m_fillCache_initTime; bool m_dumpMemoryBreakDown; int m_enableFineClashFixing; + bool m_useCSC; int m_stationSelection; std::vector m_selectedStations; std::vector m_selectedStEta; diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx index 539f81744e9..15ff1e6ed5a 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx @@ -87,7 +87,7 @@ namespace MuonGM { : m_includeCutouts(0), m_includeCutoutsBog(0), m_includeCtbBis(0), m_rdb(1), m_controlAlines(0), m_minimalGeoFlag(0), m_controlCscIntAlines(0), m_dumpAlines(false), m_dumpCscIntAlines(false), m_useCscIntAlinesFromGM(true), m_caching(0), m_cacheFillingFlag(0), m_mdtDeformationFlag(0), - m_mdtAsBuiltParaFlag(0), m_dumpMemoryBreakDown(false), m_muon(NULL), m_manager(NULL), + m_mdtAsBuiltParaFlag(0), m_dumpMemoryBreakDown(false), m_useCSC(true), m_muon(NULL), m_manager(NULL), m_pDetStore(pDetStore), m_pRDBAccess(0) { MsgStream log(Athena::getMessageSvc(), "MuonGeoModel"); @@ -210,11 +210,13 @@ namespace MuonGM { if (sc.isFailure() )log<set_tgcIdHelper(tgcidh); - const DataHandle cscidh; - sc = m_pDetStore->retrieve(cscidh,"CSCIDHELPER"); - if (sc.isFailure() )log<set_cscIdHelper(cscidh); + if (m_useCSC) { + const DataHandle cscidh; + sc = m_pDetStore->retrieve(cscidh,"CSCIDHELPER"); + if (sc.isFailure() )log<set_cscIdHelper(cscidh); + } //for nSW const DataHandle stgcidh; diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx index 1a5f0db0f77..dc531aac8c5 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx @@ -41,6 +41,7 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string& m_fillCache_initTime(0), m_dumpMemoryBreakDown(false), m_enableFineClashFixing(0), + m_useCSC(true), m_stationSelection(0), m_controlAlines(111111), m_dumpAlines(false), @@ -71,6 +72,7 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string& declareProperty("DumpMemoryBreakDown" , m_dumpMemoryBreakDown = false); // declareProperty("EnableFineClashFixing" , m_enableFineClashFixing = 0); + declareProperty("UseCSC", m_useCSC); // declareProperty("StationSelection" , m_stationSelection = 0); declareProperty("SelectedStations" , m_selectedStations); @@ -324,6 +326,7 @@ MuonDetectorTool::create( StoreGateSvc* detStore ) theFactory.setMdtDeformationFlag(m_enableMdtDeformations); theFactory.setMdtAsBuiltParaFlag(m_enableMdtAsBuiltParameters); theFactory.setFineClashFixingFlag(m_enableFineClashFixing); + theFactory.useCSC(m_useCSC); if ( m_stationSelection > 0 ) theFactory.setSelection(m_selectedStations, m_selectedStEta, m_selectedStPhi); theFactory.setRDBAccess(access); -- GitLab