diff --git a/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx b/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx index da8f9f3754ec021c5273e15469f7f1712b6d72a4..5270a1749ed6991aaf9ca270fddd24e638aa2f10 100644 --- a/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx +++ b/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx @@ -50,7 +50,8 @@ DQTBackgroundMon::DQTBackgroundMon(const std::string & type, DataQualityFatherMonTool(type, name, parent), m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"), m_helperTool("Muon::MuonEDMHelperTool/MuonEDMHelperTool"), - m_idToFixedIdTool("MuonCalib::IdToFixedIdTool"), + m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), + m_idToFixedIdTool("MuonCalib::IdToFixedIdTool/IdToFixedIdTool"), m_doMuons(1), m_doTrigger(1), m_FilledBG(0), diff --git a/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h b/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h index 97fe7e2df3b3f3370d78b7294c93f38056119e79..b13c6358e2038057f64bad24b7c27b7883ad7ca8 100755 --- a/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h +++ b/DetectorDescription/DetDescrCnvSvc/DetDescrCnvSvc/DetDescrCnvSvc.h @@ -117,7 +117,9 @@ private: BooleanProperty m_compact_ids_only; BooleanProperty m_do_checks; BooleanProperty m_do_neighbours; - BooleanProperty m_useCSC; + BooleanProperty m_hasCSC; + BooleanProperty m_hasSTgc; + BooleanProperty m_hasMM; }; #endif diff --git a/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py b/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py index bd28efe427e00b512c96fa5149459594d1be8461..7586090ae879727780a1d7b3780ea4b26bae90f6 100755 --- a/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py +++ b/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py @@ -16,8 +16,10 @@ def _setupDetStoreConfig(): # now configure the Detector Description converter service from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc # Create DetDescrCnvSvc and add to SvcMgr - # Specify primary Identifier dictionary to be used - svcMgr += DetDescrCnvSvc(IdDictName = "IdDictParser/ATLAS_IDS.xml") + # Specify primary Identifier dictionary to be used, and whether CSC/sTgc/MM muon chambers are part of the detector + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags + from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags + svcMgr += DetDescrCnvSvc(IdDictName = "IdDictParser/ATLAS_IDS.xml", HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=(CommonGeometryFlags.Run()=="RUN3"), HasMM=(CommonGeometryFlags.Run()=="RUN3")) #theApp.CreateSvc += [ svcMgr.DetDescrCnvSvc.getFullName() ] svcMgr.EventPersistencySvc.CnvServices += [ "DetDescrCnvSvc" ] diff --git a/DetectorDescription/DetDescrCnvSvc/share/DetStore.py b/DetectorDescription/DetDescrCnvSvc/share/DetStore.py index f232011fb67cf4c938a4b406d74a18089366d4c8..ef0ed3d5ce547f52feb88e1ddeaff88354af3901 100755 --- a/DetectorDescription/DetDescrCnvSvc/share/DetStore.py +++ b/DetectorDescription/DetDescrCnvSvc/share/DetStore.py @@ -23,3 +23,9 @@ EventPersistencySvc.CnvServices = [ "DetDescrCnvSvc" ] # Specify primary Identifier dictionary to be used DetDescrCnvSvc.IdDictName = "IdDictParser/ATLAS_IDS.xml"; +# Specify whether CSC/sTgc/MM muon chambers are part of the detector +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags +DetDescrCnvSvc.HasCSC = MuonGeometryFlags.hasCSC() +DetDescrCnvSvc.HasSTgc = (CommonGeometryFlags.Run()=="RUN3") +DetDescrCnvSvc.HasMM = (CommonGeometryFlags.Run()=="RUN3") diff --git a/DetectorDescription/DetDescrCnvSvc/share/DetStore_joboptions.py b/DetectorDescription/DetDescrCnvSvc/share/DetStore_joboptions.py index d4955980d316cc7e89af8419f41dce7fcf21e0a9..7d96666a84f7e685ddab2e9752ca06f333257485 100755 --- a/DetectorDescription/DetDescrCnvSvc/share/DetStore_joboptions.py +++ b/DetectorDescription/DetDescrCnvSvc/share/DetStore_joboptions.py @@ -16,6 +16,13 @@ EventPersistencySvc.CnvServices += [ "DetDescrCnvSvc" ] # Specify primary Identifier dictionary to be used DetDescrCnvSvc = Service( "DetDescrCnvSvc" ) DetDescrCnvSvc.IdDictName = "IdDictParser/ATLAS_IDS.xml" +# Specify whether CSC/sTgc/MM muon chambers are part of the detector +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags +DetDescrCnvSvc.HasCSC = MuonGeometryFlags.hasCSC() +DetDescrCnvSvc.HasSTgc = (CommonGeometryFlags.Run()=="RUN3") +DetDescrCnvSvc.HasMM = (CommonGeometryFlags.Run()=="RUN3") + # Specify the tag to be used # DetDescrCnvSvc.IdDictGlobalTag = "initial_layout" diff --git a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx index 1ed610f830648bc880124443c60347f74901e455..454ef8a44db9da463509957369bde9e6a37d82e6 100755 --- a/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx +++ b/DetectorDescription/DetDescrCnvSvc/src/DetDescrCnvSvc.cxx @@ -39,7 +39,9 @@ DetDescrCnvSvc::DetDescrCnvSvc(const std::string& name, ISvcLocator* svc) m_compact_ids_only(false), m_do_checks(false), m_do_neighbours(true), - m_useCSC(true) + m_hasCSC(true), + m_hasSTgc(true), + m_hasMM(true) { declareProperty("DetectorManagers", m_detMgrs); declareProperty("DetectorNodes", m_detNodes ); @@ -53,7 +55,9 @@ 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("HasCSC", m_hasCSC); + declareProperty("HasSTgc", m_hasSTgc); + declareProperty("HasMM", m_hasMM); declareProperty("AtlasIDFileName", m_idDictATLASName); declareProperty("InDetIDFileName", m_idDictInDetName); @@ -199,7 +203,7 @@ DetDescrCnvSvc::initialize() { if (status != StatusCode::SUCCESS) return status; status = addToDetStore(4170, "MDTIDHELPER"); if (status != StatusCode::SUCCESS) return status; - if (m_useCSC) { + if (m_hasCSC) { status = addToDetStore(4171, "CSCIDHELPER"); if (status != StatusCode::SUCCESS) return status; } @@ -207,11 +211,14 @@ DetDescrCnvSvc::initialize() { if (status != StatusCode::SUCCESS) return status; status = addToDetStore(4173, "TGCIDHELPER"); if (status != StatusCode::SUCCESS) return status; - // for nSW - status = addToDetStore(4174, "STGCIDHELPER"); - if (status != StatusCode::SUCCESS) return status; - status = addToDetStore(4175, "MMIDHELPER"); - if (status != StatusCode::SUCCESS) return status; + if (m_hasSTgc) { + status = addToDetStore(4174, "STGCIDHELPER"); + if (status != StatusCode::SUCCESS) return status; + } + if (m_hasMM) { + status = addToDetStore(4175, "MMIDHELPER"); + if (status != StatusCode::SUCCESS) return status; + } status = addToDetStore(108133391, "CaloLVL1_ID"); if (status != StatusCode::SUCCESS) return status; status = addToDetStore(123500438, "CaloCell_ID"); diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py index 6057441066edca505d2da0eb08099edefdbf80af..546d6e89f6dd8a45a6005cea07211669370fcf1f 100755 --- a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py +++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py @@ -2,6 +2,8 @@ from AthenaCommon.JobProperties import jobproperties from AthenaCommon.DetFlags import DetFlags +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if ( jobproperties.Global.DetGeo() == "ctbh8" or jobproperties.Global.DetGeo() == "ctbh6" ): print " CTB layout for Muon Spectrometer is not supported anymore" @@ -11,7 +13,7 @@ elif ( DetFlags.detdescr.Muon_on() ): GeoModelSvc = GeoModelSvc() from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool - GeoModelSvc.DetectorTools += [ MuonDetectorTool() ] + GeoModelSvc.DetectorTools += [ MuonDetectorTool(HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=(CommonGeometryFlags.Run()=="RUN3"), HasMM=(CommonGeometryFlags.Run()=="RUN3")) ] GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0 if ( not DetFlags.simulate.any_on() or DetFlags.overlay.any_on() ): GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool" diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGMJobProperties.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGMJobProperties.py new file mode 100755 index 0000000000000000000000000000000000000000..2ca7e13f32b814ee63b968c794f6c1ab0f57dfb3 --- /dev/null +++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGMJobProperties.py @@ -0,0 +1,72 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties +from AtlasGeoModel.CommonGMJobProperties import CommonGMFlags, CommonGeometryFlags + +# ------------------------------------------------------------------------------------- +# Muon geometry flags initialization +# ------------------------------------------------------------------------------------- +class MuonGMFlags(CommonGMFlags, object): + + def __init__(self, geoTag="none"): + super(MuonGMFlags, self).__init__() + + def InitializeGeometryParameters(self): + dbId,dbSwitches,dbParam = self.dbGeomCursor.GetCurrentLeafContent("MuonSwitches") + _layoutName=None + _hasCsc=True + if len(dbId)>0: + key=dbId[0] + if "LAYOUTNAME" in dbParam: _layoutName = dbSwitches[key][dbParam.index("LAYOUTNAME")] + if "HASCSC" in dbParam: _hasCsc = dbSwitches[key][dbParam.index("HASCSC")] + + self.__dict__["Layout"] = (_layoutName if _layoutName else "UNDEFINED") + if _hasCsc == 0: self.__dict__["HasCSC"] = False + else: self.__dict__["HasCSC"] = True + + def dump(self): + print "MuonGMFlags:" + print "Layout = ",self.__dict__["Layout"] + print "HasCSC = ",self.__dict__["HasCSC"] + + +class GeoLayout(JobProperty): + """ geometry layout """ + statusOn = True + allowedTypes = ['str'] + StoredValue = 'UNDEFINED' + +class hasCSC(JobProperty): + """ does the layout contain CSC chambers? """ + statusOn = True + allowedTypes = ['bool'] + StoredValue = True + + +class MuonGeometryFlags_JobProperties(JobPropertyContainer): + """ The geometry flag/job property container """ + + def __init__(self, context=""): + JobPropertyContainer.__init__(self,context) + return + def setupValuesFromDB(self,geoTagName="none"): + MuonGeoFlags = MuonGMFlags(geoTagName) + self.GeoLayout.set_Value_and_Lock(MuonGeoFlags.getValue("Layout")) + self.hasCSC.set_Value_and_Lock(MuonGeoFlags.getValue("HasCSC")) + + def reset(self,geoTagName="none"): + self.GeoLayout.unlock() + self.hasCSC.unlock() + + def dump(self): + print "Layout = ", self.GeoLayout() + print "HasCSC = ", self.hasCSC() + + +jobproperties.add_Container(MuonGeometryFlags_JobProperties) +jobproperties.MuonGeometryFlags_JobProperties.add_JobProperty(GeoLayout) +jobproperties.MuonGeometryFlags_JobProperties.add_JobProperty(hasCSC) + +MuonGeometryFlags = jobproperties.MuonGeometryFlags_JobProperties +MuonGeometryFlags.setupValuesFromDB() + diff --git a/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py b/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py index cbb673e4dd4fd7c3b74dadb17f7a7f6b3318fe9d..461afb417bc263220e093f293460cfaeff20ea4c 100755 --- a/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py +++ b/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py @@ -8,6 +8,9 @@ from AthenaCommon.SystemOfUnits import * # loads MeV etc... # import the base class from RegionSelector.RegionSelectorConf import RegSelSvc +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags + class RegSelSvcDefault ( RegSelSvc ) : def __init__(self, name="RegSelSvcDefault"): @@ -120,21 +123,21 @@ class RegSelSvcDefault ( RegSelSvc ) : ToolSvc += tgcTable mlog.debug(tgcTable) - if DetFlags.detdescr.CSC_on(): + if MuonGeometryFlags.hasCSC() and DetFlags.detdescr.CSC_on(): from MuonRegionSelector.MuonRegionSelectorConf import CSC_RegionSelectorTable cscTable = CSC_RegionSelectorTable(name = "CSC_RegionSelectorTable") ToolSvc += cscTable mlog.debug(cscTable) - if DetFlags.detdescr.Micromegas_on(): + if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.Micromegas_on(): from MuonRegionSelector.MuonRegionSelectorConf import MM_RegionSelectorTable mmTable = MM_RegionSelectorTable(name = "MM_RegionSelectorTable") ToolSvc += mmTable mlog.debug(mmTable) - if DetFlags.detdescr.sTGC_on(): + if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.sTGC_on(): from MuonRegionSelector.MuonRegionSelectorConf import sTGC_RegionSelectorTable stgcTable = sTGC_RegionSelectorTable(name = "sTGC_RegionSelectorTable") @@ -214,15 +217,15 @@ class RegSelSvcDefault ( RegSelSvc ) : self.enableTGC = True else: self.enableTGC = False - if DetFlags.detdescr.CSC_on(): + if MuonGeometryFlags.hasCSC() and DetFlags.detdescr.CSC_on(): self.enableCSC = True else: self.enableCSC = False - if DetFlags.detdescr.sTGC_on(): + if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.sTGC_on(): self.enablesTGC = True else: self.enablesTGC = False - if DetFlags.detdescr.Micromegas_on(): + if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.Micromegas_on(): self.enableMM = True else: self.enableMM = False diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/jobOptions_MuonRDOToDigit.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/jobOptions_MuonRDOToDigit.py index 6f2a834fc974948bc5b2c3a712b41dffcf43e5d1..7e1b9c97eb7c64f40bf9886c8f2bc0d6191a8ed9 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/jobOptions_MuonRDOToDigit.py +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/share/jobOptions_MuonRDOToDigit.py @@ -2,7 +2,7 @@ include.block ("MuonByteStreamCnvTest/jobOptions_MuonRDOToDigit.py") from AthenaCommon.CfgGetter import getPublicTool -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags ## configure the tool @@ -11,9 +11,9 @@ MuonRdoToMuonDigitTool = MuonRdoToMuonDigitTool ( DecodeMdtRDO = True, DecodeRpcRDO = True, DecodeTgcRDO = True, - DecodeCscRDO = muonRecFlags.doCSCs() ) + DecodeCscRDO = MuonGeometryFlags.hasCSC() ) -if muonRecFlags.doCSCs(): MuonRdoToMuonDigitTool.cscCalibTool = getPublicTool("CscCalibTool") +if MuonGeometryFlags.hasCSC(): MuonRdoToMuonDigitTool.cscCalibTool = getPublicTool("CscCalibTool") ToolSvc += MuonRdoToMuonDigitTool diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonLayerHashProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonLayerHashProviderTool.cxx index 746ee9accf82a2667708dd265b35cd211eb74ab9..90ed9599bfa15b43d7aedcf7194c5612acf7d81e 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonLayerHashProviderTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonLayerHashProviderTool.cxx @@ -130,13 +130,11 @@ namespace Muon { << " technologies " << m_ntechnologies << " sectorLayers " << MuonStationIndex::sectorLayerHashMax() ); // add technologies - insertTechnology(m_idHelper->mdtIdHelper()); - insertTechnology(m_idHelper->rpcIdHelper()); + if (&(m_idHelper->mdtIdHelper())) insertTechnology(m_idHelper->mdtIdHelper()); + if (&(m_idHelper->rpcIdHelper())) insertTechnology(m_idHelper->rpcIdHelper()); if (&(m_idHelper->cscIdHelper())) insertTechnology(m_idHelper->cscIdHelper()); - if( m_ntechnologies > 4 ){ - insertTechnology(m_idHelper->mmIdHelper()); - insertTechnology(m_idHelper->stgcIdHelper()); - } + if (&(m_idHelper->mmIdHelper())) insertTechnology(m_idHelper->mmIdHelper()); + if (&(m_idHelper->stgcIdHelper())) insertTechnology(m_idHelper->stgcIdHelper()); if( !insertTgcs() ) return false; diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/share/MuonRegionSelectorTable_jobOptions.py b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/share/MuonRegionSelectorTable_jobOptions.py index 6935c3d90c57d1dccd9db872593e6eb18e3d2a45..02cc49694e4091b02511887fb5d5a55b968f1532 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/share/MuonRegionSelectorTable_jobOptions.py +++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/share/MuonRegionSelectorTable_jobOptions.py @@ -14,6 +14,9 @@ topSequence = AlgSequence() # get ToolSvc ToolSvc = Service( "ToolSvc" ) +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags + #### RPC #### if DetFlags.detdescr.RPC_on(): @@ -40,7 +43,7 @@ else : #### CSC #### -if DetFlags.detdescr.CSC_on(): +if MuonGeometryFlags.hasCSC() and DetFlags.detdescr.CSC_on(): from MuonRegionSelector.MuonRegionSelectorConf import CSC_RegionSelectorTable CSC_RegionSelectorTable = CSC_RegionSelectorTable(name = "CSC_RegionSelectorTable") @@ -63,7 +66,7 @@ else : #### New small wheel #### -if DetFlags.detdescr.Micromegas_on(): +if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.Micromegas_on(): from MuonRegionSelector.MuonRegionSelectorConf import MM_RegionSelectorTable MM_RegionSelectorTable = MM_RegionSelectorTable(name = "MM_RegionSelectorTable") @@ -73,7 +76,7 @@ else : MM_RegionSelectorTable = None -if DetFlags.detdescr.sTGC_on(): +if (CommonGeometryFlags.Run()=="RUN3") and DetFlags.detdescr.sTGC_on(): from MuonRegionSelector.MuonRegionSelectorConf import sTGC_RegionSelectorTable sTGC_RegionSelectorTable = sTGC_RegionSelectorTable(name = "sTGC_RegionSelectorTable") diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/share/jobOptions.NSW_Sim.py b/MuonSpectrometer/MuonG4/NSW_Sim/share/jobOptions.NSW_Sim.py index 87cc3a9368c9d628645b836b545068d02fd98a95..d6b71e33ab454df3eff46c5e7c313cdeb8d836f4 100644 --- a/MuonSpectrometer/MuonG4/NSW_Sim/share/jobOptions.NSW_Sim.py +++ b/MuonSpectrometer/MuonG4/NSW_Sim/share/jobOptions.NSW_Sim.py @@ -59,7 +59,6 @@ simFlags.EventFilter.set_On() ## No magnetic field #simFlags.MagneticField.set_Off() -simFlags.SimulateNewSmallWheel=True ## Register callback functions at various init stages #def test_preInit(): diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h index e34c5f99119d91213e3689f9a7bb6886c8ab199f..a3b74d30e7955ffb09dbec03ceb05cafa1b470e7 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h @@ -62,7 +62,9 @@ public: inline void setMdtDeformationFlag(int mdtDeformationFlag); inline void setMdtAsBuiltParaFlag(int mdtAsBuiltParaFlag); inline void setFineClashFixingFlag(int value); - inline void useCSC(bool value); + inline void hasCSC(bool value); + inline void hasSTgc(bool value); + inline void hasMM(bool value); private: @@ -90,7 +92,9 @@ private: int m_mdtAsBuiltParaFlag; bool m_dumpMemoryBreakDown; int m_enableFineClashFixing; - bool m_useCSC; + bool m_hasCSC; + bool m_hasSTgc; + bool m_hasMM; std::vector<std::string> m_selectedStations; std::vector<int> m_selectedStEta; @@ -136,7 +140,9 @@ 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;} +void MuonDetectorFactory001::hasCSC(bool value){m_hasCSC = value;} +void MuonDetectorFactory001::hasSTgc(bool value){m_hasSTgc = value;} +void MuonDetectorFactory001::hasMM(bool value){m_hasMM = value;} } // namespace MuonGM diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h index bcd716f61ff18bdca4e0033d54f8ac0f542f5a02..b1e89b87e9f63c829e9ce485662a03cb3abd906c 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h @@ -58,7 +58,9 @@ private: int m_fillCache_initTime; bool m_dumpMemoryBreakDown; int m_enableFineClashFixing; - bool m_useCSC; + bool m_hasCSC; + bool m_hasSTgc; + bool m_hasMM; int m_stationSelection; std::vector<std::string> m_selectedStations; std::vector<int> m_selectedStEta; diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx index 15ff1e6ed5a01238a03c0e57ff03d35e9c24f255..b5692065003de863e8be553a02b2be46cc047b8b 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_useCSC(true), m_muon(NULL), m_manager(NULL), + m_mdtAsBuiltParaFlag(0), m_dumpMemoryBreakDown(false), m_hasCSC(true), m_hasSTgc(true), m_hasMM(true), m_muon(NULL), m_manager(NULL), m_pDetStore(pDetStore), m_pRDBAccess(0) { MsgStream log(Athena::getMessageSvc(), "MuonGeoModel"); @@ -210,27 +210,27 @@ namespace MuonGM { if (sc.isFailure() )log<<MSG::ERROR<<" not found TGC "<<endmsg; else log<<MSG::INFO<<"TGCIDHELPER retrieved from DetStore"<<endmsg; m_manager->set_tgcIdHelper(tgcidh); - if (m_useCSC) { + if (m_hasCSC) { const DataHandle<CscIdHelper> cscidh; sc = m_pDetStore->retrieve(cscidh,"CSCIDHELPER"); if (sc.isFailure() )log<<MSG::ERROR<<" not found CSC "<<endmsg; else log<<MSG::INFO<<"CSCIDHELPER retrieved from DetStore"<<endmsg; m_manager->set_cscIdHelper(cscidh); } - - //for nSW - const DataHandle<sTgcIdHelper> stgcidh; - sc = m_pDetStore->retrieve(stgcidh,"STGCIDHELPER"); - if (sc.isFailure() )log<<MSG::ERROR<<" not found sTGC "<<endmsg; - else log<<MSG::INFO<<"STGCIDHELPER retrieved from DetStore"<<endmsg; - m_manager->set_stgcIdHelper(stgcidh); - - const DataHandle<MmIdHelper> mmidh; - sc = m_pDetStore->retrieve(mmidh,"MMIDHELPER"); - if (sc.isFailure() )log<<MSG::ERROR<<" not found MicroMegas "<<endmsg; - else log<<MSG::INFO<<"MMIDHELPER retrieved from DetStore"<<endmsg; - m_manager->set_mmIdHelper(mmidh); - + if (m_hasSTgc) { + const DataHandle<sTgcIdHelper> stgcidh; + sc = m_pDetStore->retrieve(stgcidh,"STGCIDHELPER"); + if (sc.isFailure() )log<<MSG::ERROR<<" not found sTGC "<<endmsg; + else log<<MSG::INFO<<"STGCIDHELPER retrieved from DetStore"<<endmsg; + m_manager->set_stgcIdHelper(stgcidh); + } + if (m_hasMM) { + const DataHandle<MmIdHelper> mmidh; + sc = m_pDetStore->retrieve(mmidh,"MMIDHELPER"); + if (sc.isFailure() )log<<MSG::ERROR<<" not found MicroMegas "<<endmsg; + else log<<MSG::INFO<<"MMIDHELPER retrieved from DetStore"<<endmsg; + m_manager->set_mmIdHelper(mmidh); + } // } diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx index dc531aac8c599344ce708e53b956c7fd6bf890b1..84e38b63b1f3383020680e1bde3fdeaff4b23951 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx @@ -41,7 +41,9 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string& m_fillCache_initTime(0), m_dumpMemoryBreakDown(false), m_enableFineClashFixing(0), - m_useCSC(true), + m_hasCSC(true), + m_hasSTgc(true), + m_hasMM(true), m_stationSelection(0), m_controlAlines(111111), m_dumpAlines(false), @@ -72,7 +74,9 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string& declareProperty("DumpMemoryBreakDown" , m_dumpMemoryBreakDown = false); // declareProperty("EnableFineClashFixing" , m_enableFineClashFixing = 0); - declareProperty("UseCSC", m_useCSC); + declareProperty("HasCSC", m_hasCSC); + declareProperty("HasSTgc", m_hasSTgc); + declareProperty("HasMM", m_hasMM); // declareProperty("StationSelection" , m_stationSelection = 0); declareProperty("SelectedStations" , m_selectedStations); @@ -326,7 +330,9 @@ MuonDetectorTool::create( StoreGateSvc* detStore ) theFactory.setMdtDeformationFlag(m_enableMdtDeformations); theFactory.setMdtAsBuiltParaFlag(m_enableMdtAsBuiltParameters); theFactory.setFineClashFixingFlag(m_enableFineClashFixing); - theFactory.useCSC(m_useCSC); + theFactory.hasCSC(m_hasCSC); + theFactory.hasSTgc(m_hasSTgc); + theFactory.hasMM(m_hasMM); if ( m_stationSelection > 0 ) theFactory.setSelection(m_selectedStations, m_selectedStEta, m_selectedStPhi); theFactory.setRDBAccess(access); diff --git a/MuonSpectrometer/MuonGeoModelTest/share/jobOptions.NSW_SimGeantinos.py b/MuonSpectrometer/MuonGeoModelTest/share/jobOptions.NSW_SimGeantinos.py index a531a57025951ff77ede629d0b4b856d1fb24675..f526c402851349f35650524e468b9a756034683c 100644 --- a/MuonSpectrometer/MuonGeoModelTest/share/jobOptions.NSW_SimGeantinos.py +++ b/MuonSpectrometer/MuonGeoModelTest/share/jobOptions.NSW_SimGeantinos.py @@ -49,7 +49,6 @@ simFlags.EventFilter.set_Off() ## No magnetic field #simFlags.MagneticField.set_Off() -simFlags.SimulateNewSmallWheel=True ## Register callback functions at various init stages #def test_preInit(): diff --git a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperTool.h b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperTool.h index 9d1e3c8d092fa3926f9d2b7c15ceb17185fcd947..5d4290ea33903daf1effdb9c24ca743f2aca08c9 100644 --- a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperTool.h +++ b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperTool.h @@ -160,7 +160,9 @@ namespace Muon { /** @brief return sector number 1-16, odd=large, even=small */ int sector( const Identifier& id ) const; - bool UseCSC() const; + bool HasCSC() const; + bool HasSTgc() const; + bool HasMM() const; private: const RpcIdHelper* m_rpcIdHelper; @@ -169,7 +171,9 @@ namespace Muon { const MdtIdHelper* m_mdtIdHelper; const MmIdHelper* m_mmIdHelper; const sTgcIdHelper* m_stgcIdHelper; - bool m_useCSC; + bool m_hasCSC; + bool m_hasSTgc; + bool m_hasMM; struct StationNameData { std::string stationName; diff --git a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperTool.cxx b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperTool.cxx index d1a4668d6a7ae3879b8a94eae47cc81b370937f1..a760be7f604c3c41b0012e86e94c4cd6dae93d79 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperTool.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperTool.cxx @@ -11,10 +11,12 @@ namespace Muon { MuonIdHelperTool::MuonIdHelperTool(const std::string& ty,const std::string& na,const IInterface* pa) - : AthAlgTool(ty,na,pa), m_useCSC(true) + : AthAlgTool(ty,na,pa), m_hasCSC(true), m_hasSTgc(true), m_hasMM(true) { declareInterface<MuonIdHelperTool>(this); - declareProperty("UseCSC", m_useCSC); + declareProperty("HasCSC", m_hasCSC); + declareProperty("HasSTgc", m_hasSTgc); + declareProperty("HasMM", m_hasMM); } @@ -28,7 +30,7 @@ namespace Muon { return StatusCode::FAILURE; } - if (m_useCSC) { + if (m_hasCSC) { if ( detStore()->retrieve( m_cscIdHelper ).isFailure() ) { ATH_MSG_ERROR(" Cannot retrieve CscIdHelper "); return StatusCode::FAILURE; @@ -42,14 +44,18 @@ namespace Muon { ATH_MSG_ERROR(" Cannot retrieve TgcIdHelper "); return StatusCode::FAILURE; } - if ( detStore()->retrieve( m_stgcIdHelper ).isFailure() ) { - ATH_MSG_ERROR(" Cannot retrieve sTgcIdHelper "); - return StatusCode::FAILURE; - } - if ( detStore()->retrieve( m_mmIdHelper ).isFailure() ) { - ATH_MSG_ERROR(" Cannot retrieve MmIdHelper "); - return StatusCode::FAILURE; - } + if (m_hasSTgc) { + if ( detStore()->retrieve( m_stgcIdHelper ).isFailure() ) { + ATH_MSG_ERROR(" Cannot retrieve sTgcIdHelper "); + return StatusCode::FAILURE; + } + } else m_stgcIdHelper = nullptr; + if (m_hasMM) { + if ( detStore()->retrieve( m_mmIdHelper ).isFailure() ) { + ATH_MSG_ERROR(" Cannot retrieve MmIdHelper "); + return StatusCode::FAILURE; + } + } else m_mmIdHelper = nullptr; if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << " Technologies: size " << m_mdtIdHelper->technologyNameIndexMax(); for( int tech=0; tech<=m_mdtIdHelper->technologyNameIndexMax();++tech ){ @@ -144,19 +150,19 @@ namespace Muon { } int MuonIdHelperTool::gasGap( const Identifier& id ) const { - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { return m_rpcIdHelper->gasGap(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { return m_tgcIdHelper->gasGap(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ return m_cscIdHelper->wireLayer(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ return m_stgcIdHelper->gasGap(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ return m_mmIdHelper->gasGap(id); }else{ return m_mdtIdHelper->channel(id); @@ -169,10 +175,12 @@ namespace Muon { } bool MuonIdHelperTool::isMdt( const Identifier& id ) const { + if (!m_mdtIdHelper) return false; return m_mdtIdHelper->is_mdt(id); } bool MuonIdHelperTool::isMM( const Identifier& id ) const { + if (!m_mmIdHelper) return false; return m_mmIdHelper->is_mm(id); } @@ -182,26 +190,29 @@ namespace Muon { } bool MuonIdHelperTool::isRpc( const Identifier& id ) const { + if (!m_rpcIdHelper) return false; return m_rpcIdHelper->is_rpc(id); } bool MuonIdHelperTool::isTgc( const Identifier& id ) const { + if (!m_tgcIdHelper) return false; return m_tgcIdHelper->is_tgc(id); } bool MuonIdHelperTool::issTgc( const Identifier& id ) const { + if (!m_stgcIdHelper) return false; return m_stgcIdHelper->is_stgc(id); } bool MuonIdHelperTool::measuresPhi( const Identifier& id ) const { - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { return m_rpcIdHelper->measuresPhi(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { return m_tgcIdHelper->measuresPhi(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ return m_cscIdHelper->measuresPhi(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ return m_stgcIdHelper->measuresPhi(id); } // MM and MDTs only measure eta @@ -210,8 +221,8 @@ namespace Muon { bool MuonIdHelperTool::isTrigger( const Identifier& id ) const { - if( m_rpcIdHelper->is_rpc(id) ) return true; - else if( m_tgcIdHelper->is_tgc(id) ) return true; + if( isRpc(id) ) return true; + else if( isTgc(id) ) return true; return false; } @@ -295,19 +306,19 @@ namespace Muon { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; sout << toStringGasGap(id); - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << (m_rpcIdHelper->measuresPhi(id) ? " phi" : " eta") << " channel " << std::setw(2) << m_rpcIdHelper->channel(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << (m_tgcIdHelper->measuresPhi(id) ? " phi" : " eta") << " channel " << std::setw(2) << m_tgcIdHelper->channel(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << (m_cscIdHelper->measuresPhi(id) ? " phi" : " eta") << " channel " << std::setw(2) << m_cscIdHelper->channel(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ int channelType = m_stgcIdHelper->channelType(id); if( channelType == 0 ) sout << " pad "; else if( channelType == 1 ) sout << " eta "; else if( channelType == 2 ) sout << " phi "; sout << " channel " << std::setw(2) << m_stgcIdHelper->channel(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << " channel " << std::setw(2) << m_mmIdHelper->channel(id); } return sout.str(); @@ -316,15 +327,15 @@ namespace Muon { std::string MuonIdHelperTool::toStringTech( const Identifier& id ) const { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << m_rpcIdHelper->technologyString( m_rpcIdHelper->technology(id) ); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << m_tgcIdHelper->technologyString( m_tgcIdHelper->technology(id) ); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << m_cscIdHelper->technologyString( m_cscIdHelper->technology(id) ); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ sout << m_stgcIdHelper->technologyString( m_stgcIdHelper->technology(id) ); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << m_mmIdHelper->technologyString( m_mmIdHelper->technology(id) ); }else{ sout << m_mdtIdHelper->technologyString( m_mdtIdHelper->technology(id) ); @@ -340,27 +351,27 @@ namespace Muon { std::string MuonIdHelperTool::toStringStation( const Identifier& id ) const { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << m_rpcIdHelper->technologyString( m_rpcIdHelper->technology(id) ) << " " << m_rpcIdHelper->stationNameString( m_rpcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_rpcIdHelper->stationEta(id) << " phi " << std::setw(2) << m_rpcIdHelper->stationPhi(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << m_tgcIdHelper->technologyString( m_tgcIdHelper->technology(id) ) << " " << m_tgcIdHelper->stationNameString( m_tgcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_tgcIdHelper->stationEta(id) << " phi " << std::setw(2) << m_tgcIdHelper->stationPhi(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << m_cscIdHelper->technologyString( m_cscIdHelper->technology(id) ) << " " << m_cscIdHelper->stationNameString( m_cscIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_cscIdHelper->stationEta(id) << " phi " << std::setw(2) << m_cscIdHelper->stationPhi(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << m_mmIdHelper->technologyString( m_mmIdHelper->technology(id) ) << " " << m_mmIdHelper->stationNameString( m_mmIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_mmIdHelper->stationEta(id) << " phi " << std::setw(2) << m_mmIdHelper->stationPhi(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ sout << m_stgcIdHelper->technologyString( m_stgcIdHelper->technology(id) ) << " " << m_stgcIdHelper->stationNameString( m_stgcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_stgcIdHelper->stationEta(id) @@ -377,28 +388,28 @@ namespace Muon { std::string MuonIdHelperTool::toStringChamber( const Identifier& id ) const { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << m_rpcIdHelper->technologyString( m_rpcIdHelper->technology(id) ) << " " << m_rpcIdHelper->stationNameString( m_rpcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_rpcIdHelper->stationEta(id) << " phi " << std::setw(2) << m_rpcIdHelper->stationPhi(id) << " dbR " << m_rpcIdHelper->doubletR(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << m_tgcIdHelper->technologyString( m_tgcIdHelper->technology(id) ) << " " << m_tgcIdHelper->stationNameString( m_tgcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_tgcIdHelper->stationEta(id) << " phi " << std::setw(2) << m_tgcIdHelper->stationPhi(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << m_cscIdHelper->technologyString( m_cscIdHelper->technology(id) ) << " " << m_cscIdHelper->stationNameString( m_cscIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_cscIdHelper->stationEta(id) << " phi " << std::setw(2) << m_cscIdHelper->stationPhi(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ sout << m_stgcIdHelper->technologyString( m_stgcIdHelper->technology(id) ) << " " << m_stgcIdHelper->stationNameString( m_stgcIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_stgcIdHelper->stationEta(id) << " phi " << std::setw(2) << m_stgcIdHelper->stationPhi(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << m_mmIdHelper->technologyString( m_mmIdHelper->technology(id) ) << " " << m_mmIdHelper->stationNameString( m_mmIdHelper->stationName(id) ) << " eta " << std::setw(2) << m_mmIdHelper->stationEta(id) @@ -415,19 +426,19 @@ namespace Muon { std::string MuonIdHelperTool::toStringDetEl( const Identifier& id ) const { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << toStringChamber(id) << " dbZ " << m_rpcIdHelper->doubletZ(id) << " dbPhi " << m_rpcIdHelper->doubletPhi(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << toStringChamber(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << toStringChamber(id) << " chlay " << m_cscIdHelper->chamberLayer(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << toStringChamber(id) << " chlay " << m_mmIdHelper->multilayer(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ sout << toStringChamber(id) << " chlay " << m_stgcIdHelper->multilayer(id); }else{ @@ -440,19 +451,19 @@ namespace Muon { std::string MuonIdHelperTool::toStringGasGap( const Identifier& id ) const { std::ostringstream sout; if( !id.is_valid() ) return " Invalid Identifier"; - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { sout << toStringDetEl(id) << " gap " << m_rpcIdHelper->gasGap(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { sout << toStringDetEl(id) << " gap " << m_tgcIdHelper->gasGap(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ sout << toStringDetEl(id) << " lay " << m_cscIdHelper->wireLayer(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ sout << toStringDetEl(id) << " lay " << m_stgcIdHelper->gasGap(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ sout << toStringDetEl(id) << " lay " << m_mmIdHelper->gasGap(id); }else{ @@ -465,23 +476,23 @@ namespace Muon { Identifier MuonIdHelperTool::chamberId( const Identifier& id) const { Identifier chId; // use phi hits on segment - if( m_tgcIdHelper->is_tgc(id) ){ + if( isTgc(id) ){ chId = m_tgcIdHelper->elementID(id); - }else if( m_rpcIdHelper->is_rpc(id) ){ + }else if( isRpc(id) ){ chId = m_rpcIdHelper->elementID(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ chId = m_mmIdHelper->elementID(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ chId = m_stgcIdHelper->elementID(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ Identifier elId = m_cscIdHelper->elementID(id); chId = m_cscIdHelper->channelID(elId,2,1,1,1); @@ -499,26 +510,26 @@ namespace Muon { Identifier detElId; // use phi hits on segment - if( m_tgcIdHelper->is_tgc(id) ){ + if( isTgc(id) ){ detElId = m_tgcIdHelper->elementID(id); - }else if( m_rpcIdHelper->is_rpc(id) ){ + }else if( isRpc(id) ){ Identifier elId = m_rpcIdHelper->elementID(id); int doubZ = m_rpcIdHelper->doubletZ(id); int doubPhi = m_rpcIdHelper->doubletPhi(id); detElId = m_rpcIdHelper->channelID(elId,doubZ,doubPhi,1,0,1); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ Identifier elId = m_cscIdHelper->elementID(id); detElId = m_cscIdHelper->channelID(elId,2,1,1,1); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ Identifier elId = m_stgcIdHelper->elementID(id); detElId = m_stgcIdHelper->channelID(elId,m_stgcIdHelper->multilayer(id),1,1,1); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ Identifier elId = m_mmIdHelper->elementID(id); detElId = m_mmIdHelper->channelID(elId,m_mmIdHelper->multilayer(id),1,1); @@ -532,14 +543,14 @@ namespace Muon { Identifier MuonIdHelperTool::layerId( const Identifier& id ) const { Identifier layerId; // use phi hits on segment - if( m_tgcIdHelper->is_tgc(id) ){ + if( isTgc(id) ){ Identifier elId = m_tgcIdHelper->elementID(id); int gasGap = m_tgcIdHelper->gasGap(id); int measuresPhi = m_tgcIdHelper->measuresPhi(id); layerId = m_tgcIdHelper->channelID(elId,gasGap,measuresPhi,1); - }else if( m_rpcIdHelper->is_rpc(id) ){ + }else if( isRpc(id) ){ Identifier elId = m_rpcIdHelper->elementID(id); int doubZ = m_rpcIdHelper->doubletZ(id); @@ -548,20 +559,20 @@ namespace Muon { int measuresPhi = m_rpcIdHelper->measuresPhi(id); layerId = m_rpcIdHelper->channelID(elId,doubZ,doubPhi,gasGap,measuresPhi,1); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ Identifier elId = m_cscIdHelper->elementID(id); int chLayer = m_cscIdHelper->chamberLayer(id); int wireLayer = m_cscIdHelper->wireLayer(id); int measuresPhi = m_cscIdHelper->measuresPhi(id); layerId = m_cscIdHelper->channelID(elId,chLayer,wireLayer,measuresPhi,1); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ Identifier elId = m_mmIdHelper->elementID(id); int chLayer = m_mmIdHelper->multilayer(id); int wireLayer = m_mmIdHelper->gasGap(id); layerId = m_mmIdHelper->channelID(elId,chLayer,wireLayer,1); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ Identifier elId = m_stgcIdHelper->elementID(id); int chLayer = m_stgcIdHelper->multilayer(id); int wireLayer = m_stgcIdHelper->gasGap(id); @@ -577,13 +588,13 @@ namespace Muon { Identifier gasGapId; // use phi hits on segment - if( m_tgcIdHelper->is_tgc(id) ){ + if( isTgc(id) ){ Identifier elId = m_tgcIdHelper->elementID(id); int gasGap = m_tgcIdHelper->gasGap(id); gasGapId = m_tgcIdHelper->channelID(elId,gasGap,0,1); - }else if( m_rpcIdHelper->is_rpc(id) ){ + }else if( isRpc(id) ){ Identifier elId = m_rpcIdHelper->elementID(id); int doubZ = m_rpcIdHelper->doubletZ(id); @@ -591,18 +602,18 @@ namespace Muon { int gasGap = m_rpcIdHelper->gasGap(id); gasGapId = m_rpcIdHelper->channelID(elId,doubZ,doubPhi,gasGap,0,1); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ Identifier elId = m_cscIdHelper->elementID(id); int chLayer = m_cscIdHelper->chamberLayer(id); int wireLayer = m_cscIdHelper->wireLayer(id); gasGapId = m_cscIdHelper->channelID(elId,chLayer,wireLayer,1,1); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ Identifier elId = m_mmIdHelper->elementID(id); int chLayer = m_mmIdHelper->multilayer(id); int wireLayer = m_mmIdHelper->gasGap(id); gasGapId = m_mmIdHelper->channelID(elId,chLayer,wireLayer,1); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ Identifier elId = m_stgcIdHelper->elementID(id); int chLayer = m_stgcIdHelper->multilayer(id); int wireLayer = m_stgcIdHelper->gasGap(id); @@ -622,17 +633,17 @@ namespace Muon { ATH_MSG_WARNING("stationPhi: invalid ID"); return 0; } - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { return m_rpcIdHelper->stationPhi(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { return m_tgcIdHelper->stationPhi(id); - }else if( m_mdtIdHelper->is_mdt(id) ){ + }else if( isMdt(id) ){ return m_mdtIdHelper->stationPhi(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ return m_cscIdHelper->stationPhi(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ return m_stgcIdHelper->stationPhi(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ return m_mmIdHelper->stationPhi(id); } return 0; @@ -643,17 +654,17 @@ namespace Muon { ATH_MSG_WARNING("stationEta: invalid ID"); return 0; } - if( m_rpcIdHelper->is_rpc(id) ) { + if( isRpc(id) ) { return m_rpcIdHelper->stationEta(id); - }else if( m_tgcIdHelper->is_tgc(id) ) { + }else if( isTgc(id) ) { return m_tgcIdHelper->stationEta(id); - }else if( m_mdtIdHelper->is_mdt(id) ){ + }else if( isMdt(id) ){ return m_mdtIdHelper->stationEta(id); - }else if( m_cscIdHelper && m_cscIdHelper->is_csc(id) ){ + }else if( isCsc(id) ){ return m_cscIdHelper->stationEta(id); - }else if( m_stgcIdHelper->is_stgc(id) ){ + }else if( issTgc(id) ){ return m_stgcIdHelper->stationEta(id); - }else if( m_mmIdHelper->is_mm(id) ){ + }else if( isMM(id) ){ return m_mmIdHelper->stationEta(id); } return 0; @@ -661,7 +672,7 @@ namespace Muon { int MuonIdHelperTool::sector( const Identifier& id ) const { // TGC has different segmentation, return 0 for the moment - if( m_tgcIdHelper->is_tgc(id) ) { + if( isTgc(id) ) { static std::vector<int> tgcSectorMapping; if( tgcSectorMapping.empty() ){ std::vector<int>* mapping = 0; @@ -685,7 +696,13 @@ namespace Muon { if( !isSmallChamber( id ) ) --sect; return sect; } - bool MuonIdHelperTool::UseCSC() const { - return m_useCSC; + bool MuonIdHelperTool::HasCSC() const { + return m_hasCSC; + } + bool MuonIdHelperTool::HasSTgc() const { + return m_hasSTgc; + } + bool MuonIdHelperTool::HasMM() const { + return m_hasMM; } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx index e41e730a1728c060e6434bfa070a94e19dc9130b..fa83f071f166d2228f0ed41f3fd01486a4110739 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx @@ -2288,26 +2288,30 @@ namespace Muon { } // loop over all available MM collection identifiers and order them per sector - it = m_idHelper->mmIdHelper().detectorElement_begin(); - it_end = m_idHelper->mmIdHelper().detectorElement_end(); - for( ;it!=it_end; ++it ){ - IdentifierHash hash; - m_idHelper->mmIdHelper().get_module_hash(*it,hash); - insertHash(hash,*it); + if (&(m_idHelper->mmIdHelper())) { + it = m_idHelper->mmIdHelper().detectorElement_begin(); + it_end = m_idHelper->mmIdHelper().detectorElement_end(); + for( ;it!=it_end; ++it ){ + IdentifierHash hash; + m_idHelper->mmIdHelper().get_module_hash(*it,hash); + insertHash(hash,*it); + } } // loop over all available STGC collection identifiers and order them per sector - it = m_idHelper->stgcIdHelper().detectorElement_begin(); - it_end = m_idHelper->stgcIdHelper().detectorElement_end(); - for( ;it!=it_end; ++it ){ - IdentifierHash hash; - m_idHelper->stgcIdHelper().get_module_hash(*it,hash); - int sector = m_idHelper->sector(*it); - insertHash(sector,hash,*it); - int sectorU = sector != 1 ? sector-1 : 16; - int sectorD = sector != 16 ? sector+1 : 1; - insertHash(sectorU,hash,*it); - insertHash(sectorD,hash,*it); + if (&(m_idHelper->stgcIdHelper())) { + it = m_idHelper->stgcIdHelper().detectorElement_begin(); + it_end = m_idHelper->stgcIdHelper().detectorElement_end(); + for( ;it!=it_end; ++it ){ + IdentifierHash hash; + m_idHelper->stgcIdHelper().get_module_hash(*it,hash); + int sector = m_idHelper->sector(*it); + insertHash(sector,hash,*it); + int sectorU = sector != 1 ? sector-1 : 16; + int sectorD = sector != 16 ? sector+1 : 1; + insertHash(sectorU,hash,*it); + insertHash(sectorD,hash,*it); + } } // loop over all available TGC collection identifiers and order them per sector diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py index 3fea204f6b4c7569b0c9da6593bf1bc9d4e045fb..eed15a95b06b45aa9f731fabd73ad5bf005425f3 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MooreTools.py @@ -18,6 +18,7 @@ from AthenaCommon.BeamFlags import jobproperties beamFlags = jobproperties.Beam from AthenaCommon.BFieldFlags import jobproperties from AthenaCommon import CfgMgr +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from RecExConfig.RecFlags import rec @@ -351,7 +352,7 @@ def MuonErrorOptimisationTool(name,extraFlags=None,**kwargs): fitter=getattr(extraFlags,"Fitter",None) if fitter is not None: cloneArgs["Fitter"] = fitter - if not muonRecFlags.doCSCs(): + if not MuonGeometryFlags.hasCSC(): cloneArgs["CscRotCreator"] = "" if "RefitTool" not in kwargs: if namePrefix or namePostfix: @@ -491,7 +492,7 @@ getPublicTool("MCTBFitterMaterialFromTrack") getPublicTool("MCTBSLFitterMaterialFromTrack") getPublicTool("MuonSeededSegmentFinder") mCHRT = getPublicTool("MuonChamberHoleRecoveryTool") -if not muonRecFlags.doCSCs(): +if not MuonGeometryFlags.hasCSC(): mCHRT.CscRotCreator = "" mCHRT.CscPrepDataContainer = "" getPublicTool("MuonTrackSelectorTool") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuPatTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuPatTools.py index 4e0efeb5212ec6359e5fb3130cb57ebe2ef2752a..48a0b3b6cc8cfa1789882861b3a29cdd39e1030b 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuPatTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuPatTools.py @@ -14,6 +14,7 @@ from AthenaCommon.BeamFlags import jobproperties beamFlags = jobproperties.Beam from AthenaCommon.BFieldFlags import jobproperties from AthenaCommon import CfgMgr +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from RecExConfig.RecFlags import rec @@ -34,7 +35,7 @@ class MuPatCandidateTool(CfgMgr.Muon__MuPatCandidateTool,ConfiguredBase): def __init__(self,name='MuPatCandidateTool',**kwargs): self.applyUserDefaults(kwargs,name) - if not muonRecFlags.doCSCs(): + if not MuonGeometryFlags.hasCSC(): kwargs["CscRotCreator"] = "" super(MuPatCandidateTool,self).__init__(name,**kwargs) MuPatCandidateTool.setDefaultProperties( SegmentExtender = "" ) @@ -54,7 +55,7 @@ class MuPatHitTool(CfgMgr.Muon__MuPatHitTool,ConfiguredBase): MuPatHitTool.setDefaultProperties( - CscRotCreator = ("FixedErrorMuonClusterOnTrackCreator" if muonRecFlags.doCSCs() else ""), + CscRotCreator = ("FixedErrorMuonClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else ""), MdtRotCreator = "MdtDriftCircleOnTrackCreatorPreFit" ) # end of class MuPatHitTool diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonPrdProviderToolsConfig.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonPrdProviderToolsConfig.py index 194c686656bd9d28434684d31b0e9b35bbf239d9..82fc2256724622ed08149d2528b8a4239a4ce3fd 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonPrdProviderToolsConfig.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonPrdProviderToolsConfig.py @@ -122,8 +122,9 @@ def STGC_PrepDataProviderTool(name="STGC_PrepDataProviderTool", **kwargs): ### TODO: remove following backwards compat as soon as all clients have migrated to using CfgGetter from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,getService,getServiceClone +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags -if DetFlags.haveRDO.CSC_on() or DetFlags.digitize.CSC_on(): +if MuonGeometryFlags.hasCSC() and (DetFlags.haveRDO.CSC_on() or DetFlags.digitize.CSC_on()): CscRdoToPrepDataTool = getPublicTool("CscPrepDataProviderTool") if DetFlags.haveRDO.MDT_on() or DetFlags.digitize.MDT_on(): diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py index 14ad61c9efb765712abbe7e87ddb66f8d0c4925c..5eaad592950bb6f93b67798d5a1c23df455bfe51 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py @@ -7,7 +7,8 @@ from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorit addTypesOnlyToSkip from AthenaCommon.Constants import * # FATAL,ERROR etc. -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags addNamesToSkipIfNotAvailable( "MuonIsolationTool" ) addTypesOnlyToSkip( "ICaloNoiseTool" ) @@ -61,7 +62,7 @@ addTool("MuonRecExample.MuonRecTools.MuonExtrapolator", "MuonStraightLineExtrapo addTool("Trk::KalmanUpdator", "MuonMeasUpdator") -addTool("Muon::MuonIdHelperTool", "MuonIdHelperTool") +addTool("Muon::MuonIdHelperTool", "MuonIdHelperTool", HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=(CommonGeometryFlags.Run()=="RUN3"), HasMM=(CommonGeometryFlags.Run()=="RUN3")) addTool("Muon::MuonTrackTruthTool", "MuonTrackTruthTool") @@ -83,7 +84,7 @@ addTool( "MuonRecExample.MuonRecTools.MuonChi2TrackFitter", "MuonChi2TrackFitter addTool( "MuonRecExample.MuonRecTools.MuonChi2TrackFitter", "MuonChi2SLTrackFitter", StraightLine=True ) addTool( "MuonRecExample.MuonRecTools.MuonSegmentMomentum", "MuonSegmentMomentum" ) -addTool( "MuonRecExample.MuonRecTools.MuonSegmentMomentumFromField", "MuonSegmentMomentumFromField",UseCSC=muonRecFlags.doCSCs()) +addTool( "MuonRecExample.MuonRecTools.MuonSegmentMomentumFromField", "MuonSegmentMomentumFromField", HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=(CommonGeometryFlags.Run()=="RUN3")) addTool( "MuonRecExample.MuonRecTools.MuonPhiHitSelector", "MuonPhiHitSelector" ) @@ -117,11 +118,11 @@ addTool("Trk::ResidualPullCalculator","ResidualPullCalculator", addTool( "MuonRecExample.MuonPrdProviderToolsConfig.RpcPrepDataProviderTool", "RpcPrepDataProviderTool" ) addTool( "MuonRecExample.MuonPrdProviderToolsConfig.MdtPrepDataProviderTool", "MdtPrepDataProviderTool" ) addTool( "MuonRecExample.MuonPrdProviderToolsConfig.TgcPrepDataProviderTool", "TgcPrepDataProviderTool" ) -if muonRecFlags.doCSCs(): addTool( "MuonRecExample.MuonPrdProviderToolsConfig.CscPrepDataProviderTool", "CscPrepDataProviderTool" ) +if MuonGeometryFlags.hasCSC(): addTool( "MuonRecExample.MuonPrdProviderToolsConfig.CscPrepDataProviderTool", "CscPrepDataProviderTool" ) addTool( "MuonRecExample.MuonPrdProviderToolsConfig.MM_PrepDataProviderTool", "MM_PrepDataProviderTool" ) addTool( "MuonRecExample.MuonPrdProviderToolsConfig.STGC_PrepDataProviderTool", "STGC_PrepDataProviderTool" ) -if muonRecFlags.doCSCs(): addAlgorithm("MuonRecExample.MuonPrdProviderToolsConfig.CscRdoToCscPrepData", "CscRdoToCscPrepData") +if MuonGeometryFlags.hasCSC(): addAlgorithm("MuonRecExample.MuonPrdProviderToolsConfig.CscRdoToCscPrepData", "CscRdoToCscPrepData") ################################################################################ @@ -149,7 +150,7 @@ addToolClone("MdtMathSegmentFinder", "MCTBMdtMathSegmentFinder", UseChamberTheta addTool("MuonRecExample.MooreTools.MuonSeededSegmentFinder", "MuonSeededSegmentFinder") -addTool( "MuonRecExample.MooreTools.MuonRefitTool", "MuonRefitTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "")) +addTool( "MuonRecExample.MooreTools.MuonRefitTool", "MuonRefitTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "")) addTool("MuonRecExample.MooreTools.MuonErrorOptimisationTool","MuonErrorOptimisationTool") @@ -158,11 +159,11 @@ addTool( "MuonRecExample.MooreTools.MuonTrackCleaner", "MuonTrackCleaner" ) addToolClone( "MuonClusterOnTrackCreator", "FixedErrorMuonClusterOnTrackCreator", DoFixedErrorCscEta = True, FixedErrorCscEta = .5 ) -if muonRecFlags.doCSCs(): +if MuonGeometryFlags.hasCSC(): addTool( "MuonRecExample.MuonRecTools.CscClusterOnTrackCreator", "CscClusterOnTrackCreator" ) addTool( "MuonRecExample.MuonRecTools.CscBroadClusterOnTrackCreator", "CscBroadClusterOnTrackCreator" ) -addTool( "MuonRecExample.MooreTools.MuonChamberHoleRecoveryTool", "MuonChamberHoleRecoveryTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else ""), CscPrepDataContainer=("CSC_Clusters" if muonRecFlags.doCSCs() else "")) +addTool( "MuonRecExample.MooreTools.MuonChamberHoleRecoveryTool", "MuonChamberHoleRecoveryTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else ""), CscPrepDataContainer=("CSC_Clusters" if MuonGeometryFlags.hasCSC() else "")) addTool( "MuonRecExample.MooreTools.MuonSegmentRegionRecoveryTool", "MuonSegmentRegionRecoveryTool" ) @@ -204,7 +205,7 @@ addTool( "MuonRecExample.MooreTools.MooTrackFitter", "MooSLTrackFitter", addTool( "MuonRecExample.MooreTools.MooTrackBuilder", "MooTrackBuilderTemplate") -if muonRecFlags.doCSCs(): +if MuonGeometryFlags.hasCSC(): addTool("MuonRecExample.CscTools.CscAlignmentTool","CscAlignmentTool") addTool("MuonRecExample.CscTools.CscClusterUtilTool","CscClusterUtilTool") addTool("MuonRecExample.CscTools.QratCscClusterFitter","QratCscClusterFitter") @@ -231,9 +232,9 @@ addTool("MuonRecExample.NSWTools.SimpleSTgcClusterBuilderTool","SimpleSTgcCluste # Tools from MuonRecExample.MuPatTools ################################################################################ -addTool( "MuonRecExample.MuPatTools.MuPatCandidateTool","MuPatCandidateTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "")) +addTool( "MuonRecExample.MuPatTools.MuPatCandidateTool","MuPatCandidateTool", CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "")) -addTool( "MuonRecExample.MuPatTools.MuPatHitTool", "MuPatHitTool" , CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "")) +addTool( "MuonRecExample.MuPatTools.MuPatHitTool", "MuPatHitTool" , CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "")) ################################################################################ diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py index 6a77944e285fc7a24f89f150f21f547e8c9a6a8e..c6754ade15df511bc9b640f1bafe2596174b4768 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py @@ -30,18 +30,11 @@ class doVP1(JobProperty): allowedTypes=['bool'] StoredValue=False - ## Run the integrated muon reconstruction algorithm class doStandalone(JobProperty): statusOn=True allowedTypes=['bool'] StoredValue=True - -## Run the new third chain configuration for the NSW -class doNSWNewThirdChain(JobProperty): - StatusOn=True - allowedType=['bool'] - StoredValue=False ## Run clusterization class doCreateClusters(JobProperty): diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py index 695f70714960e17b95a54dca2edcc06d90e36f65..49c6df45a944fad7ddf280ff13a61d3458f4ca8a 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py @@ -24,7 +24,8 @@ from MuonCnvExample.MuonCalibFlags import mdtCalibFlags mdtCalibFlags.setDefaults() from RecExConfig.RecFlags import rec - +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\ getService,getServiceClone,getAlgorithm,getAlgorithmClone @@ -221,9 +222,16 @@ def MuonExtrapolator(name='MuonExtrapolator',**kwargs): return CfgMgr.Trk__Extrapolator(name,**kwargs) # end of factory function MuonExtrapolator +def MuonIdHelperTool(name="MuonIdHelperTool",**kwargs): + from MuonIdHelpers.MuonIdHelpersConf import Muon__MuonIdHelperTool + kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC()) + kwargs.setdefault("HasSTgc", (CommonGeometryFlags.Run()=="RUN3")) + kwargs.setdefault("HasMM", (CommonGeometryFlags.Run()=="RUN3")) + return Muon__MuonIdHelperTool(name,**kwargs) + def MuonEDMHelperTool(name='MuonEDMHelperTool',**kwargs): # configure some tools that are used but are not declared as properties (they should be!) - getPublicTool("MuonIdHelperTool") + kwargs.setdefault("MuonIdHelperTool", "MuonIdHelperTool") getPublicTool("MuonExtrapolator") getPublicTool("AtlasExtrapolator") @@ -238,7 +246,7 @@ class MuonEDMPrinterTool(Muon__MuonEDMPrinterTool,ConfiguredBase): def __init__(self,name='MuonEDMPrinterTool',**kwargs): self.applyUserDefaults(kwargs,name) super(MuonEDMPrinterTool,self).__init__(name,**kwargs) - getPublicTool("MuonIdHelperTool") + kwargs.setdefault("MuonIdHelperTool", "MuonIdHelperTool") getPublicTool("MuonEDMHelperTool") # end of class MuonEDMPrinterTool @@ -429,7 +437,7 @@ if DetFlags.detdescr.Muon_on() and rec.doMuon(): getPublicTool("MuonEDMPrinterTool") getPublicTool("MuonSegmentMomentum") getPublicTool("MuonClusterOnTrackCreator") - if muonRecFlags.doCSCs(): + if MuonGeometryFlags.hasCSC(): getPublicTool("CscClusterOnTrackCreator") getPublicTool("CscBroadClusterOnTrackCreator") getPublicTool("MdtDriftCircleOnTrackCreator") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py index 39796bb69d416b80f8f2438066664c9d7840f4e3..72f4d51ccd7d0e4115b95bde89117a9d6c700ced 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py @@ -8,6 +8,8 @@ __doc__ = """Configuration of Muon Spectrometer Standalone muon reconstruction"" # #============================================================== from AthenaCommon import CfgMgr +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from MuonStandaloneFlags import muonStandaloneFlags,MoorelikeStrategy from MuonRecFlags import muonRecFlags @@ -85,7 +87,8 @@ class MuonStandalone(ConfiguredMuonRec): if muonStandaloneFlags.segmentOrigin == 'TruthTracking': SegmentLocation = "ThirdChainSegments" - if muonRecFlags.doNSWNewThirdChain(): + # we assume that RUN3 means that at least one sTgc and one MM chamber are present + if (CommonGeometryFlags.Run()=="RUN3"): getPublicTool("MuonLayerHoughTool") self.addAlg( CfgMgr.MuonLayerHoughAlg( "MuonLayerHoughAlg", PrintSummary = muonStandaloneFlags.printSummary() ) ) if not muonStandaloneFlags.patternsOnly(): @@ -100,7 +103,8 @@ class MuonStandalone(ConfiguredMuonRec): MuonPatternSegmentMaker = getPublicTool("MuonPatternSegmentMaker"), MuonTruthSummaryTool = None, PrintSummary = muonStandaloneFlags.printSummary() ) - if( muonRecFlags.doCSCs() ): + # we check whether the layout contains any CSC chamber and if yes, we check that the user also wants to use the CSCs in reconstruction + if MuonGeometryFlags.hasCSC() and muonRecFlags.doCSCs(): getPublicTool("CscSegmentUtilTool") getPublicTool("Csc2dSegmentMaker") getPublicTool("Csc4dSegmentMaker") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRDO_to_PRD_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRDO_to_PRD_jobOptions.py index 70923d118f44cb0f7f2892516761740ec9c03db8..e410d43ec553f5470ceaed7c9c685574cbecfd1f 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRDO_to_PRD_jobOptions.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRDO_to_PRD_jobOptions.py @@ -17,8 +17,9 @@ from AthenaCommon.BeamFlags import jobproperties beamFlags = jobproperties.Beam from AthenaCommon.CfgGetter import getAlgorithm +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags -if muonRecFlags.doCSCs() and DetFlags.makeRIO.CSC_on() and (DetFlags.haveRDO.CSC_on() or DetFlags.digitize.CSC_on()): +if MuonGeometryFlags.hasCSC() and muonRecFlags.doCSCs() and DetFlags.makeRIO.CSC_on() and (DetFlags.haveRDO.CSC_on() or DetFlags.digitize.CSC_on()): topSequence += getAlgorithm("CscRdoToCscPrepData") if muonRecFlags.doMDTs() and DetFlags.makeRIO.MDT_on() and (DetFlags.haveRDO.MDT_on() or DetFlags.digitize.MDT_on()): @@ -47,7 +48,7 @@ if not muonRecFlags.doFastDigitization(): if muonRecFlags.doPrdSelect(): include("MuonPrdSelector/MuonPrdSelector_jobOptions.py") -if muonRecFlags.doCSCs() and DetFlags.makeRIO.CSC_on(): +if MuonGeometryFlags.hasCSC() and muonRecFlags.doCSCs() and DetFlags.makeRIO.CSC_on(): topSequence += getAlgorithm("CscThresholdClusterBuilder") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py index da703cd7563aef65b5dcc59737a0a58e019fc0b4..2f151c24355e1b2750587b3a9c6e8faaa21845a7 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py @@ -20,14 +20,22 @@ from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.GlobalFlags import globalflags from AthenaCommon.DetFlags import DetFlags from AthenaCommon import CfgMgr +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs from MuonRecExample.MuonAlignFlags import muonAlignFlags +from MuonRecExample.MuonRecTools import MuonIdHelperTool muonRecFlags.setDefaults() topSequence = AlgSequence() +# ESDtoAOD and AODtoTAG need a configured MuonIdHelperTool (e.g. for the RPC_ResidualPullCalculator) +# Since it is not automatically created by the job configuration (as for RDOtoESD), +# do it here manually (hope this will be fixed with the movement to the new configuration for release 22) +if rec.readESD() or rec.readAOD(): + MuonIdHelperTool() + if muonRecFlags.doDigitization(): include("MuonRecExample/MuonDigitization_jobOptions.py") @@ -131,7 +139,7 @@ if muonRecFlags.doStandalone(): from TrkTruthAlgs.TrkTruthAlgsConf import TrackTruthSelector from TrkTruthAlgs.TrkTruthAlgsConf import TrackParticleTruthAlg col = "MuonSpectrometerTracks" - topSequence += MuonDetailedTrackTruthMaker(name="MuonStandaloneDetailedTrackTruthMaker", TrackCollectionNames = [col], UseCSC=muonRecFlags.doCSCs()) + topSequence += MuonDetailedTrackTruthMaker(name="MuonStandaloneDetailedTrackTruthMaker", TrackCollectionNames = [col], HasCSC=MuonGeometryFlags.hasCSC()) topSequence += TrackTruthSelector(name= col + "Selector", DetailedTrackTruthName = col + "Truth", OutputName = col + "Truth") diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py index d9f20a46491c5c472e20a36cd9cd4905a2d89498..742f2263b105e01f13cff0d0ccfc27de91b968c9 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py @@ -60,7 +60,6 @@ muonRecFlags.doTrackPerformance = True muonRecFlags.TrackPerfSummaryLevel = 2 muonRecFlags.TrackPerfDebugLevel = 5 muonRecFlags.doCSCs = True -muonRecFlags.doNSWNewThirdChain = True # flags to tweak standalone muon reconstruction if doMig5: diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/src/RPC_ResidualPullCalculator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/src/RPC_ResidualPullCalculator.cxx index 7296bab10b684eb99ed4178974bfa372ffc1e232..e945febf5d455606f087064aaced113c33c04c12 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/src/RPC_ResidualPullCalculator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/src/RPC_ResidualPullCalculator.cxx @@ -10,7 +10,6 @@ #include "TrkEventUtils/IdentifierExtractor.h" #include "TrkEventPrimitives/LocalParameters.h" #include "MuonIdHelpers/MuonIdHelperTool.h" -#include "MuonIdHelpers/RpcIdHelper.h" //================ Constructor ================================================= @@ -22,6 +21,7 @@ Muon::RPC_ResidualPullCalculator::RPC_ResidualPullCalculator(const std::string& m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool") { declareInterface<IResidualPullCalculator>(this); + declareProperty("MuonIdHelperTool", m_idHelper); } //================ Destructor ================================================= diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx index b0baaf65b4c77f9ad797757c373fa46142dab38a..d7898fd7eb72d127bc2c96e190bffa88ff4becbb 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx @@ -63,8 +63,8 @@ namespace Muon { ATH_CHECK(m_muonPrepRawDataCollectionProviderTool.retrieve()); ATH_CHECK(m_muonPRDSelectionTool.retrieve()); ATH_CHECK(m_segmentMaker.retrieve()); - if (m_idHelper->UseCSC() && !m_csc2dSegmentFinder.empty()) ATH_CHECK(m_csc2dSegmentFinder.retrieve()); - if (m_idHelper->UseCSC() && !m_csc4dSegmentFinder.empty()) ATH_CHECK(m_csc4dSegmentFinder.retrieve()); + if (m_idHelper->HasCSC() && !m_csc2dSegmentFinder.empty()) ATH_CHECK(m_csc2dSegmentFinder.retrieve()); + if (m_idHelper->HasCSC() && !m_csc4dSegmentFinder.empty()) ATH_CHECK(m_csc4dSegmentFinder.retrieve()); ATH_CHECK(m_clusterSegmentFinder.retrieve()); ATH_CHECK(m_clusterSegMakerNSW.retrieve()); ATH_CHECK(m_layerHoughTool.retrieve()); diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/MuonSegmentMomentum/MuonSegmentMomentumFromField.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/MuonSegmentMomentum/MuonSegmentMomentumFromField.h index 91b8a08d6781353afb11aeb5ccb324431c3059ca..6e85286dfa295449ff33fb6b63a2f12cbbda7c71 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/MuonSegmentMomentum/MuonSegmentMomentumFromField.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/MuonSegmentMomentum/MuonSegmentMomentumFromField.h @@ -62,7 +62,8 @@ class MuonSegmentMomentumFromField : public AthAlgTool, virtual public Muon::IMu const CscIdHelper* m_cscid; const sTgcIdHelper* m_stgcid; bool m_doOld; - bool m_useCSC; + bool m_hasCSC; + bool m_hasSTgc; }; #endif // MuonSegmentMomentumFromField_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/src/MuonSegmentMomentumFromField.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/src/MuonSegmentMomentumFromField.cxx index 9b8e3a1e891fc4903f4a037643cf3824565a6044..132b0616c0d68150da80a23cd6dba74740aba165 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/src/MuonSegmentMomentumFromField.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/src/MuonSegmentMomentumFromField.cxx @@ -48,7 +48,8 @@ MuonSegmentMomentumFromField::MuonSegmentMomentumFromField(const std::string& ty declareProperty("PropagatorTool",m_propagator); declareProperty("NavigatorTool",m_navigator); declareProperty("DoOld",m_doOld=false); - declareProperty("UseCSC",m_useCSC=true); + declareProperty("HasCSC",m_hasCSC=true); + declareProperty("HasSTgc",m_hasSTgc=true); } MuonSegmentMomentumFromField::~MuonSegmentMomentumFromField() @@ -66,13 +67,13 @@ StatusCode MuonSegmentMomentumFromField::initialize() ATH_CHECK( m_navigator.retrieve() ); - if (m_useCSC) ATH_CHECK( detStore()->retrieve( m_cscid ) ); + if (m_hasCSC) ATH_CHECK( detStore()->retrieve( m_cscid ) ); ATH_CHECK( detStore()->retrieve( m_rpcid ) ); ATH_CHECK( detStore()->retrieve( m_tgcid ) ); - ATH_CHECK( detStore()->retrieve( m_stgcid ) ); + if (m_hasSTgc) ATH_CHECK( detStore()->retrieve( m_stgcid ) ); ATH_MSG_VERBOSE("End of Initializing"); @@ -187,7 +188,7 @@ void MuonSegmentMomentumFromField::fitMomentum2Segments( const Muon::MuonSegment Identifier id=rot->identify(); if ((m_rpcid->is_rpc(id) && m_rpcid->measuresPhi(id)) || (m_cscid && m_cscid->is_csc(id) && m_cscid->measuresPhi(id)) || (m_tgcid->is_tgc(id) && m_tgcid->isStrip(id)) - || (m_tgcid->is_stgc(id) && m_stgcid->measuresPhi(id) ) ){ + || (m_tgcid->is_stgc(id) && m_stgcid && m_stgcid->measuresPhi(id) ) ){ if (!firstphi1) firstphi1=rot; lastphi1=rot; } @@ -201,7 +202,7 @@ void MuonSegmentMomentumFromField::fitMomentum2Segments( const Muon::MuonSegment if (!rot) continue; Identifier id=rot->identify(); if ((m_rpcid->is_rpc(id) && m_rpcid->measuresPhi(id)) || (m_cscid && m_cscid->is_csc(id) && m_cscid->measuresPhi(id)) || (m_tgcid->is_tgc(id) && m_tgcid->isStrip(id)) - || (m_tgcid->is_stgc(id) && m_stgcid->measuresPhi(id) ) ){ + || (m_tgcid->is_stgc(id) && m_stgcid && m_stgcid->measuresPhi(id) ) ){ if (!firstphi2) firstphi2=rot; lastphi2=rot; } diff --git a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h index 3933ca011cebb54eec2dff088044ff00ee5d9b95..1437674c1778c792ca494f18eace7ff9bd5474c0 100755 --- a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h +++ b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h @@ -31,7 +31,7 @@ public: virtual StatusCode finalize(); private: - bool m_useCSC; + bool m_hasCSC; // PRD truth maps in any order std::vector<std::string> m_PRD_TruthNames; diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx index 735b0c5a630fc13408a50bbafe2d7cbe2815d15d..1ec02bb77844954fafac8d812db179ae0bdf76a0 100755 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx @@ -14,7 +14,7 @@ //================================================================ MuonDetailedTrackTruthMaker::MuonDetailedTrackTruthMaker(const std::string &name, ISvcLocator *pSvcLocator) : AthAlgorithm(name,pSvcLocator), - m_useCSC(true), + m_hasCSC(true), m_truthTool("Trk::DetailedTrackTruthBuilder") { declareProperty("TruthTool", m_truthTool); @@ -35,7 +35,7 @@ MuonDetailedTrackTruthMaker::MuonDetailedTrackTruthMaker(const std::string &name m_trackCollectionNames.push_back("ConvertedStacoTracks"); m_trackCollectionNames.push_back("MuGirlRefittedTracks"); - declareProperty("UseCSC", m_useCSC); + declareProperty("HasCSC", m_hasCSC); declareProperty("PRD_TruthNames", m_PRD_TruthNames); // Output @@ -48,7 +48,7 @@ StatusCode MuonDetailedTrackTruthMaker::initialize() { ATH_MSG_DEBUG( "MuonDetailedTrackTruthMaker::initialize()"); - if (m_useCSC) m_PRD_TruthNames.push_back("CSC_TruthMap"); + if (m_hasCSC) m_PRD_TruthNames.push_back("CSC_TruthMap"); m_PRD_TruthNames.push_back("RPC_TruthMap"); m_PRD_TruthNames.push_back("TGC_TruthMap"); m_PRD_TruthNames.push_back("MDT_TruthMap"); diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h index aea615038fd9da08855ca6425dd706500a28e7df..69aa76032b23fd0be88c565e54368c01df3570df 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h @@ -41,7 +41,6 @@ class MuonDQAHistList; namespace Muon { class MdtPrepData; - class MuonIdHelperTool; } //stl includes @@ -115,7 +114,6 @@ class MdtRawDataValAlg: public ManagedMonitorToolBase { ActiveStoreSvc* m_activeStore; const MdtIdHelper* m_mdtIdHelper; - ToolHandle<Muon::MuonIdHelperTool> m_idHelper; ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool; const MuonGM::MuonDetectorManager* p_MuonDetectorManager ; //!< Pointer On MuonDetectorManager diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx index 3d2417dd8e37faefe19897235b49bf9a099a5b84..eb1f9796cd875bbde8dcc0affdd4c4aa24678ea1 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx @@ -30,7 +30,6 @@ #include "MuonDQAUtils/MuonDQAHistMap.h" #include "MuonCalibIdentifier/MuonFixedId.h" #include "MuonIdHelpers/MdtIdHelper.h" -#include "MuonIdHelpers/MuonIdHelper.h" #include "MdtCalibFitters/MTStraightLine.h" #include "MuonSegment/MuonSegment.h" @@ -51,7 +50,6 @@ #include "TrkTrack/TrackCollection.h" #include "TrkTrack/Track.h" -#include "MuonIdHelpers/MuonIdHelperTool.h" #include "GaudiKernel/MsgStream.h" //root includes @@ -87,7 +85,6 @@ MdtRawDataValAlg::MdtRawDataValAlg( const std::string & type, const std::string :ManagedMonitorToolBase( type, name, parent ), mg(0), m_masked_tubes(NULL), - m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool"), m_muonSelectionTool("CP::MuonSelectionTool/MuonSelectionTool"), m_atlas_ready(0), trig_BARREL(false), @@ -198,7 +195,6 @@ StatusCode MdtRawDataValAlg::initialize() //initialize to stop coverity bugs m_activeStore = 0; m_mdtIdHelper=0; - m_idHelper=0; p_MuonDetectorManager=0; //mdtevents_RPCtrig = 0; //mdtevents_TGCtrig=0; @@ -284,14 +280,6 @@ StatusCode MdtRawDataValAlg::initialize() else { ATH_MSG_DEBUG(" Found the MdtIdHelper. " ); } - - - if (m_idHelper.retrieve().isFailure()){ - ATH_MSG_WARNING("Could not get " << m_idHelper); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG(" Found the MuonIdHelper. " ); - } sc = m_DQFilterTools.retrieve(); if( !sc ) { @@ -578,7 +566,7 @@ StatusCode MdtRawDataValAlg::fillHistograms() if(!rot_from_track) continue; // rot_from_track->dump(msg()); Identifier rotId = rot_from_track->identify(); - if(!m_idHelper->isMdt(rotId)) continue; + if(!m_mdtIdHelper->is_mdt(rotId)) continue; IdentifierHash mdt_idHash; MDTChamber* mdt_chamber = 0; m_mdtIdHelper->get_module_hash( rotId, mdt_idHash ); diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuGirlTagTool.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuGirlTagTool.py index 8f7e85573d0755072ed5096369a9af3818f2aed6..c8ccd8ec2956e6b697218945eb1295325d121b92 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuGirlTagTool.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuGirlTagTool.py @@ -6,7 +6,7 @@ from AthenaCommon import CfgMgr from AthenaCommon.CfgGetter import getPublicTool,getService from RecExConfig.RecFlags import rec -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from MuGirl.MuGirlRecoConfig import MuGirlRecoConfig from MuonCombinedRecExample.MuonCombinedFitTools import CombinedMuonTrackBuilder,CombinedMuonTrackBuilderFit,MuidSegmentRegionRecoveryTool @@ -57,7 +57,7 @@ def DCMathStauSegmentMaker( name="DCMathStauSegmentMaker", **kwargs ): def MuonStauChamberHoleRecoveryTool(name="MuonStauChamberHoleRecoveryTool",**kwargs): kwargs.setdefault("MdtRotCreator", getPublicTool("MdtDriftCircleOnTrackCreatorStau") ) - if not muonRecFlags.doCSCs(): + if not MuonGeometryFlags.hasCSC(): kwargs.setdefault("CscRotCreator", "" ) kwargs.setdefault("CscPrepDataContainer", "" ) return MuonChamberHoleRecoveryTool(name,**kwargs) diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py index d4e17599ac85da0e3733a820c5b93dd516d19b33..2afdcadd5d5dd671e62b6f98e433ad55cf090c5e 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py @@ -23,6 +23,7 @@ from AthenaCommon.BeamFlags import jobproperties beamFlags = jobproperties.Beam from AthenaCommon.DetFlags import DetFlags from AthenaCommon.SystemOfUnits import meter +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from IOVDbSvc.CondDB import conddb from AthenaCommon.GlobalFlags import globalflags @@ -188,7 +189,7 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ): from AthenaCommon.AppMgr import ToolSvc kwargs.setdefault("CaloEnergyParam" , getPublicTool("MuidCaloEnergyToolParam") ) kwargs.setdefault("CaloTSOS" , getPublicTool("MuidCaloTrackStateOnSurface") ) - kwargs.setdefault("CscRotCreator" , (getPublicTool("CscClusterOnTrackCreator") if muonRecFlags.doCSCs() else "") ) + kwargs.setdefault("CscRotCreator" , (getPublicTool("CscClusterOnTrackCreator") if MuonGeometryFlags.hasCSC() else "") ) kwargs.setdefault("Fitter" , getPublicTool("iPatFitter") ) kwargs.setdefault("SLFitter" , getPublicTool("iPatSLFitter") ) kwargs.setdefault("MaterialAllocator" , getPublicTool("MuidMaterialAllocator") ) @@ -229,7 +230,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ): from AthenaCommon.AppMgr import ToolSvc kwargs.setdefault("CaloEnergyParam" , getPublicTool("MuidCaloEnergyToolParam") ) kwargs.setdefault("CaloTSOS" , getPublicTool("MuidCaloTrackStateOnSurface") ) - kwargs.setdefault("CscRotCreator" , (getPublicTool("CscClusterOnTrackCreator") if muonRecFlags.doCSCs() else "") ) + kwargs.setdefault("CscRotCreator" , (getPublicTool("CscClusterOnTrackCreator") if MuonGeometryFlags.hasCSC() else "") ) kwargs.setdefault("Fitter" , getPublicTool("iPatFitter") ) kwargs.setdefault("SLFitter" , getPublicTool("iPatSLFitter") ) kwargs.setdefault("MaterialAllocator" , getPublicTool("MuidMaterialAllocator") ) @@ -276,7 +277,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ): "MuonRefitTool", AlignmentErrors = useAlignErrs, Fitter = getPublicTool("iPatFitter"), - CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "") + CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "") ))) @@ -341,7 +342,7 @@ def OutwardsCombinedMuonTrackBuilder( name = 'OutwardsCombinedMuonTrackBuilder', "MuonRefitTool", AlignmentErrors = False, Fitter = getPublicTool("MuonCombinedTrackFitter"), - CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "") + CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "") ))) return CfgMgr.Rec__OutwardsCombinedMuonTrackBuilder(name,**kwargs) diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_myTopOptions.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_myTopOptions.py index 4a3cd606c4c927e4f992590e0f69bbff17c39692..a23571f60f4cd91227753dedad5a7363b5a5f02f 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_myTopOptions.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_myTopOptions.py @@ -269,7 +269,6 @@ AODFlags.FastSimulation = False AODFlags.Streaming = False AODFlags.MuonTrackSlimmer = False -#muonRecFlags.doNSWNewThirdChain = True #muonCombinedRecFlags.doCombinedFit = True muonCombinedRecFlags.doStatisticalCombination = True muonCombinedRecFlags.doMuGirl = True diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py index cb3ba90e124768b058b176650f741d6dc1e7b395..14391694ca45270d6f71a931364c57df7518571f 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/share/MuonCombinedRec_postprocessing.py @@ -1,6 +1,7 @@ # include.block ("MuonCombinedRecExample/MuonCombinedRec_postprocessing.py") from AthenaCommon import CfgMgr +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if rec.doMuonCombined() and muonCombinedRecFlags.doCosmicSplitTracks() and muonCombinedRecFlags.doAnyMuons() \ and jobproperties.Beam.beamType() == 'cosmics': @@ -21,7 +22,7 @@ if rec.doTruth() and muonCombinedRecFlags.doxAOD() and rec.doMuonCombined(): colsTP = [ "ExtrapolatedMuonTrackParticles", "CombinedMuonTrackParticles", "MSOnlyExtrapolatedMuonTrackParticles" ] cols = [ "ExtrapolatedMuonTracks", "CombinedMuonTracks", "MSOnlyExtrapolatedMuonTracks" ] topSequence+= MuonDetailedTrackTruthMaker("MuonCombinedDetailedTrackTruthMaker", - TrackCollectionNames = cols, UseCSC=muonRecFlags.doCSCs() ) + TrackCollectionNames = cols, HasCSC=MuonGeometryFlags.hasCSC() ) from TrkTruthAlgs.TrkTruthAlgsConf import TrackParticleTruthAlg for i in range(0, len(cols)): diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py index 4f6b0e5a45ffb114a5b03d016a0dc7b61185ba47..cf091fd1dcdcb94386c47714279681975b253b25 100644 --- a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py +++ b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py @@ -2,11 +2,11 @@ include.block ('RecBackgroundAlgs/RecBackground_jobOptions.py') from RecExConfig.RecFlags import rec from AthenaCommon.DetFlags import DetFlags -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if rec.doInDet() and rec.doMuon() and rec.doCalo() and \ DetFlags.detdescr.Muon_on() and DetFlags.detdescr.Calo_on() and DetFlags.detdescr.ID_on() : from RecBackgroundAlgs.RecBackgroundAlgsConf import BeamBackgroundFiller - BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_MuonSegments" if muonRecFlags.doCSCs() else "")) + BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_MuonSegments" if MuonGeometryFlags.hasCSC() else "")) topSequence+=BeamBackgroundFiller from BCM_BackgroundAlgs.BCM_BackgroundAlgsConf import BcmCollisionTimeAlg diff --git a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py index f2bf473e4967ebbe4709f620418d0f5a0c699222..0286d27b0716013a6729ec1fcc0d12672beca521 100644 --- a/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py +++ b/Reconstruction/RecExample/RecJobTransformTests/share/RecJobTransformTests_MuonRec_myTopOptions_MT.py @@ -61,7 +61,6 @@ muonRecFlags.doTrackPerformance = True muonRecFlags.TrackPerfSummaryLevel = 2 muonRecFlags.TrackPerfDebugLevel = 5 muonRecFlags.doCSCs = True -muonRecFlags.doNSWNewThirdChain = False # flags to tweak standalone muon reconstruction if doMig5: diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py index bb3b79eb6f9461ddecbf68181ee774a4019d0091..fef3e4aea4a5bae1ed5f13e216df5d9fd5f86ce2 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py @@ -53,7 +53,7 @@ class AtlasSimSkeleton(SimSkeleton): DetFlags.sTGC_setOff() DetFlags.Micromegas_setOff() from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : DetFlags.sTGC_setOn() DetFlags.Micromegas_setOn() @@ -170,28 +170,6 @@ class AtlasSimSkeleton(SimSkeleton): gms.AlignCallbacks = False ## Muon GeoModel tweaks if DetFlags.Muon_on(): - ## Turn off caching in the muon system - from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool - MuonDetectorTool = MuonDetectorTool() - MuonDetectorTool.FillCacheInitTime = 0 # default is 1 - from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : - AtlasG4Eng.G4Eng.log.info("Removing the original small wheel") - MuonDetectorTool.StationSelection = 2 - MuonDetectorTool.SelectedStations = [ "EIL1" ] - MuonDetectorTool.SelectedStations += [ "EIL2" ] - MuonDetectorTool.SelectedStations += [ "EIL6" ] - MuonDetectorTool.SelectedStations += [ "EIL7" ] - MuonDetectorTool.SelectedStations += [ "EIS*" ] - MuonDetectorTool.SelectedStations += [ "EIL10" ] - MuonDetectorTool.SelectedStations += [ "EIL11" ] - MuonDetectorTool.SelectedStations += [ "EIL12" ] - MuonDetectorTool.SelectedStations += [ "EIL17" ] - MuonDetectorTool.SelectedStations += [ "CSS*" ] - MuonDetectorTool.SelectedStations += [ "CSL*" ] - MuonDetectorTool.SelectedStations += [ "T4E*" ] - MuonDetectorTool.SelectedStations += [ "T4F*" ] - ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() @@ -199,7 +177,7 @@ class AtlasSimSkeleton(SimSkeleton): if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimSkeleton.py b/Simulation/G4Atlas/G4AtlasApps/python/SimSkeleton.py index eab5eabd1d2130e0eaed943baf605ae68a85e5b1..aa5a24d6a1aee1f09d0cea3580766e1d07fbdf03 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimSkeleton.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimSkeleton.py @@ -105,7 +105,7 @@ class SimSkeleton(object): "MDTSimHitCollection#*", "TrackRecordCollection#MuonExitLayer"] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : stream1.ItemList += ["sTGCSimHitCollection#*"] stream1.ItemList += ["MMSimHitCollection#*"] ## Lucid diff --git a/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py b/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py index 642e4e9913e0421254da4f2ee084b40e646b5c2b..30f4ab0bc3dd1692a9c702e31fc2c959e969b072 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/atlas_flags.py @@ -326,15 +326,6 @@ class VertexOverrideEventFile(JobProperty): allowedTypes = ['str'] StoredValues = 'VertexOverrideEventFile.txt' -class SimulateNewSmallWheel(JobProperty): - """ - Will this job simulate the New Small Wheel in the Muon - Spectrometer? - """ - statusOn = False - allowedTypes = ['bool'] - StoredValue = False - class BeamEffectOptions(JobProperty): """ Set options for beam effects transport diff --git a/Simulation/G4Atlas/G4AtlasApps/share/G4Atlas.flat.configuration.py b/Simulation/G4Atlas/G4AtlasApps/share/G4Atlas.flat.configuration.py index a2af2aadf2b89ddc8ec167425fc9138c3700edfe..09509edc5d032af8d27832fc288b3a00566e615f 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/G4Atlas.flat.configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/G4Atlas.flat.configuration.py @@ -31,9 +31,12 @@ DetFlags.DBM_setOff() DetFlags.sTGC_setOff() DetFlags.Micromegas_setOff() from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags -if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : +if CommonGeometryFlags.Run()=="RUN3" : DetFlags.sTGC_setOn() DetFlags.Micromegas_setOn() +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags +if not MuonGeometryFlags.hasCSC(): + DetFlags.CSC_setOff() ## Switch off tasks DetFlags.pileup.all_setOff() @@ -119,26 +122,6 @@ if simFlags.SimulateCavern.get_Value(): gms.AlignCallbacks = False ## Muon GeoModel tweaks if DetFlags.Muon_on(): - ## Turn off caching in the muon system - from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool - MuonDetectorTool = MuonDetectorTool() - MuonDetectorTool.FillCacheInitTime = 0 # default is 1 - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : - MuonDetectorTool.StationSelection = 2 - MuonDetectorTool.SelectedStations = [ "EIL1" ] - MuonDetectorTool.SelectedStations += [ "EIL2" ] - MuonDetectorTool.SelectedStations += [ "EIL6" ] - MuonDetectorTool.SelectedStations += [ "EIL7" ] - MuonDetectorTool.SelectedStations += [ "EIS*" ] - MuonDetectorTool.SelectedStations += [ "EIL10" ] - MuonDetectorTool.SelectedStations += [ "EIL11" ] - MuonDetectorTool.SelectedStations += [ "EIL12" ] - MuonDetectorTool.SelectedStations += [ "EIL17" ] - MuonDetectorTool.SelectedStations += [ "CSS*" ] - MuonDetectorTool.SelectedStations += [ "CSL*" ] - MuonDetectorTool.SelectedStations += [ "T4E*" ] - MuonDetectorTool.SelectedStations += [ "T4F*" ] - ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() @@ -146,7 +129,7 @@ if DetFlags.Muon_on(): if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] @@ -226,10 +209,10 @@ if not simFlags.ISFRun: if DetFlags.Muon_on(): stream1.ItemList += ["RPCSimHitCollection#*", "TGCSimHitCollection#*", - "CSCSimHitCollection#*", "MDTSimHitCollection#*", "TrackRecordCollection#MuonExitLayer"] - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if MuonGeometryFlags.hasCSC(): stream1.ItemList += ["CSCSimHitCollection#*"] + if CommonGeometryFlags.Run()=="RUN3" : stream1.ItemList += ["sTGCSimHitCollection#*"] stream1.ItemList += ["MMSimHitCollection#*"] diff --git a/Simulation/G4Atlas/G4AtlasApps/share/Tile2000_2003.flat.configuration.py b/Simulation/G4Atlas/G4AtlasApps/share/Tile2000_2003.flat.configuration.py index ec5dd11ff905cbb0b25a700068c0dc38c5ddf104..889c79fd3cb09383e9387aa987071d5557049593 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/Tile2000_2003.flat.configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/Tile2000_2003.flat.configuration.py @@ -193,10 +193,6 @@ if not simFlags.ISFRun: "CSCSimHitCollection#*", "MDTSimHitCollection#*", "TrackRecordCollection#MuonExitLayer"] - from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : - stream1.ItemList += ["sTGCSimHitCollection#*"] - stream1.ItemList += ["MMSimHitCollection#*"] ## Lucid if DetFlags.Lucid_on(): diff --git a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py index 1cccc0734743b55c9a5bab3a38df1bfb57422b22..73c892def62a10bd931502f652cc506c87cc4297 100644 --- a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py +++ b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.DCubeTest.py @@ -50,7 +50,7 @@ if DetFlags.Muon_on(): job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("MDTHitsTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("RPCHitsTestTool", checkType=True)] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("MMHitsTestTool", checkType=True)] job.G4TestAlg.SimTestTools += [CfgGetter.getPrivateTool("sTGCHitsTestTool", checkType=True)] else: diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py index e6b35f09ab4ed13c51a3245ea4a1e708998a995c..72a263cf3517016f648a9f33046366e40cd2c3f7 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py @@ -128,20 +128,16 @@ def generateMuonSensitiveDetectorList(): if DetFlags.simulate.MDT_on() : SensitiveDetectorList += [ 'MDTSensitiveDetectorCosmics' ] if DetFlags.simulate.RPC_on() : SensitiveDetectorList += [ 'RPCSensitiveDetectorCosmics' ] if DetFlags.simulate.TGC_on() : SensitiveDetectorList += [ 'TGCSensitiveDetectorCosmics' ] + if DetFlags.simulate.CSC_on() : SensitiveDetectorList += [ 'CSCSensitiveDetectorCosmics' ] else: if DetFlags.simulate.MDT_on() : SensitiveDetectorList += [ 'MDTSensitiveDetector' ] if DetFlags.simulate.RPC_on() : SensitiveDetectorList += [ 'RPCSensitiveDetector' ] if DetFlags.simulate.TGC_on() : SensitiveDetectorList += [ 'TGCSensitiveDetector' ] + if DetFlags.simulate.CSC_on() : SensitiveDetectorList += [ 'CSCSensitiveDetector' ] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3" : if DetFlags.simulate.sTGC_on() : SensitiveDetectorList += [ 'sTGCSensitiveDetector' ] if DetFlags.simulate.Micromegas_on() : SensitiveDetectorList += [ 'MicromegasSensitiveDetector' ] - elif DetFlags.simulate.CSC_on(): - # CSCs built instead of NSW - if jobproperties.Beam.beamType() == 'cosmics': - SensitiveDetectorList += [ 'CSCSensitiveDetectorCosmics' ] - else: - SensitiveDetectorList += [ 'CSCSensitiveDetector' ] return SensitiveDetectorList def generateEnvelopeSensitiveDetectorList(): diff --git a/Simulation/ISF/ISF_Config/share/AllDet_detDescr.py b/Simulation/ISF/ISF_Config/share/AllDet_detDescr.py index 75f6a6ebc475e93c364411b0f6f870c218e804c0..08981d5b884eae6dbcd5ab2b2904e0c324a4fc09 100644 --- a/Simulation/ISF/ISF_Config/share/AllDet_detDescr.py +++ b/Simulation/ISF/ISF_Config/share/AllDet_detDescr.py @@ -25,7 +25,11 @@ if DetFlags.detdescr.any_on(): protectedInclude( "TileConditions/TileConditions_jobOptions.py" ) if DetFlags.detdescr.Muon_on(): - protectedInclude ("AmdcAth/AmdcAth_jobOptions.py") + protectedInclude ("AmdcAth/AmdcAth_jobOptions.py") + + from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags + if not MuonGeometryFlags.hasCSC(): + DetFlags.CSC_setOff() # MagneticField Service if DetFlags.detdescr.BField_on(): diff --git a/Simulation/ISF/ISF_Example/python/ISF_Output.py b/Simulation/ISF/ISF_Example/python/ISF_Output.py index 94f7865bf229b9b678f2aa0f5129b0b783578884..fd7c9e4108a084d2f8786d3354912c116da1798e 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Output.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Output.py @@ -41,11 +41,12 @@ def getHITSStreamItemList(): if DetFlags.Muon_on(): hitsItemList += ["RPCSimHitCollection#*", "TGCSimHitCollection#*", - "CSCSimHitCollection#*", "MDTSimHitCollection#*", "TrackRecordCollection#MuonExitLayer"] + from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags + if MuonGeometryFlags.hasCSC(): hitsItemList += ["CSCSimHitCollection#*"] from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags - if ( hasattr(simFlags, 'SimulateNewSmallWheel') and simFlags.SimulateNewSmallWheel() ) or CommonGeometryFlags.Run()=="RUN3" : + if CommonGeometryFlags.Run()=="RUN3": hitsItemList += ["sTGCSimHitCollection#*"] hitsItemList += ["MMSimHitCollection#*"] hitsItemList += ["GenericMuonSimHitCollection#*"] diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh index 9ad2d65507f3cc364291d8abe60f88d3664f6ed0..5f8a6e09dc8abca88c501d51d8919efe56ac96ba 100755 --- a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh @@ -18,7 +18,7 @@ AtlasG4_tf.py \ --physicsList 'FTFP_BERT' \ --DBRelease 'current' \ --postInclude 'G4AtlasTests/postInclude.DCubeTest.py,G4AtlasTests/postInclude.NSW.config.simu.py' \ ---preExec 'simFlags.ReleaseGeoModel=False;simFlags.SimulateNewSmallWheel=True;' \ +--preExec 'simFlags.ReleaseGeoModel=False;' \ --imf False echo "art-result: $? simulation" diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py index 154ed7ddb68ce32b2d796a3e2b939c44b56a1c52..f9642491972a1f1a5c5ac811832afdb0a2b650c4 100644 --- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py +++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py @@ -294,10 +294,10 @@ if checkHGTDOff is not None: ## Tidy up DBM DetFlags: temporary measure DetFlags.DBM_setOff() -if hasattr(simFlags, 'SimulateNewSmallWheel'): - if simFlags.SimulateNewSmallWheel(): - DetFlags.sTGC_setOn() - DetFlags.Micromegas_setOn() +from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags +if CommonGeometryFlags.Run()=="RUN3": + DetFlags.sTGC_setOn() + DetFlags.Micromegas_setOn() #if simFlags.ForwardDetectors.statusOn: # if DetFlags.geometry.FwdRegion_on(): @@ -769,28 +769,6 @@ if ISF_Flags.UsingGeant4(): gms.DetectorTools += [ CavernInfraDetectorTool() ] ## Protects GeoModelSvc in the simulation from the AlignCallbacks gms.AlignCallbacks = False - ## Muon GeoModel tweaks - if DetFlags.Muon_on(): - ## Turn off caching in the muon system - from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool - MuonDetectorTool = MuonDetectorTool() - MuonDetectorTool.FillCacheInitTime = 0 # default is 1 - if hasattr(simFlags, 'SimulateNewSmallWheel'): - if simFlags.SimulateNewSmallWheel(): - MuonDetectorTool.StationSelection = 2 - MuonDetectorTool.SelectedStations = [ "EIL1" ] - MuonDetectorTool.SelectedStations += [ "EIL2" ] - MuonDetectorTool.SelectedStations += [ "EIL6" ] - MuonDetectorTool.SelectedStations += [ "EIL7" ] - MuonDetectorTool.SelectedStations += [ "EIS*" ] - MuonDetectorTool.SelectedStations += [ "EIL10" ] - MuonDetectorTool.SelectedStations += [ "EIL11" ] - MuonDetectorTool.SelectedStations += [ "EIL12" ] - MuonDetectorTool.SelectedStations += [ "EIL17" ] - MuonDetectorTool.SelectedStations += [ "CSS*" ] - MuonDetectorTool.SelectedStations += [ "CSL*" ] - MuonDetectorTool.SelectedStations += [ "T4E*" ] - MuonDetectorTool.SelectedStations += [ "T4F*" ] ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc @@ -798,11 +776,11 @@ if ISF_Flags.UsingGeant4(): if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] - if hasattr(simFlags, 'SimulateNewSmallWheel'): - if simFlags.SimulateNewSmallWheel(): - if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: - ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) - AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags + if CommonGeometryFlags.Run()=="RUN3" : + if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: + ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) + AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] theApp.CreateSvc += ["AGDDtoGeoSvc"] ServiceMgr += AGDD2Geo diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py index 5bbd4f2aac13d25a52f235b7bf628d19693215f7..0b6a7c849f9480329b9b1258b4be8d7a3f08b771 100755 --- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py +++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py @@ -20,6 +20,7 @@ from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags from MuonRecExample.MuonRecFlags import muonRecFlags #Offline calorimeter isolation tool @@ -239,7 +240,7 @@ def TMEF_CombinedMuonTrackBuilder(name='TMEF_CombinedMuonTrackBuilder',**kwargs) "MuonRefitTool", AlignmentErrors = False, Fitter = CfgGetter.getPublicTool("iPatFitter"), - CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if muonRecFlags.doCSCs() else "") + CscRotCreator=("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator" if MuonGeometryFlags.hasCSC() else "") ))) return CfgMgr.Rec__CombinedMuonTrackBuilder(name,**kwargs) @@ -407,7 +408,7 @@ def TMEF_MuonLayerSegmentFinderTool(name="TMEF_MuonLayerSegmentFinderTool",**kwa kwargs.setdefault('MuonRecoValidationTool','') kwargs.setdefault('MuonPRDSelectionTool','TMEF_MuonPRDSelectionTool') kwargs.setdefault('MuonClusterSegmentFinderTool','TMEF_MuonClusterSegmentFinderTool') - if not muonRecFlags.doCSCs(): + if not MuonGeometryFlags.hasCSC(): kwargs.setdefault('Csc2DSegmentMaker', '') kwargs.setdefault('Csc4DSegmentMaker', '') return CfgMgr.Muon__MuonLayerSegmentFinderTool(name,**kwargs) @@ -476,14 +477,14 @@ class TrigMuonEFStandaloneTrackToolConfig (TrigMuonEFStandaloneTrackTool): def __init__( self, name="TrigMuonEFStandaloneTrackTool", **kwargs ): super( TrigMuonEFStandaloneTrackToolConfig, self ).__init__( name, **kwargs ) - if muonRecFlags.doCSCs(): self.CscClusterProvider = CfgGetter.getPublicTool("CscThresholdClusterBuilderTool") + if MuonGeometryFlags.hasCSC(): self.CscClusterProvider = CfgGetter.getPublicTool("CscThresholdClusterBuilderTool") self.SegmentsFinderTool = CfgGetter.getPublicToolClone( "TMEF_SegmentsFinderTool","MooSegmentFinder", WriteIntermediateResults = False, HoughPatternFinder = CfgGetter.getPublicTool("MuonLayerHoughTool"), DoSegmentCombinations=True, - Csc2dSegmentMaker=("Csc2dSegmentMaker/Csc2dSegmentMaker" if muonRecFlags.doCSCs() else ""), - Csc4dSegmentMaker=("Csc4dSegmentMaker/Csc4dSegmentMaker" if muonRecFlags.doCSCs() else "") + Csc2dSegmentMaker=("Csc2dSegmentMaker/Csc2dSegmentMaker" if MuonGeometryFlags.hasCSC() else ""), + Csc4dSegmentMaker=("Csc4dSegmentMaker/Csc4dSegmentMaker" if MuonGeometryFlags.hasCSC() else "") ) CfgGetter.getPublicTool("MuonHoughPatternFinderTool").RecordAll=False @@ -495,7 +496,7 @@ class TrigMuonEFStandaloneTrackToolConfig (TrigMuonEFStandaloneTrackTool): self.useMdtSeededDecoding = True self.useRpcSeededDecoding = True self.useTgcSeededDecoding = True - if muonRecFlags.doCSCs(): self.useCscSeededDecoding = True + if MuonGeometryFlags.hasCSC(): self.useCscSeededDecoding = True # use ROB based seeded decoding instead of PRD based self.useMdtRobDecoding = True diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfigDb.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfigDb.py index 717c6362901325185e920df6d2625645c4d5d490..18adb46228ddeb8ac901f3807c518a378d776070 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfigDb.py +++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfigDb.py @@ -1,7 +1,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.CfgGetter import addAlgorithm,addTool,addService -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags addTool("TrigMuonEF.TrigMuonEFConfig.TrigMuonEFStandaloneTrackToolConfig", "TrigMuonEFStandaloneTrackTool") @@ -42,7 +42,7 @@ addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_TrkMaterialProviderTool", "TMEF_TrkMat addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonCandidateTrackBuilderTool", "TMEF_MuonCandidateTrackBuilderTool") addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonInsideOutRecoTool", "TMEF_MuonInsideOutRecoTool") addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonPRDSelectionTool", "TMEF_MuonPRDSelectionTool") -addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonLayerSegmentFinderTool", "TMEF_MuonLayerSegmentFinderTool", Csc2DSegmentMaker=("Csc2dSegmentMaker/Csc2dSegmentMaker" if muonRecFlags.doCSCs() else ""), Csc4DSegmentMaker=("Csc4dSegmentMaker/Csc4dSegmentMaker" if muonRecFlags.doCSCs() else "")) +addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonLayerSegmentFinderTool", "TMEF_MuonLayerSegmentFinderTool", Csc2DSegmentMaker=("Csc2dSegmentMaker/Csc2dSegmentMaker" if MuonGeometryFlags.hasCSC() else ""), Csc4DSegmentMaker=("Csc4dSegmentMaker/Csc4dSegmentMaker" if MuonGeometryFlags.hasCSC() else "")) addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonClusterSegmentFinderTool", "TMEF_MuonClusterSegmentFinderTool") addTool("TrigMuonEF.TrigMuonEFConfig.TMEF_MuonStauRecoTool", "TMEF_MuonStauRecoTool") diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFCosmicConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFCosmicConfig.py index ba80c3b429d7d5936b128db005b3a7473924a0bf..c66f5f6559af85e34adee85b0b80a835fcd685a6 100755 --- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFCosmicConfig.py +++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFCosmicConfig.py @@ -15,6 +15,7 @@ from AthenaCommon import CfgMgr, CfgGetter from MuonRecExample import MuonRecTools from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags #from MuonRecExample.MuonRecUtils import AlgToolFactory,ServiceFactory,ConfiguredBase,getProperty from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig @@ -356,7 +357,7 @@ class TrigMuonEFSegmentFinderCosmicConfig (TrigMuonEFSegmentFinder): def __init__( self, name="TrigMuonEFSegmentFinderCosmic" ): super( TrigMuonEFSegmentFinderCosmicConfig, self ).__init__( name ) - if muonRecFlags.doCSCs(): self.CscClusterProvider = CfgGetter.getPublicTool("CscThresholdClusterBuilderTool") + if MuonGeometryFlags.hasCSC(): self.CscClusterProvider = CfgGetter.getPublicTool("CscThresholdClusterBuilderTool") from MuonRecExample.MooreTools import MooSegmentCombinationFinder self.SegmentsFinderTool = MooSegmentCombinationFinder("SegmentsFinderToolCosmic", diff --git a/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py b/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py index bdf8fdf62623951458ff82b57c511cdd091b19b7..a51cd5a7e146ee52565ec53905e9edce9b1f3cbd 100755 --- a/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py +++ b/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py @@ -84,9 +84,9 @@ from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.09.00.NSW" from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool -MuonDetectorTool=MuonDetectorTool(UseCSC=False) +MuonDetectorTool=MuonDetectorTool(HasCSC=False) DetDescrCnvSvc = Service( "DetDescrCnvSvc" ) -DetDescrCnvSvc.UseCSC = False +DetDescrCnvSvc.HasCSC = False diff --git a/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options.py b/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options.py index 06a4cae32edb5ecf91330f63c8cac3fc1f2a68a2..4fc19a22bda40963f66c3d1a6820891fa4198212 100755 --- a/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options.py +++ b/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options.py @@ -2,7 +2,7 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags athenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.117050.PowhegPythia_P2011C_ttbar.merge.HITS.e2658_s1967_s1964/RDO.0119996._000032.pool.root.1"] jp.AthenaCommonFlags.PoolESDOutput="theoutput.ESD.pool.root" @@ -44,7 +44,7 @@ from TrkTruthAlgs.TrkTruthAlgsConf import TrackParticleTruthAlg cols = ["HLT_TrackCollection_forCB","HLT_TrackCollection_MuonEFCombTrkTracks"] colsTP = ["HLT_xAOD__TrackParticleContainer_MuonEFInfo_ExtrapTrackParticles","HLT_xAOD__TrackParticleContainer_MuonEFInfo_CombTrackParticles"] -topSequence += MuonDetailedTrackTruthMaker(name="TrigMuEFDetailedTrackTruthMaker", TrackCollectionNames = cols,OutputLevel=INFO, UseCSC=muonRecFlags.doCSCs() ) +topSequence += MuonDetailedTrackTruthMaker(name="TrigMuEFDetailedTrackTruthMaker", TrackCollectionNames = cols,OutputLevel=INFO, HasCSC=MuonGeometryFlags.hasCSC() ) for i in range(0, len(cols) ): topSequence += TrackTruthSelector(name= cols[i] + "Selector", diff --git a/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options_EFonly.py b/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options_EFonly.py index bd0c73880ec46c751694f25e0e62df7ea6b4bce9..7e874c57010277ffa423a88e47371da7696c5602 100755 --- a/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options_EFonly.py +++ b/Trigger/TrigValidation/TrigMuonValidation/share/TrigMuonValidation_RTT_options_EFonly.py @@ -2,7 +2,7 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -from MuonRecExample.MuonRecFlags import muonRecFlags +from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags athenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.117050.PowhegPythia_P2011C_ttbar.merge.HITS.e2658_s1967_s1964/RDO.0119996._000032.pool.root.1"] jp.AthenaCommonFlags.PoolESDOutput="theoutput_EFonly.ESD.pool.root" @@ -44,7 +44,7 @@ from TrkTruthAlgs.TrkTruthAlgsConf import TrackParticleTruthAlg cols = ["HLT_TrackCollection_forCB","HLT_TrackCollection_MuonEFCombTrkTracks"] colsTP = ["HLT_xAOD__TrackParticleContainer_MuonEFInfo_ExtrapTrackParticles","HLT_xAOD__TrackParticleContainer_MuonEFInfo_CombTrackParticles"] -topSequence += MuonDetailedTrackTruthMaker(name="TrigMuEFonlyDetailedTrackTruthMaker", TrackCollectionNames = cols,OutputLevel=INFO, UseCSC=muonRecFlags.doCSCs() ) +topSequence += MuonDetailedTrackTruthMaker(name="TrigMuEFonlyDetailedTrackTruthMaker", TrackCollectionNames = cols,OutputLevel=INFO, HasCSC=MuonGeometryFlags.hasCSC() ) for i in range(0, len(cols) ): topSequence += TrackTruthSelector(name= cols[i] + "Selector",