diff --git a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py index 078d0ef7376f01348660bf709d3ee180e0838583..1616d62b90912440434f51dc4e4f21340fef5a34 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py @@ -2143,9 +2143,17 @@ class SimSkeleton(object): stream1.ForceRead=True stream1.ItemList = ["EventInfo#*", "McEventCollection#TruthEvent", - "JetCollection#*", - "xAOD::JetContainer_v1#*", - "xAOD::JetAuxContainer_v1#*"] + "JetCollection#*"] + + from PyJobTransforms.trfUtils import releaseIsOlderThan + if releaseIsOlderThan(20,0): + #Hack to maintain compatibility of G4AtlasApps trunk with + #19.2.X.Y after EDM changes in release 20.0.0. + stream1.ItemList += ["xAOD::JetContainer_v1#*", + "xAOD::JetAuxContainer_v1#*"] + else: + stream1.ItemList += ["xAOD::JetContainer#*", + "xAOD::JetAuxContainer#*"] ## Make stream aware of aborted events stream1.AcceptAlgs = ["G4AtlasAlg"] diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py index 16af788d75f2193c882ee457092a273ab7123666..6210cc15207af2098b76ea67b8d2b98eb932061d 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py @@ -133,7 +133,7 @@ class AtlasSimSkeleton(SimSkeleton): frozen showers, etc """ AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_external :: starting') - from AthenaCommon.AppMgr import ServiceMgr + from AthenaCommon.AppMgr import ToolSvc,ServiceMgr from Geo2G4.Geo2G4Conf import Geo2G4Svc geo2G4Svc = Geo2G4Svc() theApp.CreateSvc += ["Geo2G4Svc"] @@ -193,7 +193,7 @@ class AtlasSimSkeleton(SimSkeleton): if simFlags.SimulateNewSmallWheel(): AtlasG4Eng.G4Eng.log.info("Removing the original small wheel") MuonDetectorTool.StationSelection = 2 - MuonDetectorTool.SelectedStations = [ "EIL1" ] + MuonDetectorTool.SelectedStations = [ "EIL1" ] MuonDetectorTool.SelectedStations += [ "EIL2" ] MuonDetectorTool.SelectedStations += [ "EIL6" ] MuonDetectorTool.SelectedStations += [ "EIL7" ] @@ -208,12 +208,27 @@ class AtlasSimSkeleton(SimSkeleton): MuonDetectorTool.SelectedStations += [ "T4F*" ] ## Additional material in the muon system - from AGDD2Geo.AGDD2GeoConf import AGDD2GeoSvc - agdd2GeoSvc = AGDD2GeoSvc() - if not hasattr(agdd2GeoSvc, 'OverrideConfiguration') or not agdd2GeoSvc.OverrideConfiguration : - agdd2GeoSvc.Locked = True - theApp.CreateSvc += ["AGDD2GeoSvc"] - ServiceMgr += agdd2GeoSvc + from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc + AGDD2Geo = AGDDtoGeoSvc() + if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders: + from MuonAGDD.MuonAGDDConf import MuonAGDDTool + MuonAGDDTool = MuonAGDDTool('MuonSpectrometer') + MuonAGDDTool.BuildNSW = False + ToolSvc += MuonAGDDTool + AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"] + if hasattr(simFlags, 'SimulateNewSmallWheel'): + if simFlags.SimulateNewSmallWheel(): + if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders: + from MuonAGDD.MuonAGDDConf import NSWAGDDTool + NSWAGDDTool = NSWAGDDTool('NewSmallWheel') + NSWAGDDTool.Locked=False + NSWAGDDTool.XMLFiles += ["stations.v1.69.xml"] + NSWAGDDTool.Volumes += ["NewSmallWheel"] + NSWAGDDTool.DefaultDetector="Muon" + ToolSvc += NSWAGDDTool + AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] + theApp.CreateSvc += ["AGDDtoGeoSvc"] + ServiceMgr += AGDD2Geo ## Add configured GeoModelSvc to service manager ServiceMgr += gms @@ -582,8 +597,7 @@ class AtlasSimSkeleton(SimSkeleton): if simFlags.MagneticField.statusOn: if simFlags.MagneticField() == 'AtlasFieldSvc': from AthenaCommon.AppMgr import ServiceMgr as svcMgr - from MagFieldServices.MagFieldServicesConf import MagField__AtlasFieldSvc - svcMgr += MagField__AtlasFieldSvc("AtlasFieldSvc"); + import MagFieldServices.SetupField # TODO: would be useful if the AthenaSvc name can be handed over to the PyG4Atlas.MagneticField somehow # currently G4AtlasFieldSvc.cxx retrieves a field service with the default name 'AtlasFieldSvc' atlasfield = PyG4Atlas.MagneticField('G4Field', 'G4AtlasFieldSvc', typefield='MapField') diff --git a/Simulation/G4Atlas/G4AtlasApps/python/atlas_common.py b/Simulation/G4Atlas/G4AtlasApps/python/atlas_common.py index 259fcea9797c3149afed491b0f14a17d06e7752d..50e094505b94220e75cffbc77e622ea650c62546 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/atlas_common.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/atlas_common.py @@ -314,7 +314,7 @@ class BeamPipe(object): #if not hasattr(ServiceMgr, 'DeadMaterialFastSimSvc' ): # from LArG4FastSimSvc.LArG4FastSimSvcConfig import DeadMaterialFastSimSvc # ServiceMgr += DeadMaterialFastSimSvc() - self.atlas_SimpleFastKiller = PyG4Atlas.FastSimModel('LArG4FastSimulation', 'SimpleFastKiller') + self.atlas_SimpleFastKiller = PyG4Atlas.FastSimModel('G4FastSimulation', 'SimpleFastKiller') self.atlas_SimpleFastKiller.add_Region(self.atlas_beampipe_PhysReg) AtlasG4Eng.G4Eng.add_FastSimModel(self.atlas_SimpleFastKiller) AtlasG4Eng.G4Eng.log.info('Adding fast sim model to the beampipe!')