Skip to content

mcdj

mcdj runs the full CLAS12 simulation pipeline, starting from a clas12-mcgen-compliant generator, the GEMC particle gun, or LUND files. It also supports parallel and series pipelines, background-merging and truth-matching.


Requirements


Installation

mcdj is just a python script. Download and run it.


Usage

Note, a double-dash -- should be used to separate mcdj's options from the generator command-line arguments.

> mcdj -h

usage: mcdj [-h] [-n #] [-j #] [-J #] -g PATH -y PATH [-r RUN] [-m] [-s SEED]
            [-d] [-R] [-q] [-v] [-c] [-b PATH [PATH ...]] [--denoise]
            gen [gen ...]

positional arguments:
  gen                   generator command line or LUND file(s)

options:
  -h, --help            show this help message and exit
  -n, --nevents #       number of events per job (default=10)
  -j, --jobs #          number of parallel jobs (default=1)
  -J, --Jobs #          number of serial jobs (default=1)
  -g, --gcard PATH      GEMC gcard configuration file
  -y, --yaml PATH       COATJAVA yaml configuration file
  -r, --run RUN         run number (default=11)
  -m, --match           enable truth matching
  -s, --seed SEED       random number seed (default=clock)
  -d, --dst             run standalone dst-maker
  -R, --recon           disable reconstruction
  -q, --quiet           silence GEANT4 exceptions
  -v, --verbose         increase verbosity (repeatable)
  -c, --cleanup         delete intermediate outputs
  -b, --back PATH [PATH ...]
                        background files for merging
  --denoise             enable old denoising (use YAML for new)

Examples

  1. Run 12 parallel pipelines, 100 events each, using the dvcsgen generator and its t-min cut:

    mcdj -j 12 -n 100 -g ./gemc.xml -y ./recon.yml -- dvcsgen -t 0.1
    
    2. Process a bunch of LUND files, 3 concurrently:

    mcdj -j 3 ... -- lund1.txt lund2.txt lund3.txt lund4.txt  ...
    
    3. Use GEMC's particle gun:

    mcdj -- gemc -BEAM_P="e-, 6*GeV, 15*deg, 20*deg"
    
    4. Run 100 pipelines, 10 concurrently:

    mcdj -j 10 -J 10 ...
    
    5. Run 100 pipelines in series:
    mcdj -J 100 ...