This code prepares CLAS121 simulation samples for the e4ν collaboration. First, it writes particles' momenta and vertex coordinates (the event's position in the target) to LUND text files. These are truth-level particles: the particles before detector simulation. In a separate step, it submits jobs that run GEMC2 detector simulation and COATJAVA3 reconstruction. GEMC simulates the detector response; reconstruction uses that response to determine the measured particles.
| Workflow | What it does | Main result |
|---|---|---|
create-lund |
Writes LUND input from randomly sampled particles or existing event-generator output | LUND files and a LUND creation log (JSON) listing their settings and event counts and marking completion of the checked creation stages |
submit |
Submits simulation and reconstruction jobs to Jefferson Lab’s computing farm (ifarm), using the Slurm job scheduler | A job ID and a Slurm submission log (JSON) describing the accepted submission; the jobs later write simulated and reconstructed HIPO files |
The uniform LUND creator randomly chooses particle momenta and angles within your configured ranges. Its samples are deliberately unphysical and are used to study which particles the detector can detect and reconstruct. The physical LUND converter copies supported particles from existing event-generator output; it currently reads GENIE production output in the GST format stored in ROOT files. Both applications use the same code to sample one vertex position in the target per event and assign it to every particle, write and split LUND files, and record the settings used.
The submitted jobs produce reconstructed HIPO files, which can be analyzed with CLAS12ROOT. This code does not run a physical event generator, calculate detector acceptance, select events from reconstructed files, or perform physics analysis. Creating LUND files never submits jobs automatically.
The code Wiki is the user and developer manual. Its home page gives separate reading paths for running the software and extending it.
For a small uniform run on ifarm, use the profile uniform-1e-5986MeV.conf. A profile is a text file containing the sample settings:
source run.csh \
--workflow create-lund \
--source uniform \
--config config/samples/uniform-lund-creation/uniform-1e-5986MeV.conf \
--events 100 \
--output /path/to/quickstart-outputUse run.csh in an ifarm clone of the repository used for running code, not editing it. Edit the code locally, then update the ifarm checkout through Git. Before running the selected workflow, the script discards uncommitted edits to files tracked by Git and deletes files Git does not track, including ignored files. It preserves the build/ directory, then updates the code from Git and builds when needed. It checks the full sample settings only afterward, so an invalid command can still clean the checkout before failing.
Commit and push development changes from your local clone first. Store generated samples outside the ifarm repository directory so the next cleanup cannot delete them. For local development, build with CMake and run the compiled applications directly; those commands do not clean or update the checkout.
After LUND creation succeeds, preview simulation submission with the run's lundfiles/ directory:
source run.csh \
--workflow submit \
--lund-dir /path/to/quickstart-output/Uniform__1e__5986MeV/lundfilesWithout --execute, the command checks and prints the settings but does not submit jobs. Review the detector settings and the directories it would delete before adding --execute.
Useful entry points:
The longer command collections under tutorials/ demonstrate every public option. Historical implementations are preserved in the legacy-code-archive tag and are not part of the current manual.
Footnotes
-
V. D. Burkert et al., “The CLAS12 Spectrometer at Jefferson Laboratory,” Nucl. Instrum. Meth. A 959, 163419 (2020). doi:10.1016/j.nima.2020.163419 ↩
-
M. Ungaro et al., “The CLAS12 Geant4 simulation,” Nucl. Instrum. Meth. A 959, 163422 (2020). doi:10.1016/j.nima.2020.163422 ↩
-
V. Ziegler et al., “The CLAS12 software framework and event reconstruction,” Nucl. Instrum. Meth. A 959, 163472 (2020). doi:10.1016/j.nima.2020.163472 ↩