5 FrozenTier0PolicyCheck,
10 input_BS_minimum_bias_overlay,
12 input_EVNT_data_overlay,
14 input_HITS_data_overlay,
15 input_HITS_minbias_high,
16 input_HITS_minbias_high_fulltruth,
17 input_HITS_minbias_low,
18 input_HITS_minbias_low_fulltruth,
20 input_HITS_unfiltered,
24from .Test
import TestSetup, WorkflowRun, WorkflowTest, WorkflowType
28 """General workflow q-test."""
30 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
31 if "maxEvents" not in extra_args:
32 if type == WorkflowType.MCPileUpReco
or run == WorkflowRun.Run4:
33 extra_args +=
" --maxEvents 5"
35 extra_args +=
" --maxEvents 20"
37 if type == WorkflowType.MCPileUpReco:
38 if "inputHITSFile" not in extra_args:
39 extra_args += f
" --inputHITSFile {input_HITS[run]}"
40 if "inputRDO_BKGFile" not in extra_args:
41 extra_args +=
" --inputRDO_BKGFile ../run_d*/myRDO.pool.root"
44 threads_argument =
'--multithreaded'
45 if setup.custom_threads
is not None:
46 threads = setup.custom_threads
51 (f
"ATHENA_CORE_NUMBER={threads} Reco_tf.py {threads_argument} --AMIConfig {ID}"
52 f
" --imf False {extra_args}")
63 if not setup.disable_output_checks:
67 super().
__init__(ID, run, type, steps, setup)
71 """Simulation workflow test."""
73 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
74 if "maxEvents" not in extra_args:
75 extra_args +=
" --maxEvents 20"
77 if "jobNumber" not in extra_args
and run
is WorkflowRun.Run3
and type
is WorkflowType.FullSim:
78 extra_args +=
" --jobNumber 5"
81 if "inputEVNTFile" not in extra_args
and "inputHITSFile" not in extra_args:
82 if type
is WorkflowType.HitsFilter:
83 input_argument = f
"--inputHITSFile {input_HITS_unfiltered[run]}"
84 elif type
is WorkflowType.HitsMerge:
85 input_argument = f
"--inputHITSFile {input_HITS[run]}"
87 input_argument = f
"--inputEVNTFile {input_EVNT[run]}"
90 threads_argument =
'--multithreaded'
91 if setup.custom_threads
is not None:
92 threads = setup.custom_threads
96 if type
is WorkflowType.HitsMerge:
98 (f
"ATHENA_CORE_NUMBER={threads} HITSMerge_tf.py {threads_argument} --AMIConfig {ID}"
99 f
" {input_argument} --outputHITS_MRGFile myHITS.pool.root"
100 f
" --imf False {extra_args}")
101 elif type
is WorkflowType.HitsFilter:
103 (f
"ATHENA_CORE_NUMBER={threads} FilterHit_tf.py {threads_argument} --AMIConfig {ID}"
104 f
" {input_argument} --outputHITS_FILTFile myHITS.pool.root"
105 f
" --imf False {extra_args}")
108 (f
"ATHENA_CORE_NUMBER={threads} Sim_tf.py {threads_argument} --AMIConfig {ID}"
109 f
" {input_argument} --outputHITSFile myHITS.pool.root"
110 f
" --imf False {extra_args}")
117 super().
__init__(ID, run, type, steps, setup)
121 """MC overlay workflow test."""
123 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
124 if "maxEvents" not in extra_args:
125 extra_args +=
" --maxEvents 10"
128 (f
"Overlay_tf.py --AMIConfig {ID}"
129 f
" --inputHITSFile {input_HITS[run]} --inputRDO_BKGFile {input_RDO_BKG[run]} --outputRDOFile myRDO.pool.root"
130 f
" --imf False {extra_args}")
140 super().
__init__(ID, run, type, steps, setup)
144 """Data overlay workflow test."""
146 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
147 if "maxEvents" not in extra_args:
148 extra_args +=
" --maxEvents 10"
150 if type
is WorkflowType.DataOverlayChain:
152 (f
"FastChain_tf.py --AMIConfig {ID}"
153 f
" --inputEVNTFile {input_EVNT_data_overlay[run]} --inputRDO_BKGFile {input_RDO_BKG_data[run]} --outputHITSFile myHITS.pool.root --outputRDOFile myRDO.pool.root"
154 f
" --imf False {extra_args}")
157 (f
"Overlay_tf.py --AMIConfig {ID}"
158 f
" --inputHITSFile {input_HITS_data_overlay[run]} --inputRDO_BKGFile {input_RDO_BKG_data[run]} --outputRDOFile myRDO.pool.root"
159 f
" --imf False {extra_args}")
162 if type
is WorkflowType.DataOverlayChain:
173 super().
__init__(ID, run, type, steps, setup)
177 """Digitization with pile-up workflow test."""
179 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
180 if "maxEvents" not in extra_args:
181 extra_args +=
" --maxEvents 5"
183 if "StandardInTimeOnlyTruth" in extra_args:
184 input_high = input_HITS_minbias_high_fulltruth[run]
185 input_low = input_HITS_minbias_low_fulltruth[run]
187 input_high = input_HITS_minbias_high[run]
188 input_low = input_HITS_minbias_low[run]
191 (f
"Digi_tf.py --AMIConfig {ID} --jobNumber 1 --digiSeedOffset1 1 --digiSeedOffset2 1"
192 f
" --inputHITSFile {input_HITS_neutrino[run]} --inputHighPtMinbiasHitsFile {input_high} --inputLowPtMinbiasHitsFile {input_low} --outputRDOFile myRDO.pool.root"
193 f
" --imf False {extra_args}")
200 super().
__init__(ID, run, type, steps, setup)
204 """Data overlay minimum bias preprocessing test."""
206 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
207 if "maxEvents" not in extra_args:
208 extra_args +=
" --maxEvents 5"
211 (f
"Overlay_tf.py --AMIConfig {ID}"
212 f
" --inputBSFile {input_BS_minimum_bias_overlay[run]} --outputRDO_BKGFile myRDO_BKG.pool.root"
213 f
" --imf False {extra_args}")
221 super().
__init__(ID, run, type, steps, setup)
225 """Derivations test."""
227 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
230 test_def = ID.split(
"_")
231 multithreaded =
False
232 if test_def[-2] ==
"MT":
234 test_run = test_def.pop()
236 test_def.append(test_run)
237 data_type = test_def[0].lower()
238 formats = [format.upper()
for format
in test_def[1:-1]]
241 if setup.custom_threads
is not None:
242 threads = setup.custom_threads
246 parallel_compression =
"True"
247 if "inputDAOD_PHYSFile" in extra_args:
249 parallel_compression =
"False"
251 if "maxEvents" not in extra_args:
253 events = threads * base_events + 1
254 extra_args += f
" --maxEvents {events}"
256 if not multithreaded:
258 format_flush =
", ".join([f
"\"{out_stream}_{format}\": {flush}" for format
in formats])
259 extra_args += f
" --preExec 'flags.Output.TreeAutoFlush={{{format_flush}}}'"
261 if "inputAODFile" not in extra_args
and "inputDAOD_PHYSFile" not in extra_args:
262 extra_args += f
" --inputAODFile {input_AOD[run][data_type]}"
265 if not multithreaded:
267 (f
"ATHENA_CORE_NUMBER={threads} Derivation_tf.py"
268 f
" --formats {' '.join(formats)}"
269 " --multiprocess --multithreadedFileValidation True"
270 f
" --athenaMPMergeTargetSize '{out_stream}_*:0'"
271 " --sharedWriter True"
272 f
" --parallelCompression {parallel_compression}"
273 f
" --output{out_stream}File myOutput.pool.root"
274 f
" --imf False {extra_args}")
277 (f
"ATHENA_CORE_NUMBER={threads} Derivation_tf.py"
278 f
" --formats {' '.join(formats)}"
280 f
" --output{out_stream}File myOutput.pool.root"
281 f
" --imf False {extra_args}")
287 for format
in formats:
291 super().
__init__(
"_".join(test_def), run, type, steps, setup)
295 """Generation test."""
297 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str =
"") ->
None:
298 if "output" not in extra_args:
299 extra_args +=
" --outputEVNTFile myEVNT.pool.root"
301 if "maxEvents" not in extra_args:
302 extra_args +=
" --maxEvents 10"
304 if "ecmEnergy" not in extra_args:
305 if run
is WorkflowRun.Run2:
306 extra_args +=
" --ecmEnergy 13000"
307 elif run
is WorkflowRun.Run3:
308 extra_args +=
" --ecmEnergy 13600"
310 extra_args +=
" --ecmEnergy 14000"
312 dsid = ID.replace(
"gen",
"")
315 (f
"Gen_tf.py --jobConfig {dsid}"
316 f
" --imf False {extra_args}")
318 super().
__init__(ID, run, type, steps, setup)
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")
None __init__(self, str ID, WorkflowRun run, WorkflowType type, list[str] steps, TestSetup setup, str extra_args="")