Builds and runs run_pbwo4 ten times with 10k events each, then moves
the renamed outputs to /ceph/lbogner/geant_steps/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pre-step direction was already recorded; post_dx/dy/dz lets students
compare momentum direction before and after each step.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switches from the old per-component Dockerfile-mini to a unified
Dockerfile that uses the superbuild CMake setup, Ubuntu 24.04, uv for
Python dependency management, and pyproject.toml for the Python
environment.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Superbuild: install step creates build/run_pbwo4 symlink pointing at
the executable in build/minicalosim-build/.
Regular build: CMAKE_RUNTIME_OUTPUT_DIRECTORY ensures the executable
lands in build/ regardless of generator.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
superbuild/CMakeLists.txt uses ExternalProject_Add to give three targets:
cmake -B build -S superbuild/
cmake --build build --target geant4 # build Geant4 → build/geant4-install
cmake --build build --target run_pbwo4 # build minicalosim against it
cmake --build build # both
The existing root CMakeLists.txt (find_package Geant4) is unchanged
for the system-Geant4 workflow.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch from upstream Geant4/geant4 on GitHub to lbogner/geant4 on
GitLab, which carries the minicalosim-spawning branch with the
pre-assigned track ID changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each Steps row now carries a variable-length child_track_ids int array
containing the track IDs of all secondaries spawned during that step.
The parent_id column is removed — parentage is now expressed
unidirectionally (parent→children) via child_track_ids and the Spawning
ntuple, rather than bidirectionally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each step that spawns secondaries now writes one row per secondary to a
new Spawning ntuple (event_id, parent_track_id, parent_step_no,
child_track_id). This enables direct shower-tree reconstruction without
position joins. Requires the companion Geant4 submodule change that
pre-assigns track IDs in ProcessSecondariesFromParticleChange.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
G4Calo.py prints the commit at import time, resolved via a
minicalo_version.py file (baked in by Docker) or git rev-parse
from the file's directory as fallback.
event_id in the Steps ntuple restarts from 0 in each subprocess;
_assemble_results_to_mini_df now accepts per-file event_id_offsets
so IDs are globally unique after merging. run_batch passes cumulative
nevents as offsets when loading the Steps tree.
Dockerfiles write minicalo_version.py before copying Python files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The submodule leaves a .git *file* (not directory) pointing to
../../.git/modules/lib/geant4, which passes G4GitUtilities' guard
but causes a FATAL_ERROR when git status fails in the bare /tmp dir.
Remove .git before cmake so the guard fires and the check is skipped.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 15 new columns to the Steps ntuple: edep, step_length, parent_id,
process name, layer_id, material, pre-step momentum direction, and
B/E field components (in T and V/m) at the pre-step point.
Replace wget Geant4 tarball download in all three Dockerfiles with
ADD of the lib/geant4 submodule source; narrow submodule init to
lib/pybind11 only so builds no longer require network access for Geant4.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
run_pbwo4.py simulates 10 events in a single 20cm G4_PbWO4 layer
(10x10 sensor grid, 1 GeV e-) and saves results as a pickle next to
the script. Both images now expose /examples containing all bind/ files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dockerfile-mini builds a lightweight image with only what's needed to
run the bind/ examples: Geant4 v11.1.2 (batch mode, no visualization),
Python 3.10, and numpy/pandas/uproot/awkward/plotly/ipython.
Examples are copied to /examples which is also the working directory.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a second ntuple alongside the existing "Hits" ntuple with one row
per Geant4 step. Records event_id, track_id, step_no, PDG code, and
pre/post position + kinetic energy for every step in the simulation.
Also extends run_batch() with return_steps=False; when True, returns
(hits_mf, steps_mf) instead of just hits_mf.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>