16 from AthenaCommon.Logging
import logging
17 logFastChain = logging.getLogger(
'FastChainSkeleton')
18 logFastChain.info(
'****************** STARTING FastChain Simulation *****************')
20 logFastChain.info(
'**** Transformation run arguments')
21 logFastChain.info(
str(runArgs))
23 logFastChain.info(
'**** Setting-up configuration flags')
24 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
27 from SimulationConfig.SimEnums
import SimulationFlavour
31 from AthenaConfiguration.Enums
import ProductionStep
32 flags.Common.ProductionStep = ProductionStep.FastChain
35 if hasattr(runArgs,
'simulator'):
36 flags.Sim.ISF.Simulator = SimulationFlavour(runArgs.simulator)
39 flags.Sim.ISFRun =
True
42 if hasattr(runArgs,
'inputRDO_BKGFile')
or hasattr(runArgs,
'inputBS_SKIMFile'):
44 from OverlayConfiguration.OverlaySkeleton
import setOverlayInputFiles
46 flags.Common.isOverlay =
True
47 flags.Digitization.PileUp =
False
49 if flags.Overlay.DataOverlay
and not flags.Overlay.ByteStream:
50 from SimulationConfig.SimEnums
import VertexSource
51 flags.Sim.VertexSource = VertexSource.MatchingBkg
54 if hasattr(runArgs,
'inputEVNTFile'):
55 flags.Input.Files = runArgs.inputEVNTFile
57 raise RuntimeError(
'No input EVNT file defined')
60 if hasattr(runArgs,
'outputHITSFile'):
61 flags.Output.HITSFileName = runArgs.outputHITSFile
63 if hasattr(runArgs,
'outputRDOFile'):
64 if runArgs.outputRDOFile ==
'None':
65 flags.Output.RDOFileName =
''
67 flags.Output.RDOFileName = runArgs.outputRDOFile
69 raise RuntimeError(
'No outputRDOFile defined')
71 if flags.Common.isOverlay:
72 if hasattr(runArgs,
'outputRDO_SGNLFile'):
73 flags.Output.RDO_SGNLFileName = runArgs.outputRDO_SGNLFile
75 if hasattr(runArgs,
'conditionsTag'):
76 flags.IOVDb.GlobalTag = runArgs.conditionsTag
79 from SimuJobTransforms.SimulationHelpers
import getDetectorsFromRunArgs
83 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
87 from SimulationConfig.SimConfigFlags
import simulationRunArgsToFlags
91 from DigitizationConfig.DigitizationConfigFlags
import digitizationRunArgsToFlags
95 if not flags.Common.isOverlay:
97 from DigitizationConfig.DigitizationConfigFlags
import setupDigitizationFlags
99 logFastChain.info(
'Running with pile-up: %s', flags.Digitization.PileUp)
102 if hasattr(runArgs,
'triggerConfig')
and runArgs.triggerConfig ==
'NONE':
103 flags.Detector.EnableL1Calo =
False
106 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
118 if not flags.Common.isOverlay:
120 from DigitizationConfig.DigitizationConfigFlags
import pileupRunArgsToFlags
124 if flags.Digitization.PileUp:
125 from RunDependentSimComps.PileUpUtils
import setupPileUpProfile
128 flags.Sim.DoFullChain =
True
132 flags.Input.OverrideRunNumber =
not flags.Common.isOverlay
140 if flags.Common.isOverlay:
141 from OverlayConfiguration.OverlayMetadata
import fastChainOverlayMetadataCheck
147 if flags.Digitization.PileUp:
148 from DigitizationConfig.PileUpConfig
import PileUpEventLoopMgrCfg
156 from BeamEffects.BeamEffectsAlgConfig
import BeamEffectsAlgCfg
159 if not flags.Digitization.PileUp
and not flags.Common.isOverlay:
162 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoUpdateFromContextAlgCfg
165 if flags.Common.isOverlay:
166 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoOverlayCfg
169 if not flags.Overlay.DataOverlay:
170 from OverlayCopyAlgs.OverlayCopyAlgsConfig
import CopyMcEventCollectionCfg
173 from ISF_Config.ISF_MainConfig
import ISF_KernelCfg
177 if flags.Common.isOverlay:
178 from OverlayConfiguration.OverlaySteering
import OverlayMainContentCfg
181 from DigitizationConfig.DigitizationSteering
import DigitizationMainContentCfg
185 if flags.Output.HITSFileName:
186 from AthenaConfiguration.Enums
import MetadataCategory
187 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
188 from SimuJobTransforms.SimOutputConfig
import getStreamHITS_ItemList
189 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
194 from DigitizationConfig.DigitizationSteering
import DigitizationMessageSvcCfg
206 from AthenaConfiguration.Utils
import setupLoggingLevels
211 sys.exit(
not sc.isSuccess())