3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 if flags.Concurrency.NumThreads >1:
9 from AthenaCommon
import Logging
10 log=Logging.logging.getLogger(name)
11 log.fatal(
' Attempt to run '+name+
' with more than one thread, which is not supported')
14 from RHadronMasses
import offset_options
15 kwargs.setdefault(
'RHadronPDGIDList',offset_options.keys())
19 result.setPrivateTools( CompFactory.G4UA__SG_StepNtupleTool(name, **kwargs) )
25 result.setPrivateTools( CompFactory.RHadronsPhysicsTool(name,**kwargs) )
30 print (
"Start of RHadronsPreInclude")
31 if 'Py8' not in flags.Input.GeneratorsInfo
and 'Pythia8' not in flags.Input.GeneratorsInfo:
32 raise RuntimeError(
'Pythia8 not found in generator metadata - will abort')
37 from RHadrons.GeneratePythiaCommands_RHadrons
import generatePythia8Commands
43 if not os.path.isfile(
'ProcessList.txt'):
44 raise RuntimeError(
'ProcessList.txt (needed by G4ProcessHelper) is missing - will abort')
45 if not os.path.isfile(
'PhysicsConfiguration.txt'):
46 raise RuntimeError(
'PhysicsConfiguration.txt (needed by G4ProcessHelper) is missing - will abort')
47 if not os.path.isfile(
'PYTHIA8_COMMANDS.TXT'):
48 raise RuntimeError(
'PYTHIA8_COMMANDS.TXT (needed by Pythia8ForDecays) is missing - will abort')
49 print (
"End of RHadronsPreInclude")
54 print(
"Running RHadronsCfg")
56 from AthenaConfiguration.Enums
import ProductionStep
57 if flags.Common.ProductionStep == ProductionStep.Simulation:
58 from G4AtlasServices.G4AtlasServicesConfig
import PhysicsListSvcCfg
61 result.getService(
"PhysicsListSvc").PhysOption += physicsOptions