ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasServicesConfig Namespace Reference

Functions

 PhysicsListSvcCfg (flags, name="PhysicsListSvc", **kwargs)
 UserLimitsSvcCfg (flags, name="UserLimitsSvc", **kwargs)

Function Documentation

◆ PhysicsListSvcCfg()

G4AtlasServicesConfig.PhysicsListSvcCfg ( flags,
name = "PhysicsListSvc",
** kwargs )

Definition at line 15 of file G4AtlasServicesConfig.py.

15def PhysicsListSvcCfg(flags, name="PhysicsListSvc", **kwargs):
16 result = ComponentAccumulator()
17 PhysOptionList = [ result.popToolsAndMerge(G4StepLimitationToolCfg(flags)) ]
18 if flags.Sim.ISF.Simulator.isQuasiStable():
19 #Quasi stable particle simulation
20 PhysOptionList += [ result.popToolsAndMerge(ExtraParticlesPhysicsToolCfg(flags)) ] # FIXME more configuration required in this method
21 PhysOptionList += [ result.popToolsAndMerge(G4EMProcessesPhysicsToolCfg(flags)) ]
22 #PhysOptionList += flags.Sim.PhysicsOptions # FIXME Missing functionality
23 if flags.Detector.GeometryTRT:
24 PhysOptionList +=[ result.popToolsAndMerge(TRTPhysicsToolCfg(flags)) ]
25 if flags.Detector.GeometryLucid or flags.Detector.GeometryAFP or flags.Detector.GeometryZDC:
26 from LUCID_OpProcess.LUCID_OpProcessConfig import LucidPhysicsToolCfg
27 PhysOptionList +=[result.popToolsAndMerge(LucidPhysicsToolCfg(flags))]
28 kwargs.setdefault("PhysOption", PhysOptionList)
29 PhysDecaysList = []
30 kwargs.setdefault("PhysicsDecay", PhysDecaysList)
31 kwargs.setdefault("PhysicsList", flags.Sim.PhysicsList)
32 if 'PhysicsList' in kwargs:
33 if kwargs['PhysicsList'].endswith('_EMV') or kwargs['PhysicsList'].endswith('_EMX'):
34 raise RuntimeError( 'PhysicsList not allowed: '+kwargs['PhysicsList'] )
35
36 kwargs.setdefault("GeneralCut", 1.)
37 if flags.Sim.CavernBackground not in [CavernBackground.Read, CavernBackground.Write]:
38 kwargs.setdefault("NeutronTimeCut", flags.Sim.NeutronTimeCut)
39 kwargs.setdefault("NeutronEnergyCut", flags.Sim.NeutronEnergyCut)
40 kwargs.setdefault("ApplyEMCuts", flags.Sim.ApplyEMCuts)
41 kwargs.setdefault("QuietMode", flags.Exec.QuietMode)
42
43 #fast simulation constructor tool
44 kwargs.setdefault("FastSimConstructor", result.popToolsAndMerge(FastSimulationConstructorToolCfg(flags)))
45
46
49 """ --- ATLASSIM-3967 ---
50 these two options are replaced by SetNumberOfBinsPerDecade
51 which now controls both values.
52 """
53
55 if flags.Sim.ISF.Simulator.usesFatras():
56 kwargs.setdefault("UnstableAntiNeutrons", True) # Fix for ATLASSIM-6634 - consider fixing for FullG4 also
57 result.addService(CompFactory.PhysicsListSvc(name, **kwargs), primary = True)
58 return result
59
60

◆ UserLimitsSvcCfg()

G4AtlasServicesConfig.UserLimitsSvcCfg ( flags,
name = "UserLimitsSvc",
** kwargs )

Definition at line 61 of file G4AtlasServicesConfig.py.

61def UserLimitsSvcCfg(flags, name="UserLimitsSvc", **kwargs):
62 result = ComponentAccumulator()
63 result.addService(CompFactory.UserLimitsSvc(name, **kwargs), primary = True)
64 return result