Search/Navigation:
Related:
SLAC/EPP
/HPS Public
Jefferson Lab/Hall B
/HPS Run Wiki
S30XL-LESA/LDMX
...
File | Description | Notes |
---|---|---|
egs5_* | egs5 event generation executables | |
stdhep_* | StdHep tools | |
hps-mc-env.sh | Bash setup script | |
hps-mc-env.csh | CSH setup script | |
lcio_dumpevent | utility for dumping LCIO event data | |
hps-mc-bsub | wrapper for submitting LSF jobs | |
hps-mc-jsub | wrapper for submitting Auger jobs | |
hps-mc-workflow | wrapper for creating job workflows |
The project comes with a number of pre-written scripts in the python/jobs dir for running typical HPS MC jobs.
Python script | Description | Notes |
---|---|---|
ap_job.py | Generate A-primes using MadGraph4 | |
beam_job.py | Generate beam backgrounds using egs5 | |
dst_job.py | Create ROOT DST output from recon LCIO files | |
egs5_beam_v3_job.py | Generate beam backgrounds using v3 of egs5 generator | |
egs5_beam_v5_job.py | Generate beam backgrounds using v5 of egs5 generator | |
lcio_concat_job.py | Concatenate a number of LCIO files together into a single output file | |
lcio_count_job.py | Count the number of events in an LCIO file and throw an error if there are not enough | |
tritrig_job.py | Generate trident events with trigger cuts | |
tuple_job.py | Create ROOT tuple output from one or more input LCIO recon files | |
wab_beam_job.py | Create wab-beam events from WAB and beam inputs and run in SLIC | |
wab_beam_tri_job.py | Create wab-beam-tri events from wab-beam and tritrig inputs and run in SLIC | |
wab_job.py | Generate WAB events in MadGraph4 |
All job scripts follow a specific structure.
First, necessary dependencies are imported.
Code Block | ||
---|---|---|
| ||
from hpsmc.job import Job
from hpsmc.generators import MG4 |
Next the job is created and the parameters are fetched into a local variable.
Code Block | ||
---|---|---|
| ||
job = Job(name="AP job")
job.initialize()
params = job.params |
One or more components should be added to the job, for instance an event generator to create some LHE files.
Code Block | ||
---|---|---|
| ||
# generate A-prime events using Madgraph 4
ap = MG4(name="ap",
run_card="run_card_"+params.run_params+".dat",
params={"APMASS": params.apmass},
outputs=[filename],
nevents=params.nevents) |
Finally, the components should be added to the job and the job should be run.
Code Block | ||
---|---|---|
| ||
job.components = [ap]job.run() |
The specific way that input and output files are used depends on the job script.
Typically, input files are read in without alteration, and (some) scripts can process multiple inputs while some cannot (depending on the particularities of the tools being used).
Output files written to the local "scratch" directory may be based on the name of input files or in some cases will be particular to a given script.
You must know the names of the output files in order to include them as output in your JSON parameters.