5 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
6 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
7 from SimuJobTransforms.CommonSimulationSteering
import specialConfigPreInclude, specialConfigPostInclude
10 from AthenaCommon
import JobProperties
11 JobProperties.jobPropertiesDisallowed =
True
15 from AthenaCommon.Logging
import logging
16 log = logging.getLogger(
'HITtoRDO')
17 log.info(
'****************** STARTING HITtoRDO *****************')
19 log.info(
'**** Transformation run arguments')
20 log.info(
str(runArgs))
22 log.info(
'**** Setting-up configuration flags')
23 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
28 if not hasattr(runArgs,
'inputHITSFile'):
29 raise RuntimeError(
'No input HITS file defined')
31 if not hasattr(runArgs,
'outputRDOFile'):
32 raise RuntimeError(
'No output RDO file defined')
34 flags.Input.isMC =
True
35 flags.Input.Files = runArgs.inputHITSFile
36 flags.Output.RDOFileName = runArgs.outputRDOFile
39 if hasattr(runArgs,
'runNumber'):
40 if flags.Input.MCChannelNumber != runArgs.runNumber:
41 log.warning(
'Got different MC channel number (%d) from runNumber than from metadata (%d)', runArgs.runNumber, flags.Input.MCChannelNumber)
42 flags.Input.MCChannelNumber = runArgs.runNumber
44 log.info(
'MC channel number: %d', flags.Input.MCChannelNumber)
47 if hasattr(runArgs,
'detectors'):
48 detectors = runArgs.detectors
53 from DigitizationConfig.DigitizationConfigFlags
import digitizationRunArgsToFlags
57 from DigitizationConfig.DigitizationConfigFlags
import setupDigitizationFlags
59 log.info(
'Running with pile-up: %s', flags.Digitization.PileUp)
62 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
66 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
79 from DigitizationConfig.DigitizationConfigFlags
import pileupRunArgsToFlags
83 if flags.Digitization.PileUp:
84 from RunDependentSimComps.PileUpUtils
import setupPileUpProfile
97 from DigitizationConfig.DigitizationSteering
import DigitizationMainCfg
101 from DigitizationConfig.DigitizationSteering
import DigitizationMessageSvcCfg
113 from AthenaConfiguration.Utils
import setupLoggingLevels
117 from PyUtils.AMITagHelperConfig
import AMITagCfg
122 sys.exit(
not sc.isSuccess())