diff --git a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py index 8962976738004460a705f5e367f303ea483cd2c3..04a9c45e5f590893bb3fc023d7d61a0377f57b81 100755 --- a/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py +++ b/Simulation/BeamEffects/python/BeamEffectsAlgConfig.py @@ -113,7 +113,6 @@ def BeamEffectsAlgCfg(ConfigFlags, **kwargs): # Set (todo) the appropriate manipulator tools manipulators = [] manipulators.append(makeValidityChecker()) - manipulators.append(makeGenEventRotator()) manipulators.append(toolVertexPositioner) # manipulators.append(makeGenEventBeamEffectBooster()) # todo segmentation violation # manipulators.append(makeVertexPositionFromFile()) # todo diff --git a/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py b/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py index a30cf7d06558943be03239761566f2d090f5f413..faa781b054a7d4b1cc87573b6f4dde1e62f92449 100755 --- a/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py +++ b/Simulation/G4Atlas/G4AtlasAlg/test/G4AtlasAlgConfigNew_Test.py @@ -23,13 +23,13 @@ if __name__ == '__main__': from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaConfiguration.TestDefaults import defaultTestFiles inputDir = defaultTestFiles.d - ConfigFlags.Input.Files = defaultTestFiles.EVNT + ConfigFlags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1'] #defaultTestFiles.EVNT ConfigFlags.Output.HITSFileName = "myHITSnew.pool.root" #Sim ConfigFlags - ConfigFlags.Sim.WorldRRange = 15000 - ConfigFlags.Sim.WorldZRange = 27000 #change defaults? - ConfigFlags.Sim.CalibrationRun = False # 'DeadLAr' + #ConfigFlags.Sim.WorldRRange = 15000 + #ConfigFlags.Sim.WorldZRange = 27000 #change defaults? + ConfigFlags.Sim.CalibrationRun = 'DeadLAr' # is this correct? ConfigFlags.Sim.RecordStepInfo = False ConfigFlags.Sim.CavernBG = "Signal" ConfigFlags.Sim.ISFRun = False @@ -53,16 +53,16 @@ if __name__ == '__main__': ConfigFlags.Detector.GeometryTRT = True #muon - ConfigFlags.Detector.SimulateMuon = True - ConfigFlags.Detector.GeometryMuon = True - ConfigFlags.Detector.SimulateMDT = True - ConfigFlags.Detector.GeometryMDT = True - ConfigFlags.Detector.SimulateRPC = True - ConfigFlags.Detector.GeometryRPC = True - ConfigFlags.Detector.SimulateTGC = True - ConfigFlags.Detector.GeometryTGC = True - ConfigFlags.Detector.SimulateCSC = True - ConfigFlags.Detector.GeometryCSC = True + ConfigFlags.Detector.SimulateMuon = True #True + ConfigFlags.Detector.GeometryMuon = True #True <these two break it (others can be true) + ConfigFlags.Detector.SimulateMDT = True #True + ConfigFlags.Detector.GeometryMDT = True #True + ConfigFlags.Detector.SimulateRPC = True #True + ConfigFlags.Detector.GeometryRPC = True #True + ConfigFlags.Detector.SimulateTGC = True #True + ConfigFlags.Detector.GeometryTGC = True #True + ConfigFlags.Detector.SimulateCSC = True #True + ConfigFlags.Detector.GeometryCSC = True #True #LAr ConfigFlags.Detector.SimulateLAr = True @@ -74,6 +74,9 @@ if __name__ == '__main__': #ConfigFlags.Detector.GeometryHGTD = False #isn't a flag -- is it needed? + ConfigFlags.Detector.SimulateBpipe = True + ConfigFlags.Detector.GeometryBpipe = True + #forward region not migrated yet ConfigFlags.Detector.SimulateLucid = False @@ -140,7 +143,7 @@ if __name__ == '__main__': cfg.merge( OutputStreamCfg(ConfigFlags,"HITS", ItemList=["TrackRecordCollection#MuonEntryLayer"])) cfg.merge( OutputStreamCfg(ConfigFlags,"HITS", ItemList=["TrackRecordCollection#MuonExitLayer"])) - + # Dump config cfg.getService("StoreGateSvc").Dump = True cfg.getService("ConditionStore").Dump = True @@ -156,7 +159,7 @@ if __name__ == '__main__': log.info("Run G4AtlasAlg in " + str(b-a) + " seconds") # Success should be 0 - os.sys.exit(not sc.isSuccess()) + #os.sys.exit(not sc.isSuccess()) f=open("test.pkl","wb") cfg.store(f) diff --git a/Simulation/G4Atlas/G4AtlasAlg/test/test_MC16_AtlasG4_ttbar.sh b/Simulation/G4Atlas/G4AtlasAlg/test/test_MC16_AtlasG4_ttbar.sh new file mode 100755 index 0000000000000000000000000000000000000000..0ccd95a86183e87c238de1a78a70172ed8950cd0 --- /dev/null +++ b/Simulation/G4Atlas/G4AtlasAlg/test/test_MC16_AtlasG4_ttbar.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# art-description: MC16-style simulation using FullG4 +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# art-include: 21.9/Athena +# art-include: master/Athena +# art-type: grid +# art-output: test.HITS.pool.root +# art-output: truth.root + +# MC16 setup +# ATLAS-R2-2016-01-00-01 and OFLCOND-MC16-SDR-14 +AtlasG4_tf.py \ +--conditionsTag 'default:OFLCOND-MC16-SDR-14' \ +--physicsList 'FTFP_BERT_ATL' \ +--truthStrategy 'MC15aPlus' \ +--postInclude 'default:PyJobTransforms/UseFrontier.py' \ +--preInclude 'AtlasG4Tf:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \ +--preExec 'AtlasG4Tf:simFlags.TightMuonStepping=True' \ +--DataRunNumber '284500' \ +--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \ +--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1" \ +--outputHITSFile "test.HITS.pool.root" \ +--maxEvents 1 \ +--imf False \ +--athenaopts '"--config-only=oldConfig.pkl"' +#--athenaopts '"--config-only=oldstyle_configMC16.pkl"' + +rc=$? +rc2=-9999 +echo "art-result: $rc simulation" +if [ $rc -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + art.py compare grid --entries 4 ${ArtPackage} ${ArtJobName} --mode=summary + rc2=$? +fi + +echo "art-result: $rc2 regression" diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py index 7fb4f34aa79f765ed28374b6f79f6aec4fb453d1..8ed793c3aaaf352547fec6ab3c5f5560d947a86d 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py @@ -14,8 +14,8 @@ def createSimConfigFlags(): scf.addFlag("Sim.CavernBG",False) #"Write" , "Read" , "Signal" , "WriteWorld" , "SignalWorld" scf.addFlag("Sim.ReadTR",False) - scf.addFlag("Sim.WorldRRange", 12500) #int or float - scf.addFlag("Sim.WorldZRange", 22031) #int or float + scf.addFlag("Sim.WorldRRange", False) #12500. #int or float + scf.addFlag("Sim.WorldZRange", False) #22031. #int or float # the G4 offset. It was never changed, so no need to peek in file scf.addFlag("Sim.SimBarcodeOffset", 200000) diff --git a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py index 468f332834755d08487d6f7447a71534c2b83ce3..38c425174b06673968fba675ef156b57c65933ba 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py @@ -23,7 +23,7 @@ jobproperties.Global.ConditionsTag = "OFLCOND-RUN12-SDR-21" from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.PoolEvgenInput = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mu_E200_eta0-60-10000.evgen.pool.root'] athenaCommonFlags.PoolHitsOutput = "test.HITS.pool.root" -athenaCommonFlags.EvtMax = 3 +athenaCommonFlags.EvtMax = 1 ## Simulation flags from G4AtlasApps.SimFlags import simFlags diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigNew.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigNew.py index 87ea0806970072644632f7eabb86e9701ccad706..d4b7637a2241e8a894a833085c956676d617af29 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigNew.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigNew.py @@ -5,7 +5,8 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator DetectorGeometrySvc, G4AtlasSvc, G4GeometryNotifierSvc, PhysicsListSvc=CompFactory.getComps("DetectorGeometrySvc","G4AtlasSvc","G4GeometryNotifierSvc","PhysicsListSvc",) #the physics region tools -from G4AtlasTools.G4PhysicsRegionConfigNew import SX1PhysicsRegionToolCfg, BedrockPhysicsRegionToolCfg, CavernShaftsConcretePhysicsRegionToolCfg, PixelPhysicsRegionToolCfg, SCTPhysicsRegionToolCfg, TRTPhysicsRegionToolCfg, TRT_ArPhysicsRegionToolCfg, BeampipeFwdCutPhysicsRegionToolCfg, FWDBeamLinePhysicsRegionToolCfg, EMBPhysicsRegionToolCfg, EMECPhysicsRegionToolCfg, HECPhysicsRegionToolCfg, FCALPhysicsRegionToolCfg, FCAL2ParaPhysicsRegionToolCfg, EMECParaPhysicsRegionToolCfg, FCALParaPhysicsRegionToolCfg +from G4AtlasTools.G4PhysicsRegionConfigNew import SX1PhysicsRegionToolCfg, BedrockPhysicsRegionToolCfg, CavernShaftsConcretePhysicsRegionToolCfg, PixelPhysicsRegionToolCfg, SCTPhysicsRegionToolCfg, TRTPhysicsRegionToolCfg, TRT_ArPhysicsRegionToolCfg, BeampipeFwdCutPhysicsRegionToolCfg, FWDBeamLinePhysicsRegionToolCfg, EMBPhysicsRegionToolCfg, EMECPhysicsRegionToolCfg, HECPhysicsRegionToolCfg, FCALPhysicsRegionToolCfg, FCAL2ParaPhysicsRegionToolCfg, EMECParaPhysicsRegionToolCfg, FCALParaPhysicsRegionToolCfg +from G4AtlasTools.G4PhysicsRegionConfigNew import DriftWallPhysicsRegionToolCfg, DriftWall1PhysicsRegionToolCfg, DriftWall2PhysicsRegionToolCfg #the geometry tools from G4AtlasTools.G4GeometryToolConfig import MaterialDescriptionToolCfg, G4AtlasDetectorConstructionToolCfg, ATLASEnvelopeCfg @@ -37,7 +38,7 @@ def getATLAS_RegionCreatorList(ConfigFlags): if True: regionCreatorList += [BeampipeFwdCutPhysicsRegionToolCfg(ConfigFlags)] #if simFlags.ForwardDetectors.statusOn and simFlags.ForwardDetectors() == 2: - if True: + if False: regionCreatorList += [FWDBeamLinePhysicsRegionToolCfg(ConfigFlags)] if ConfigFlags.Detector.SimulateCalo: if ConfigFlags.Detector.GeometryLAr: @@ -51,7 +52,7 @@ def getATLAS_RegionCreatorList(ConfigFlags): # Logging.log.info(' Please try again with a different value of either simFlags.LArParameterization (' + str(simFlags.LArParameterization()) + ') or simFlags.CalibrationRun ('+str(ConfigFlags.Sim.CalibrationRun)+')') # raise RuntimeError('Configuration not allowed') #if simFlags.LArParameterization() > 0: - if True: + if False: regionCreatorList += [EMBPhysicsRegionToolCfg(ConfigFlags), EMECPhysicsRegionToolCfg(ConfigFlags), HECPhysicsRegionToolCfg(ConfigFlags), FCALPhysicsRegionToolCfg(ConfigFlags)] # FIXME 'EMBPhysicsRegionTool' used for parametrization also - do we need a second instance?? @@ -62,16 +63,16 @@ def getATLAS_RegionCreatorList(ConfigFlags): pass #todo - add the line below #regionCreatorList += [PreSampLArPhysicsRegionToolCfg(ConfigFlags), DeadMaterialPhysicsRegionToolCfg(ConfigFlags)] - elif False: # simFlags.LArParameterization() is None or simFlags.LArParameterization() == 0: + elif True: # simFlags.LArParameterization() is None or simFlags.LArParameterization() == 0: regionCreatorList += [EMBPhysicsRegionToolCfg(ConfigFlags), EMECPhysicsRegionToolCfg(ConfigFlags), HECPhysicsRegionToolCfg(ConfigFlags), FCALPhysicsRegionToolCfg(ConfigFlags)] ## FIXME _initPR never called for FwdRegion?? #if simFlags.ForwardDetectors.statusOn: # if DetFlags.geometry.FwdRegion_on(): # regionCreatorList += ['FwdRegionPhysicsRegionTool'] - #if ConfigFlags.Detector.GeometryMuon: + if ConfigFlags.Detector.GeometryMuon: #todo - add the line below - #regionCreatorList += [DriftWallPhysicsRegionTool(ConfigFlags), DriftWall1PhysicsRegionTool(ConfigFlags), DriftWall2PhysicsRegionTool(ConfigFlags)] + regionCreatorList += [DriftWallPhysicsRegionToolCfg(ConfigFlags), DriftWall1PhysicsRegionToolCfg(ConfigFlags), DriftWall2PhysicsRegionToolCfg(ConfigFlags)] #if ConfigFlags.Sim.CavernBG != 'Read' and not (simFlags.RecordFlux.statusOn and simFlags.RecordFlux()): #pass #todo - add the line below diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py index f0fd6c06e608e4cad26868ca7d0a553aafa0cca1..6a94ce3af91d7b4e12236ca9996b6673b0e74142 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfigNew.py @@ -5,7 +5,8 @@ from MCTruthBase.MCTruthBaseConfigNew import MCTruthSteppingActionToolCfg from G4AtlasServices.G4AtlasServicesConf import G4UA__UserActionSvc -from G4UserActions.G4UserActionsConfigNew import AthenaStackingActionToolCfg#, AthenaTrackingActionToolCfg +from G4UserActions.G4UserActionsConfigNew import AthenaStackingActionToolCfg, AthenaTrackingActionToolCfg, LooperKillerToolCfg, G4SimTimerToolCfg, G4TrackCounterToolCfg + # New function for all user action types @@ -15,18 +16,17 @@ def getDefaultActions(ConfigFlags): actions = [] # System stacking action - #actions += ['G4UA::AthenaStackingActionTool'] actions += [result.popToolsAndMerge( AthenaStackingActionToolCfg(ConfigFlags) )] # Some truth handling actions (and timing) if not ConfigFlags.Sim.ISFRun: actions += [ - #result.popToolsAndMerge( AthenaTrackingActionToolCfg(ConfigFlags) ), - result.popToolsAndMerge( MCTruthSteppingActionToolCfg(ConfigFlags) ) - #'G4UA::G4SimTimerTool'] + result.popToolsAndMerge( AthenaTrackingActionToolCfg(ConfigFlags) ), + result.popToolsAndMerge( MCTruthSteppingActionToolCfg(ConfigFlags) ), + result.popToolsAndMerge( G4SimTimerToolCfg(ConfigFlags)) ] # Track counter - #actions += ['G4UA::G4TrackCounterTool'] + actions += [result.popToolsAndMerge( G4TrackCounterToolCfg(ConfigFlags) ) ] # Cosmic Perigee action if ConfigFlags.Beam.Type == 'cosmics' and ConfigFlags.Sim.CavernBG: @@ -47,6 +47,7 @@ def getDefaultActions(ConfigFlags): if ConfigFlags.Sim.CalibrationRun == 'LAr+Tile': actions+=['G4UA::CaloG4::CalibrationDefaultProcessingTool'] + actions += [ result.popToolsAndMerge( LooperKillerToolCfg(ConfigFlags) ) ] return actions def UserActionSvcCfg(ConfigFlags, name="G4UA::UserActionSvc", **kwargs): @@ -56,12 +57,9 @@ def UserActionSvcCfg(ConfigFlags, name="G4UA::UserActionSvc", **kwargs): """ result = ComponentAccumulator() - #how to convert this flag? - from G4AtlasApps.SimFlags import simFlags - optActions = simFlags.OptionalUserActionList.get_Value() # new user action tools kwargs.setdefault('UserActionTools', - getDefaultActions(ConfigFlags) + optActions['General']) + getDefaultActions(ConfigFlags)) # placeholder for more advanced config, if needed result.addService ( G4UA__UserActionSvc(name, **kwargs) ) diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py index 43eb1273b093acfce8d092528f87cc23c6f87a65..4826177bf7182e2fc33a8952d7f2e76ed0ca838f 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfigNew.py @@ -165,7 +165,7 @@ def generateCaloSensitiveDetectorList(ConfigFlags): # SensitiveDetectorList += [ toolDeadSensitiveDetector, toolInactiveSensitiveDetector , toolActiveSensitiveDetector ] #<<<migrate above #elif ConfigFlags.Sim.CalibrationRun == 'DeadLAr': - if ConfigFlags.Sim.CalibrationRun == 'DeadLAr': + if True: #ConfigFlags.Sim.CalibrationRun == 'DeadLAr': accDeadSensitiveDetector = LArDeadSensitiveDetectorToolCfg(ConfigFlags) SensitiveDetectorList += [ result.popToolsAndMerge(accDeadSensitiveDetector) ] diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py index d963567e3dcaa3fdb02ca9181c1cf34432b80749..56306fdf8b8666a0d56601c511141e5a17388ae9 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py @@ -344,36 +344,37 @@ def ATLASEnvelopeCfg(ConfigFlags, name="Atlas", **kwargs): outerRadii[i] = AtlasOuterR1 ## World R range - routValue = ConfigFlags.Sim.WorldRRange - if ConfigFlags.Sim.WorldRRange > max(AtlasOuterR1, AtlasOuterR2): - for i in xrange(4, 14): - outerRadii[i] = routValue - else: - raise RuntimeError('getATLASEnvelope: ERROR ConfigFlags.Sim.WorldRRange must be > %f. Current value %f' % (max(AtlasOuterR1, AtlasOuterR2), routValue) ) + if ConfigFlags.Sim.WorldRRange: + routValue = ConfigFlags.Sim.WorldRRange + if ConfigFlags.Sim.WorldRRange > max(AtlasOuterR1, AtlasOuterR2): + for i in xrange(4, 14): + outerRadii[i] = routValue + else: + raise RuntimeError('getATLASEnvelope: ERROR ConfigFlags.Sim.WorldRRange must be > %f. Current value %f' % (max(AtlasOuterR1, AtlasOuterR2), routValue) ) kwargs.setdefault("OuterRadii", outerRadii) ## ZSurfaces zSurfaces = [-26046., -23001., -23001., -22031., -22031., -12899., -12899., -6741., -6741., 6741., 6741., 12899., 12899., 22031., 22031., 23001., 23001., 26046.] # FIXME units mm?? - + if ConfigFlags.Detector.SimulateForward: zSurfaces[0] = -400000. zSurfaces[17] = 400000. #leave a check in for WorldRrange and WorldZrange? - #if simFlags.WorldZRange.statusOn: - - if ConfigFlags.Sim.WorldZRange < 26046.: - raise RuntimeError('getATLASEnvelope: ERROR ConfigFlags.Sim.WorldZRange must be > 26046. Current value: %f' % ConfigFlags.Sim.WorldZRange) - zSurfaces[17] = ConfigFlags.Sim.WorldZRange + 100. - zSurfaces[16] = ConfigFlags.Sim.WorldZRange + 50. - zSurfaces[15] = ConfigFlags.Sim.WorldZRange + 50. - zSurfaces[14] = ConfigFlags.Sim.WorldZRange - zSurfaces[13] = ConfigFlags.Sim.WorldZRange - zSurfaces[0] = -ConfigFlags.Sim.WorldZRange - 100. - zSurfaces[1] = -ConfigFlags.Sim.WorldZRange - 50. - zSurfaces[2] = -ConfigFlags.Sim.WorldZRange - 50. - zSurfaces[3] = -ConfigFlags.Sim.WorldZRange - zSurfaces[4] = -ConfigFlags.Sim.WorldZRange + if ConfigFlags.Sim.WorldZRange: + print ConfigFlags.Sim.WorldZRange + if ConfigFlags.Sim.WorldZRange < 26046.: + raise RuntimeError('getATLASEnvelope: ERROR ConfigFlags.Sim.WorldZRange must be > 26046. Current value: %f' % ConfigFlags.Sim.WorldZRange) + zSurfaces[17] = ConfigFlags.Sim.WorldZRange + 100. + zSurfaces[16] = ConfigFlags.Sim.WorldZRange + 50. + zSurfaces[15] = ConfigFlags.Sim.WorldZRange + 50. + zSurfaces[14] = ConfigFlags.Sim.WorldZRange + zSurfaces[13] = ConfigFlags.Sim.WorldZRange + zSurfaces[0] = -ConfigFlags.Sim.WorldZRange - 100. + zSurfaces[1] = -ConfigFlags.Sim.WorldZRange - 50. + zSurfaces[2] = -ConfigFlags.Sim.WorldZRange - 50. + zSurfaces[3] = -ConfigFlags.Sim.WorldZRange + zSurfaces[4] = -ConfigFlags.Sim.WorldZRange kwargs.setdefault("ZSurfaces", zSurfaces) accSubDetectors, SubDetectorList = generateSubDetectorList(ConfigFlags) diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py index a1461fcb26cf3542b0aa6a9a08daa227d82a898a..178c718740d832c6f5a700e51d8eb25c321a7096 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigNew.py @@ -1,7 +1,7 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -from G4UserActions.G4UserActionsConf import G4UA__AthenaStackingActionTool, G4UA__AthenaTrackingActionTool +from G4UserActions.G4UserActionsConf import G4UA__AthenaStackingActionTool, G4UA__AthenaTrackingActionTool, G4UA__LooperKillerTool, G4UA__G4SimTimerTool, G4UA__G4TrackCounterTool # this is a bit cumbersome, but it seems ike it is a lot easier to separate # the getter functionality from all the rest (i.e. adding the action). @@ -47,3 +47,19 @@ def AthenaTrackingActionToolCfg(ConfigFlags, name='G4UA::AthenaTrackingActionToo kwargs.setdefault('SubDetVolumeLevel', subDetLevel) result.setPrivateTools( G4UA__AthenaTrackingActionTool(name,**kwargs) ) return result + +def LooperKillerToolCfg(ConfigFlags, name='G4UA::LooperKillerTool', **kwargs): + result = ComponentAccumulator() + result.setPrivateTools(G4UA__LooperKillerTool(name, **kwargs)) + return result + +def G4SimTimerToolCfg(ConfigFlags, name='G4UA::G4SimTimerTool', **kwargs): + result = ComponentAccumulator() + result.setPrivateTools(G4UA__G4SimTimerTool(name,**kwargs)) + return result + + +def G4TrackCounterToolCfg(ConfigFlags, name='G4UA::G4TrackCounterTool', **kwargs): + result = ComponentAccumulator() + result.setPrivateTools(G4UA__G4TrackCounterTool(name,**kwargs)) + return result \ No newline at end of file