4 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
5 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
6 from SimuJobTransforms.CommonSimulationSteering
import CommonSimulationCfg, specialConfigPreInclude, specialConfigPostInclude
9 from AthenaCommon
import JobProperties
10 JobProperties.jobPropertiesDisallowed =
True
14 from AthenaCommon.Logging
import logging
15 log = logging.getLogger(
'TeamBeam')
16 log.info(
'****************** STARTING ATLASG4 Test Beam *****************')
18 log.info(
'**** Transformation run arguments')
19 log.info(
str(runArgs))
21 log.info(
'**** Setting-up configuration flags')
22 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
23 from AthenaConfiguration.Enums
import BeamType
24 from SimulationConfig.SimEnums
import SimulationFlavour
28 if not hasattr(runArgs,
'geometryVersion'):
29 log.info(
'no geometryVersion specified, so assuming tb_Tile2000_2003_5B')
30 flags.GeoModel.AtlasVersion =
"ATLAS-CTB-01"
33 from AthenaConfiguration.Enums
import ProductionStep
34 flags.Common.ProductionStep = ProductionStep.Simulation
36 flags.Beam.Type = BeamType.TestBeam
38 flags.Sim.GenerationConfiguration=
"ParticleGun.ParticleGunConfig.ParticleGun_TestBeam_SingleParticleCfg"
39 flags.IOVDb.DatabaseInstance =
"TMCP200"
41 flags.Sim.ISF.Simulator = SimulationFlavour.AtlasG4
44 flags.Sim.ISFRun =
False
56 if hasattr(runArgs,
'inputEVNTFile'):
57 flags.Input.Files = runArgs.inputEVNTFile
61 flags.Input.Files = []
62 flags.Input.isMC =
True
63 log.info(
'No inputEVNTFile provided. Assuming that you are running a generator on the fly.')
64 if hasattr(runArgs,
'outputHITSFile'):
65 if runArgs.outputHITSFile ==
'None':
66 flags.Output.HITSFileName =
''
68 flags.Output.HITSFileName = runArgs.outputHITSFile
70 raise RuntimeError(
'No outputHITSFile defined')
72 if hasattr(runArgs,
'conditionsTag'):
73 flags.IOVDb.GlobalTag = runArgs.conditionsTag
76 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
80 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
93 from SimulationConfig.SimConfigFlags
import simulationRunArgsToFlags
97 from SimulationConfig.TestBeamConfigFlags
import testBeamRunArgsToFlags
118 from PyUtils.AMITagHelperConfig
import AMITagCfg
125 log.info(
"Run G4AtlasAlg in " +
str(time.time()-tic) +
" seconds")
127 sys.exit(
not sc.isSuccess())