Commit Graph

53 Commits

Author SHA1 Message Date
lars 2715bc8d0d Add next_volume/next_material columns and sampling batch script
Records the volume and material a track is about to enter when a step
ends at a geometric boundary, since post-step's physical volume still
refers to the volume the step occurred in. Also adds
run-sampling-batch.sh to run all run_sampling configs in parallel from
isolated directories, avoiding output filename collisions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 19:24:35 +02:00
lars 0adc896bce add post-step momentum direction to Steps ntuple
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>
2026-06-17 14:40:05 +02:00
lars 517ba2ecb2 add child_track_ids array column to Steps; remove parent_id
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>
2026-06-11 10:30:36 +02:00
lars 9ea0718139 add Spawning ntuple recording secondary births per step
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>
2026-06-11 10:25:08 +02:00
lars 4ffb2f78b8 extend Steps ntuple and switch Docker to Geant4 submodule source
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>
2026-06-08 16:07:17 +02:00
lars 19b1ef125b add per-step kinematics ntuple ("Steps") to ROOT output
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>
2026-06-08 11:37:39 +02:00
Jan Kieseler 7410049a72 added multi particles 2024-10-09 13:05:18 +02:00
Jan Kieseler 7e520d88b9 fixes 2024-09-09 14:56:30 +02:00
Jan Kieseler 9038c9521a better plotting 2024-08-23 11:22:50 +02:00
Jan Kieseler 483f584e1c cuda check and better comment 2024-08-22 16:05:56 +02:00
Jan Kieseler 6ec385d73f removed printout 2024-08-22 15:57:03 +02:00
Jan Kieseler 88b03ecfa3 added randomised x-y position within 15 cm window 2024-08-22 15:56:31 +02:00
Jan Kieseler d8f3a3720a proper seedings 2024-08-22 15:50:24 +02:00
Jan Kieseler e849d0bac5 changed to be serialisable for multiprocessing 2024-07-23 14:01:20 +02:00
Jan Kieseler cb736850e7 fixed assign problems probably 2024-01-25 10:44:39 +01:00
Jan Kieseler 381aa6ea91 output file 2023-10-13 09:09:02 +02:00
Jan Kieseler 296d16fefc proper sensor information 2023-10-10 21:36:09 +02:00
Jan Kieseler 9ded57e14a more safety options for non existing materials 2023-10-10 18:05:35 +02:00
Jan Kieseler 19226f31e6 random seed 2023-10-10 10:12:31 +02:00
Jan Kieseler 45f64c8832 fixed vis and sensor position 2023-10-09 14:03:00 +02:00
Jan Kieseler 647522ae8c another fix 2023-10-09 12:36:03 +02:00
Jan Kieseler 1f208212a6 cout 2023-10-09 12:27:54 +02:00
Jan Kieseler 5699245dd2 another fix 2023-10-09 12:04:04 +02:00
Jan Kieseler 9cd1a93ced fix 2023-10-09 11:55:30 +02:00
Jan Kieseler 51001d1b59 renamed 2023-10-07 11:14:45 +02:00
Jan Kieseler 34a0305601 fixed a few little things 2023-10-07 11:10:57 +02:00
lars f6db42ce09 Add bindings & plotting 2023-10-04 13:36:57 +02:00
Jan Kieseler fb00ca0a7a material printout added but doesn't work yet 2023-09-22 12:14:36 +02:00
Jan Kieseler 8d2302b5dc seems to work with different geometries 2023-09-21 09:06:20 +02:00
Jan Kieseler cee740716c changing geometry now seems to work 2023-09-21 00:10:37 +02:00
Jan Kieseler 0289712866 multi geometry 2023-09-20 23:45:56 +02:00
Jan Kieseler 181af0f356 turn off vis in batch 2023-09-20 23:36:10 +02:00
Jan Kieseler 287f4762b9 fix 2023-09-20 23:11:46 +02:00
Jan Kieseler bdcd83e63f detector change might work - might 2023-09-20 22:51:37 +02:00
Jan Kieseler a6dfa6079c attempt to make re-init possible 2023-09-20 20:29:25 +00:00
Jan Kieseler d66464f48c multithreading 2023-09-20 20:12:10 +00:00
Jan Kieseler 90666bc1be changed to GeV 2023-09-19 09:34:56 +00:00
Jan Kieseler 3f4e47d27b better default viewpoint 2023-09-19 08:03:19 +00:00
Jan Kieseler 8dd0dbb357 fixes 2023-09-11 08:47:37 +02:00
Jan Kieseler 37d5b1eb3e towards vis 2023-09-11 08:33:19 +02:00
Jan Kieseler d3fa0d60cb fixes 2023-09-09 02:07:05 +02:00
Jan Kieseler 21396c1b44 checks 2023-09-09 01:50:40 +02:00
Jan Kieseler a03b3d780a fixes 2023-09-08 22:53:07 +02:00
Jan Kieseler 7716c03bf5 fix attempt 2023-09-08 17:28:11 +02:00
Jan Kieseler 6161ea9a0e fix attempt 2023-09-08 17:27:11 +02:00
Jan Kieseler 1be716e9ab check 2023-09-08 17:19:24 +02:00
Jan Kieseler 0f6a8a61e1 additions 2023-09-08 17:13:30 +02:00
Jan Kieseler a60d901647 added missing piece 2023-09-08 16:44:30 +02:00
Jan Kieseler a01466f649 python bindings to be tested (arm vs intep python issues) 2023-09-08 16:40:28 +02:00
Jan Kieseler a9fc5d8a9a up to output working. missing interface wrapper to python 2023-09-08 14:42:23 +02:00