From 7a62a46fe6e92441165530f0b412e477f074a0c8 Mon Sep 17 00:00:00 2001 From: Lars Bogner Date: Mon, 8 Jun 2026 13:59:01 +0200 Subject: [PATCH] add run_pbwo4.py and include examples dir in both Docker images 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 --- bind/run_pbwo4.py | 14 ++++++++++++++ docker/Dockerfile | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 bind/run_pbwo4.py diff --git a/bind/run_pbwo4.py b/bind/run_pbwo4.py new file mode 100644 index 0000000..5eb80e4 --- /dev/null +++ b/bind/run_pbwo4.py @@ -0,0 +1,14 @@ +import os +from G4Calo import run_batch +from minicalo import GeometryDescriptor + +output_dir = os.path.dirname(os.path.abspath(__file__)) + +gd = GeometryDescriptor() +gd.addLayer(20.0, "G4_PbWO4", True, 10, 10) + +df = run_batch(gd, 10, "e-", 1.0) + +out = os.path.join(output_dir, "pbwo4_10events.pkl") +df.to_pickle(out) +print(f"Saved {len(df)} events to {out}") diff --git a/docker/Dockerfile b/docker/Dockerfile index 06ff5bb..843f2fe 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -102,6 +102,8 @@ RUN cp /root/minicalosim/build/minicalo* /root/minicalosim/bind/G4Calo.py /root/ RUN cp /root/minicalosim/bind/G4Calo_exec.py /usr/local/bin/ +RUN cp -r /root/minicalosim/bind /examples + RUN cp /root/minicalosim/docker/start-notebook.py /usr/local/bin/ RUN cp /root/minicalosim/docker/start-notebook.sh /usr/local/bin/ RUN cp /root/minicalosim/docker/start-singleuser.py /usr/local/bin/