ATLAS Offline Software
evgenTrfArgs.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 import PyJobTransforms.trfArgClasses as trfArgClasses
4 
5 def addStdEvgenArgs(parser):
6  parser.defineArgGroup("Evgen", "Event generator options")
7 
8  parser.add_argument("--ecmEnergy", "--EcmEnergy", group="Evgen",
9  default=trfArgClasses.argFloat(13000, runarg=True),
10  help="centre-of-mass energy parameter in GeV",
12 
13  parser.add_argument("--firstEvent", "--FirstEvent", group="Evgen",
14  default=trfArgClasses.argInt(1, runarg=True),
15  help="the number of the first event in the output data file",
17 
18  parser.add_argument("--randomSeed", "--RandomSeed", "--seed", group="Evgen", nargs="+",
19  default=trfArgClasses.argSubstepInt("all:12345"),
20  help="a seed for the MC generator random number engines",
22 
23  parser.add_argument("--printEvts", group="Evgen",
24  default=trfArgClasses.argInt(5, runarg=True),
25  help="number of full event dumps to print out for debugging",
27 
28  parser.add_argument("--jobConfig", "--JobConfig", "--jo", group="Evgen", nargs="+",
29  help="a comma-separated list of job configuration script files",
31 
32  # TODO: Add "--eventFile"?
33  parser.add_argument("--inputGeneratorFile", "--inputGenEventFile", "--inputGenFile", "--InputGeneratorFile", group="Evgen",
34  help="optional parton-level events file to be processed",
36 
37  parser.add_argument("--inputEVNTFile", group="Evgen",
38  help="input EVNT file (for use with e.g. Rivet)",
39  type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io='input', runarg=True))
40 
41  parser.add_argument("--inputEVNT_PreFile", group="Evgen",
42  help="input evgen file for processing with afterburner, e.g. EvtGen",
43  type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io='input', runarg=True))
44 
45  parser.add_argument("--evgenJobOpts", "--EvgenJobOpts", group="Evgen",
46  help="download and install the EvgenJobOpts tarball with the given name",
48 
49  # TODO: make optional: by default auto-determine from the JO name. If NONE, don't write?
50  parser.add_argument("--outputEVNTFile", "--OutputEVNTFile", group="Evgen",
51  help="POOL file into which generated events will be written",
52  type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io='output', runarg=True))
53 
54  parser.add_argument("--outputEVNT_PreFile", "--OutputEVNT_PreFile", group="Evgen",
55  help="POOL file into which pre-afterburner generated events will be written",
56  type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io='output', runarg=True))
57 
58  parser.add_argument('--outputNTUP_TRUTHFile',
59  type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, io='output', treeNames=['truth']),
60  help='Output NTUP_TRUTH file', group='Evgen')
61 
62  parser.add_argument("--outputYODAFile", group="Evgen",
63  help="Name of YODA file for Rivet histo output",
64  type=trfArgClasses.argFactory(trfArgClasses.argYODAFile, type='yoda', io='output', runarg=True))
65 
66  parser.add_argument("--rivetAnas", group="Evgen",
67  help="a comma-separated list of Rivet analyses to run on the resulting events",
69 
70  parser.add_argument("--outputTXTFile", group="Evgen",
71  help="optional output TXT file for LHEF events, default is None",
72  type=trfArgClasses.argFactory(trfArgClasses.argLHEFile, io='output', runarg=True))
73 
74  parser.add_argument("--generatorRunMode", group="Evgen",
75  help="Run mode to pass on to the event generator",
76  default=trfArgClasses.argString("run", runarg=True),
77  choices=[trfArgClasses.argString("read", runarg=True),
78  trfArgClasses.argString("build", runarg=True),
79  trfArgClasses.argString("integrate", runarg=True),
80  trfArgClasses.argString("mergegrids", runarg=True),
81  trfArgClasses.argString("run", runarg=True)],
83 
84  parser.add_argument("--generatorJobNumber", group="Evgen",
85  help="Job number to pass on to the event generator",
86  default=trfArgClasses.argInt(0, runarg=True),
88 
89  parser.add_argument('--lheOnly', '--lheOnly', group='Evgen',
90  default=trfArgClasses.argInt(0, runarg=True),
92  help='Set to 1 if Evgen file should be removed')
93 
94  parser.add_argument("--localPath", group="Evgen",
95  help="Name of local path to JOs",
97 
98  parser.add_argument('--saveList', '--saveList', group='Evgen',
99  help="a comma-separated list of files to be saved in output or a single digit if the whole output directory is to be saved",
101 
102  parser.add_argument('--cleanOut', '--cleanOut', group='Evgen',
103  default=trfArgClasses.argInt(0, runarg=True),
105  help='Set to any digit !=0 if the output files should be cleaned up --saveList may help to save selected files')
106 
107  parser.add_argument('--VERBOSE', '--Verbose', '--Debug', '--DEBUG', group='Evgen',
108  help = 'set logging level to DEBUG',
110  default=trfArgClasses.argBool('False'))
111 
112  parser.add_argument('--ignoreBlackList', '--ignoreBlacklist', group='Evgen',
113  help = 'ignore Blacklist - allows to run a test in a blacklisted release',
115  default=trfArgClasses.argBool('False'))
python.trfArgClasses.argNTUPFile
NTUP (plain ROOT) file class.
Definition: trfArgClasses.py:1679
python.trfArgClasses.argLHEFile
LHE ASCII file.
Definition: trfArgClasses.py:1858
python.trfArgClasses.argEVNTFile
Definition: trfArgClasses.py:1603
PyJobTransforms.trfArgClasses
Transform argument class definitions.
python.trfArgClasses.argFloat
Float type argument.
Definition: trfArgClasses.py:261
python.trfArgClasses.argList
List of string arguments.
Definition: trfArgClasses.py:348
python.trfArgClasses.argFactory
Factory class used to generate argument class instances for argparse.
Definition: trfArgClasses.py:31
python.trfArgClasses.argBool
Boolean type argument.
Definition: trfArgClasses.py:317
python.trfArgClasses.argString
String type argument.
Definition: trfArgClasses.py:174
python.trfArgClasses.argSubstepList
Argument class for substep lists, suitable for preExec/postExec.
Definition: trfArgClasses.py:2036
python.evgenTrfArgs.addStdEvgenArgs
def addStdEvgenArgs(parser)
Definition: evgenTrfArgs.py:5
python.trfArgClasses.argYODAFile
Definition: trfArgClasses.py:1249
python.trfArgClasses.argSubstepInt
Int substep argument.
Definition: trfArgClasses.py:2182
python.trfArgClasses.argInt
Int type argument.
Definition: trfArgClasses.py:225