14 from AthenaCommon.Logging
import logging
15 log = logging.getLogger(
'Sim_tf')
16 log.info(
'****************** STARTING Simulation *****************')
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 SimulationConfig.SimEnums
import SimulationFlavour
29 from AthenaConfiguration.Enums
import ProductionStep
30 flags.Common.ProductionStep = ProductionStep.Simulation
33 if hasattr(runArgs,
'simulator'):
34 flags.Sim.ISF.Simulator = SimulationFlavour(runArgs.simulator)
37 flags.Sim.ISFRun =
True
38 flags.Sim.ISF.ReSimulation =
True
41 from SimuJobTransforms.SimulationHelpers
import getDetectorsFromRunArgs
44 if hasattr(runArgs,
'inputHITSFile'):
45 flags.Input.Files = runArgs.inputHITSFile
47 log.error(
'No inputHITSFile provided. Please try using Sim_tf.py instead.')
48 raise RuntimeError(
'No intputHITSFile provided.')
50 if hasattr(runArgs,
'outputHITS_RSMFile'):
51 if runArgs.outputHITS_RSMFile ==
'None':
52 flags.Output.HITSFileName =
''
54 flags.Output.HITSFileName = runArgs.outputHITS_RSMFile
57 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
61 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
74 from SimulationConfig.SimConfigFlags
import simulationRunArgsToFlags
86 from SimuJobTransforms.ReSimInputConfig
import RenameHitCollectionsOnReadCfg
99 from PyUtils.AMITagHelperConfig
import AMITagCfg
106 log.info(
"Run resimulation in " +
str(time.time()-tic) +
" seconds")
108 sys.exit(
not sc.isSuccess())