BEF-QM: design and calculated yields of a 40 kW electron-accelerator facility for medical radionuclides,
gold from mercury and nitrogen-vacancy diamond  --  calculation package (Supplementary Information)
Author: Dr. Hasan Börekci (hborekci@hotmail.com.tr, ORCID 0000-0001-9137-6342).   Package date: 1 December 2026.

Everything quoted in the manuscript is produced by the scripts in this folder or taken from the cited publications.
No experimental data were generated. The figures of the facility are ray-traced renderings of a design model, not photographs.

1. Transport (Geant4)
   g4/g4run.py, g4/g4run2.py   Geant4 model (geant4_pybind 0.1.3, Geant4 11, EM physics option 4): electron beam -> tungsten
                               converter -> cylindrical target. Scores photon and electron track-length spectra in the target
                               (0.25 MeV bins), energy deposited in converter and target, positrons leaving the converter, neutrons.
   g4/jobs1.txt, jobs2.txt, jobs3.txt, runjobs.sh    run parameters of every case
   g4/out_<case>_<seed>.json   output of every case (these files are what the folding scripts read)
       scanMo_c*   converter-thickness scan, 100Mo target, 40 MeV      prodMo, prodZn, prodTi   base design, 40 MeV
       prodMo35, prodMo55   beam-energy dependence                      prodHg40, prodHg55       mercury loop, 40 and 55 MeV
       benchHg55   geometry of Kazakov et al. 2022 (benchmark)          posW*, posTa5            positron yield of the converter
       opt*        fifteen further targets (Table 2): Cu, Ca-48, Ge, Zr, Pd, Sn-112, Cd, Sm, Ni, Au, graphite, water, Na, U, diamond

2. Cross sections and folding
   xs_lib.py, xs2.py           residual-production cross sections from the ENDF/B-VIII.0 photonuclear sublibrary (MF3/MF6 MT5 and
                               explicit channels). The library files are not redistributed; download "ENDF-B-VIII.0_gammas" from the
                               National Nuclear Data Center (https://www.nndc.bnl.gov/endf-b8.0/) into endf/ENDF-B-VIII.0_gammas/.
   fold.py                     Y = n * integral( sigma(E) * l(E) dE ), Eq. (1) of the manuscript
   data/iaea_livechart_ground_states.csv   half-lives, abundances, separation energies (IAEA Live Chart of Nuclides, 1 Dec 2026)

3. Results
   calc_qm.py   -> results_qm.json    base design: Table 1, gold from mercury, diamond line
   calc_opt.py  -> results_opt.json   further products (Table 2, Table S1), co-produced nuclides, mercury benchmarks (Table S2),
                                      195Au in the gold, platinum from gold, neutrons, positrons, boron in diamond, radiation processing
   verify_qm.py -> verify_output.txt  independent re-calculation of 50 quoted numbers (own folding directly on the ENDF files,
                                      half-lives from the IAEA table); all 50 agree

4. Figures
   plots2.py                   Figs. 6-8
   rk.py, sc_a.py, sc_b.py, sc_linac.py, sc_hot.py, sc_dia.py, sc_fac.py   three-dimensional design model (Mitsuba 3 + trimesh)
   render_all.py, occl.py, labels.py, compose.py                            rendering, visibility of the call-outs, labels, composition
                               (Figs. 1-5 and S1-S5)

Requirements: Python 3.10+, numpy, endf, geant4_pybind, matplotlib, mitsuba 3, trimesh, shapely, opencv-python, Pillow.
To reproduce the numbers without running Geant4 again: python3 calc_qm.py; python3 calc_opt.py; python3 verify_qm.py
