Command-line utilities


simulate_pixels.py

The main simulation entry point. Run with --help for the full option list:

simulate_pixels.py --help

Key options:

Option

Description

--config

Named configuration keyword (module0, 2x2, ndlar, …)

--input_filename

Path to HDF5 input file (edep-sim output)

--output_filename

Path for the HDF5 output file

--pixel_layout

Path to pixel layout YAML

--detector_properties

Path to detector properties YAML

--response_file

Path to charge response .npy look-up table

--light_simulated

True / False — enable light simulation

--light_lut_filename

Path to light LUT .npz file

--light_det_noise_filename

Path to SiPM noise spectrum .npy file

--mod2mod_variation

True / False — enable per-module hardware variation


dumpTree.py

Converts the ROOT output of edep-sim into the HDF5 format expected by simulate_pixels.py. Requires ROOT and Geant4 to be installed; it is independent from the rest of the larnd-sim package.

Converts ROOT file created by edep-sim into HDF5 format

cli.dumpTree.printPrimaryParticle(depth, primaryParticle)[source][source]
cli.dumpTree.printPrimaryVertex(depth, primaryVertex)[source][source]
cli.dumpTree.printTrajectoryPoint(depth, trajectoryPoint)[source][source]
cli.dumpTree.printTrajectory(depth, trajectory)[source][source]
cli.dumpTree.printHitSegment(depth, hitSegment)[source][source]
cli.dumpTree.printSegmentContainer(depth, containerName, hitSegments)[source][source]
cli.dumpTree.initHDF5File(output_file)[source][source]
cli.dumpTree.updateHDF5File(output_file, trajectories, segments, vertices)[source][source]
cli.dumpTree.dump(input_file, output_file, keep_all_dets=False)[source][source]

Script to convert edep-sim root output to an h5 file formatted in a way that larnd-sim expects for consumption.

Parameters:
  • input_file (str) – path to an input ROOT file containing spills.

  • output_file (str) – name of the h5 output file to which the information should be written


list_config_keys.py

Prints all configuration keywords defined in larndsim/config/config.yaml:

list_config_keys.py

diff_files.py

Utility for comparing two larnd-sim HDF5 output files field-by-field. Useful for regression testing after code changes.


sort_packets.py

Sorts the packets dataset of a larnd-sim output file by timestamp. Some downstream tools assume time-ordered packets.