ATLAS Offline Software
Loading...
Searching...
No Matches
Pepper_Common.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2#
3# Generators/Pepper_i/share/common/Pepper_Common.py
4#
5# JO fragment that runs Pepper and produces a parton-level event file.
6# Include this from a DSID JO file after setting at minimum:
7#
8# PEPPER_PROCESS = "ppjj" # any built-in Pepper process shortcut
9#
10# Optional overrides:
11#
12# PEPPER_NEVENTS - default: evgenConfig.nEventsPerJob
13# PEPPER_SEED - default: runArgs.randomSeed
14# PEPPER_ECM - default: runArgs.ecmEnergy
15# PEPPER_OUTPUT - default: "pepper.events.gz"
16# PEPPER_BATCH_SIZE - default: min(nevents, 5000)
17# PEPPER_N_BATCHES - default: 2 * nevents / batch_size
18# PEPPER_EXTRA_ARGS - list of additional CLI args, default: []
19#
20# After this fragment runs, an event file is on disk at the path
21# `PEPPER_OUTPUT`. To shower it with Pythia8, include the standard
22# Pythia8 fragments after this one in the DSID JO and point Pythia8
23# at the file. For example:
24#
25# PEPPER_PROCESS = "ppjj"
26# include("Pepper_i/Pepper_Common.py")
27# include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
28# include("Pythia8_i/Pythia8_LHEF.py")
29# genSeq.Pythia8.Commands += [ "Beams:LHEF = " + PEPPER_OUTPUT ]
30#
31# This fragment requires the Pepper_i package and a GPU-equipped
32# worker node. See Generators/Pepper_i/doc/README.md.
33
34from Pepper_i.PepperConfig import run_pepper
35
36_process = globals().get("PEPPER_PROCESS")
37_nevents = globals().get("PEPPER_NEVENTS", evgenConfig.nEventsPerJob)
38_seed = globals().get("PEPPER_SEED", runArgs.randomSeed)
39_ecm = globals().get("PEPPER_ECM", runArgs.ecmEnergy)
40_output = globals().get("PEPPER_OUTPUT", "pepper.events.gz")
41_batch_size = globals().get("PEPPER_BATCH_SIZE", None)
42_n_batches = globals().get("PEPPER_N_BATCHES", None)
43_extra = globals().get("PEPPER_EXTRA_ARGS", None)
44
45if _process is None:
46 raise RuntimeError(
47 "Pepper_Common.py: please set PEPPER_PROCESS in the JO "
48 "(e.g. PEPPER_PROCESS = 'ppjj').")
49
50# Run Pepper. PEPPER_OUTPUT is exported back into the JO scope so
51# downstream fragments can pick it up.
52PEPPER_OUTPUT = run_pepper(
53 process = _process,
54 nevents = _nevents,
55 seed = _seed,
56 ecm = _ecm,
57 output = _output,
58 batch_size = _batch_size,
59 n_batches = _n_batches,
60 extra_args = _extra,
61)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132