1 """Construct Generator configuration flags
3 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
6 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
10 """Return an AthConfigFlags object with required flags"""
11 gencf = AthConfigFlags()
14 gencf.addFlag(
"Generator.ignoreBlackList",
False)
17 gencf.addFlag(
"Generator.inputGeneratorFile",
'')
20 gencf.addFlag(
"Generator.inputFilesPerJob", 1)
23 gencf.addFlag(
"Generator.nEventsPerJob", 10000)
26 gencf.addFlag(
"Generator.DSID", 999999)
29 gencf.addFlag(
"Generator.firstEvent", -1)
32 gencf.addFlag(
"Generator.printEvts", 0)
35 gencf.addFlag(
"Generator.outputYODAFile",
'')
38 gencf.addFlag(
"Generator.rivetAnalyses",
'')
44 """Fill generator configuration flags from run arguments."""
48 if hasattr(runArgs,
"ecmEnergy"):
49 flags.Beam.Energy = runArgs.ecmEnergy/2 * GeV
51 raise RuntimeError(
"No center of mass energy provided.")
53 if hasattr(runArgs,
"ignoreBlackList"):
54 flags.Generator.ignoreBlackList = runArgs.ignoreBlackList
56 if hasattr(runArgs,
"inputGeneratorFile"):
57 flags.Generator.inputGeneratorFile = runArgs.inputGeneratorFile
59 if hasattr(runArgs,
"firstEvent"):
60 flags.Generator.firstEvent = runArgs.firstEvent
62 if hasattr(runArgs,
"printEvts"):
63 flags.Generator.printEvts = runArgs.printEvts
65 if hasattr(runArgs,
"outputYODAFile"):
66 flags.Generator.outputYODAFile = runArgs.outputYODAFile
68 if hasattr(runArgs,
"rivetAnas"):
69 flags.Generator.rivetAnalyses = runArgs.rivetAnas