# Set output level threshold #(0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) MessageSvc.OutputLevel = INFO #***************************************************** HERE override MuonSpectrometer tag from AtlasGeoModel import SetGeometryVersion from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() #GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.01.01.Initial.Light" printfunc(GeoModelSvc) #***************************************************** HERE setup MuonDetectorManager from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool MuonDetectorTool = MuonDetectorTool() MuonDetectorTool.StationSelection = 0 MuonDetectorTool.SelectedStations = ["EIL", "B"] MuonDetectorTool.ControlAlines = GeneralControlAlines printfunc(MuonDetectorTool) #***************************************************** HERE setup MuonGMCheck from MuonGeoModelTest.MuonGeoModelTestConf import MuonGMCheck MuonGMCheck = MuonGMCheck() MuonGMCheck.buildMdtRegionSelectorMap = 1 MuonGMCheck.buildRpcRegionSelectorMap = 1 MuonGMCheck.buildTgcRegionSelectorMap = 1 MuonGMCheck.buildCscRegionSelectorMap = 1 printfunc(MuonGMCheck)
def _do_external(self): """Place to handle the external services: GeoModel, IOVDb, frozen showers, etc """ AtlasG4Eng.G4Eng.log.verbose( 'AtlasSimSkeleton._do_external :: starting') from AthenaCommon.AppMgr import ToolSvc, ServiceMgr from Geo2G4.Geo2G4Conf import Geo2G4Svc geo2G4Svc = Geo2G4Svc() theApp.CreateSvc += ["Geo2G4Svc"] ServiceMgr += geo2G4Svc ## Enable top transforms for the ATLAS geometry geo2G4Svc.GetTopTransform = True ## Configure access to the BeamCondSvc if necessary. Assuming ## it should be on always as BeamEffectTransformation is ## currently always switched on, else something like this will ## be required here. from G4AtlasApps.SimFlags import simFlags include("InDetBeamSpotService/BeamCondSvc.py") ## GeoModel stuff ## TODO: Tidy imports etc. from GeoModelSvc.GeoModelSvcConf import GeoModelSvc from AthenaCommon.GlobalFlags import jobproperties from AtlasGeoModel import SetGeometryVersion ## Forward Region Twiss files - needed before geometry setup! if simFlags.ForwardDetectors.statusOn: if DetFlags.geometry.FwdRegion_on(): from AthenaCommon.CfgGetter import getPublicTool from AthenaCommon.AppMgr import ToolSvc ToolSvc += getPublicTool("ForwardRegionProperties") from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SimEnvelopes from GeoModelSvc.GeoModelSvcConf import GeoModelSvc gms = GeoModelSvc() ## Cosmics GeoModel tweaks if jobproperties.Beam.beamType() == 'cosmics' or \ (simFlags.CavernBG.statusOn and not 'Signal' in simFlags.CavernBG.get_Value() ): from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool 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 ## Additional material in the muon system from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() from AthenaCommon import CfgGetter if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True) AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags if (MuonGeometryFlags.hasSTGC() and MuonGeometryFlags.hasMM()): if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True) AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] theApp.CreateSvc += ["AGDDtoGeoSvc"] ServiceMgr += AGDD2Geo ## Add configured GeoModelSvc to service manager ServiceMgr += gms ## Run the geometry envelope setup earlier than GeoSD self._do_GeoEnv() #TODO remove AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_external :: done')
GeoModelSvc = GeoModelSvc() from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags # initialize the MuonIdHelperService from MuonIdHelpers.MuonIdHelpersConf import Muon__MuonIdHelperSvc svcMgr += Muon__MuonIdHelperSvc("MuonIdHelperSvc", HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=MuonGeometryFlags.hasSTGC(), HasMM=MuonGeometryFlags.hasMM()) # create the MuonDetectorTool (which creates the MuonDetectorManager needed by PadTdsOfflineTool) from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool GeoModelSvc.DetectorTools += [ MuonDetectorTool(HasCSC=MuonGeometryFlags.hasCSC(), HasSTgc=MuonGeometryFlags.hasSTGC(), HasMM=MuonGeometryFlags.hasMM()) ] ####################################### ####################################### # now the trigger related things ####################################### from RegionSelector.RegSelSvcDefault import RegSelSvcDefault svcMgr += RegSelSvcDefault() include('TrigT1NSW/TrigT1NSW_jobOptions.py') #Switch on and off trigger simulaton components sTGC / MicroMegas #October 2019 : MM not working so keep it False until fixed
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AtlasGeoModel import GeoModelInit from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool GeoModelSvc.DetectorTools += [ MuonDetectorTool(HasSTgc=False, HasMM=False) ] GeoModelSvc.SupportedGeometry=21 GeoModelSvc.AtlasVersion='ATLAS-R2-2016-01-00-01' try: if database_layout: GeoModelSvc.MuonVersionOverride=database_layout except NameError: pass theApp.CreateSvc += ["GeoModelSvc"] ServiceMgr += GeoModelSvc
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.JobProperties import jobproperties from AthenaCommon.DetFlags import DetFlags if (jobproperties.Global.DetGeo() == "ctbh8" or jobproperties.Global.DetGeo() == "ctbh6"): print " CTB layout for Muon Spectrometer is not supported anymore" elif (DetFlags.detdescr.Muon_on()): from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool GeoModelSvc.DetectorTools += [MuonDetectorTool()] GeoModelSvc.DetectorTools["MuonDetectorTool"].BuildFromNova = 0 if (not DetFlags.simulate.any_on() or DetFlags.overlay.any_on()): GeoModelSvc.DetectorTools[ "MuonDetectorTool"].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool" else: GeoModelSvc.DetectorTools["MuonDetectorTool"].TheMuonAlignmentTool = "" GeoModelSvc.DetectorTools["MuonDetectorTool"].UseConditionDb = 0 GeoModelSvc.DetectorTools["MuonDetectorTool"].UseAsciiConditionData = 0