Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FileDescriptionNotes
egs5_*egs5 event generation executables 
stdhep_*StdHep tools 
hps-mc-env.shBash setup script 
hps-mc-env.cshCSH setup script 
lcio_dumpeventutility for dumping LCIO event data 
hps-mc-bsubwrapper for submitting LSF jobs 
hps-mc-jsubwrapper for submitting Auger jobs 
hps-mc-workflowwrapper for creating job workflows 

 


Job Scripts

The project comes with a number of pre-written scripts in the python/jobs dir for running typical HPS MC jobs.

Python scriptDescriptionNotes
ap_job.pyGenerate A-primes using MadGraph4 
beam_job.pyGenerate beam backgrounds using egs5 
dst_job.pyCreate ROOT DST output from recon LCIO files 
egs5_beam_v3_job.pyGenerate beam backgrounds using v3 of egs5 generator 
egs5_beam_v5_job.pyGenerate beam backgrounds using v5 of egs5 generator 
lcio_concat_job.pyConcatenate a number of LCIO files together into a single output file 
lcio_count_job.pyCount the number of events in an LCIO file and throw an error if there are not enough 
tritrig_job.pyGenerate trident events with trigger cuts 
tuple_job.pyCreate ROOT tuple output from one or more input LCIO recon files 
wab_beam_job.pyCreate wab-beam events from WAB and beam inputs and run in SLIC 
wab_beam_tri_job.pyCreate wab-beam-tri events from wab-beam and tritrig inputs and run in SLIC 
wab_job.pyGenerate WAB events in MadGraph4 

Job Scripts

All job scripts follow a specific structure.

First, necessary dependencies are imported.

Code Block
languagepy
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
languagepy
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
languagepy
# 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
languagepy
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.