Sunday, November 22, 2026
Science
No Result
View All Result
  • Login
  • HOME
  • SCIENCE NEWS
  • CONTACT US
  • HOME
  • SCIENCE NEWS
  • CONTACT US
No Result
View All Result
Scienmag
No Result
View All Result
Home Science News Technology and Engineering

Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation

November 22, 2026
in Technology and Engineering
Denise Maddox
By Denise Maddox Scienmag Editorial Profile - Mechanical Engineering
Reading Time: 6 mins read
0
Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation

Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation

65
SHARES
587
VIEWS
Share on FacebookShare on Twitter
ADVERTISEMENT

Medical physicists Víctor Daniel Díaz Martínez and Shirin A. Enger have introduced Monte Carlo Accessible Detector Development, an open-source software framework engineered to streamline the computational prototyping of radiation instrumentation. Operating as an integrated bridge between high-level graphical design and low-level source programming, the framework couples an intuitive graphical user interface with the automatic generation of fully editable C++ source components for the widely utilized Geant4 simulation toolkit. The platform provides a structured, three-phase workflow encompassing geometry and radioactive source specification, rigorous particle transport and dose scoring, and multi-metric post-processing analysis. By generating transparent and modular C++ classes rather than encasing simulations within an impenetrable black-box abstraction, the software allows researchers to rapidly configure standard geometries while retaining the capability to intervene directly in the underlying source code whenever specialized experimental conditions demand manual customization.

Monte Carlo transport calculations represent a foundational methodology in medical physics, nuclear instrumentation, and radiation detection because they accurately simulate stochastic radiation interactions across heterogeneous materials and intricate geometries prior to physical fabrication. Among the available simulation packages, including EGSnrc, MCNP, and FLUKA, the open-source Geant4 toolkit is renowned for offering comprehensive electromagnetic, optical, hadronic, and radioactive decay physics models spanning vast energy domains. Nevertheless, this exceptional flexibility carries a notoriously complex application architecture that imposes a steep technical threshold on investigators. Establishing even an elementary detector simulation generally necessitates authoring, configuring, and linking multiple discrete C++ classes to oversee geometry construction, primary particle kinematics, physical interaction processes, sensitive-detector data scoring, and file input and output. Developing customized simulations from scratch frequently demands deep structural familiarity with Geant4 class hierarchies and substantial programming effort during preliminary prototyping.

A spectrum of existing Geant4-based tools has previously sought to mitigate this software implementation overhead through disparate architectural approaches. Established packages like TOPAS rely on text-based parameter control systems to configure geometries, sources, and physics lists; GATE furnishes a modular environment tailored predominantly for clinical nuclear medicine and medical imaging; GAMOS uses command-driven scripts alongside C++ extension capabilities; and Ants3 integrates graphical desktop environments with Python and JavaScript scripting interfaces. Concurrently, specialized tools such as AlfaMC prioritize execution speed for alpha-particle tracking by implementing simplified interaction models rather than full Geant4 physics, occasionally incurring substantial discrepancies in low-energy dispersion. Rather than attempting to supplant these mature platforms or altering fundamental particle interaction physics, MC-ADD addresses detector design by pairing graphical parameterization directly with the automatic production of standalone, inspectable Geant4 source code alongside specialized analytical post-processing routines.

The execution pipeline of MC-ADD proceeds across three sequential functional phases that systematize the path from configuration to quantitative interpretation. In the initial phase, users enter spatial dimensions, structural shapes, elemental compositions, and source parameters into a Python-driven desktop interface. The underlying script interprets these inputs to automatically draft the corresponding Geant4 DetectorConstruction class and executable run macros adhering to modern Geant4 11 architectural standards. In the second operational phase, the generated source code is incorporated into the Geant4 application, compiled via CMake, and executed through standard terminal commands to perform particle tracking and energy scoring, storing output data into structured comma-separated value tables. In the final phase, an independent post-processing script ingests these data tables to compute detector response metrics, including multi-channel energy deposition spectra, spatial hit coordinates, absolute and full-energy-peak detection efficiencies, percentage depth-dose curves, and three-dimensional voxelized absorbed dose distributions.

From a software implementation standpoint, the framework is built using C++ and Python version 3.12.5, requiring CMake 3.16 or higher, Geant4 version 11.2.2, and CADMesh version 2. The desktop interface relies on standard Tkinter libraries, ensuring cross-platform stability across verified deployments on macOS Sequoia 15 and Ubuntu 24.04.1. The distribution includes distinct interface scripts tailored for layout considerations on macOS and Ubuntu, though both share identical underlying functional code and support Linux environments generally. Computational post-processing routines harness widely adopted analytical libraries, specifically NumPy, Pandas, and Matplotlib, combined with a custom visualization module designated VDDColorMap.py. To ensure structural integrity before users proceed to compilation, an automated validation script titled MC-ADD_CheckGeometry.py executes whenever the interface is closed, verifying that the generated C++ construction code contains valid syntax and volume relationships ready for immediate build operations.

Within the graphical environment, researchers can define foundational detector and source envelopes by selecting standard geometric primitives such as boxes and cylinders, whose positioning, physical dimensions, and material compositions are configured through dedicated entry fields. Chemical compositions can be assigned directly from the comprehensive internal Geant4 materials database, while explicit templated examples are embedded in the generated source code to guide the manual declaration of specialized compounds. To accommodate geometrically complex detector components such as bespoke collimators or curved housings, the interface incorporates CADMesh v2 to import external stereolithography polygon mesh files. While the graphical user interface currently designates box and cylinder volumes as sensitive scoring detectors and leaves imported mesh materials to be defined within the C++ files, the generated code remains completely exposed, allowing researchers to designate imported polygon meshes as sensitive volumes directly within the source text.

Radiation transport within the software relies strictly on native Geant4 physics libraries, preserving standardized transport fidelity without heuristic approximations. The default physics construction incorporates G4DecayPhysics and G4RadioactiveDecayPhysics, coupled with an application-specific electromagnetic physics constructor. Photon and electron transport simulations utilize the standard G4EmStandardPhysics constructor, encompassing photoelectric absorption, Compton scattering, and Rayleigh scattering mechanisms, while heavy charged-particle routines implement G4EmStandardPhysics_option4, which provides refined models for ionization, multiple Coulomb scattering, nuclear stopping, and evaluated stopping-power tables with electron production thresholds set to four micrometers. During active transport, the sensitive detector architecture records interaction records through Geant4 command-based scoring mechanisms and custom RunAction routines. These classes generate structured Ntuple files capturing individual event identifiers, three-dimensional coordinates, and localized energy depositions, alongside binned histogram tables and voxelized dose grids with configurable spatial resolutions down to ten-micrometer cubic elements.

To rigorously verify framework performance, the developers conducted three distinct illustrative benchmarks reflecting classic experimental challenges. The first validation investigated gamma-ray spectrometry using a Capintec Captus 3000 well-type sodium iodide scintillation detector measuring 51 millimeters in external diameter and height, configured with an internal well 16 millimeters wide and 40 millimeters deep. The detector housing and crystal geometry were incorporated via imported stereolithography mesh files. Inside the well, investigators simulated a calibrated caesium-137 rod source possessing a 4.75-millimeter active core diameter across five discrete active thicknesses ranging from 0.5 to 12.7 millimeters, alongside two wider scenarios distributing activity across the full 12.7-millimeter rod diameter. Simulating 100 million radioactive decay events required approximately 23 hours of single-threaded computation on a standard Dell OptiPlex 7060 workstation powered by an Intel Core i7-8700 processor with 16 gigabytes of random-access memory.

Analysis of the resulting caesium-137 energy spectra using the post-processing script demonstrated robust reproduction of fundamental physical transport phenomena. The raw simulated spectrum clearly resolved the characteristic 662-kiloelectronvolt full-energy photopeak, the backscatter peak centered near 184 kiloelectronvolts, the Compton edge around 477 kiloelectronvolts, lead characteristic K-shell X-rays near 75 kiloelectronvolts, barium K-shell emissions at 32 kiloelectronvolts, and iodine escape structures. Applying energy-dependent Gaussian broadening calibrated to the physical Captus detector resolution of 7.8 percent full-width at half-maximum reproduced the experimental spectral shape, exhibiting a simulated photopeak-to-Compton ratio of 1.670 compared to the experimentally measured ratio of 1.699, representing a 1.7 percent difference. For a one-millimeter-thick core source, the simulated full-energy-peak efficiency was 15.802 percent, closely matching the manufacturer-reported efficiency of 15.08 percent within its experimental five-percent calibration uncertainty margin.

The second application benchmark evaluated the spatial modeling capabilities of MC-ADD for non-standard detector geometries using a spiral scintillating-fiber instrument. The model replicated a 92-centimeter-long BCF-12 single-clad optical fiber featuring a 0.97-millimeter polystyrene scintillating core and a 0.03-millimeter polymethyl methacrylate cladding wound in ten helical turns around a central cylindrical support. An aqueous fluorine-18 radionuclide volume housed within a thin cylindrical glass vial was positioned within the interior coil to generate 511-kiloelectronvolt positron annihilation photons. Post-processing routines successfully mapped three-dimensional interaction points along the entire helical fiber path and produced the characteristic Compton-dominated energy spectrum terminating at the 350-kiloelectronvolt Compton edge. The calculated absolute detection efficiency of 0.4198 percent differed by 36.5 percent from earlier published literature values of 0.30758 percent, a divergence attributed to incomplete geometric reporting in the reference publication rather than transport failures.

The third illustrative benchmark verified charged-particle transport, spatial range calculations, and voxelized dose scoring using monoenergetic alpha beams from 6.35 to 9.00 megaelectronvolts alongside americium-241 and radium-224 alpha-decay sources. Directed through a 0.5-millimeter aperture lead collimator into air and water scoring volumes, depth-dose distributions were recorded across micro-scale voxels over 100 million primary histories, requiring 16.5 computation hours. Percentage depth-dose curves exhibited expected Bragg-like distal peaks, from which extrapolated ranges were determined via linear regression of the terminal dose fall-off. Across all simulated energies, the calculated extrapolated ranges agreed with NIST-ASTAR continuous-slowing-down approximation reference values within 0.025 to 0.553 percent in air and 0.85 to 0.97 percent in water, while discrete alpha emission lines from radium-224 decay progeny agreed with reference nuclear decay data within 0.24 to 1.78 percent.

While demonstrating robust physical consistency across photon and charged-particle transport regimes, the authors delineate clear operational boundaries for the present implementation. Scintillation photon generation and optical boundary transport are intentionally omitted from default configurations due to extreme computational costs, and the software has not yet been subjected to systematic external user analytics. The primary impact of the framework remains methodological: by consolidating graphical setup, automated C++ code generation, complex CADMesh import capabilities, and turnkey Python post-processing into an open-source workflow, the software substantially lowers the threshold for configuring Geant4 detector prototypes without relinquishing granular control over the compiled simulation code. Future development aims to package the software alongside Geant4 and associated dependencies within preconfigured container environments like Docker, further removing installation hurdles for experimentalists across the broader medical and radiation physics communities.

Subject of Research: Automated code generation and analysis workflow for radiation detector prototyping in Geant4

Article Title: MC-ADD: A Geant4 code-generation and analysis workflow for radiation detector prototyping

Article References: Díaz Martínez, V. D., & Enger, S. A. (2026). MC-ADD: A Geant4 code-generation and analysis workflow for radiation detector prototyping. SoftwareX, 36, Article 103251. https://doi.org/10.1016/j.softx.2026.103251

Image Credits: AI Generated

DOI: 10.1016/j.softx.2026.103251

Keywords: MC-ADD, Geant4, Monte Carlo simulation, radiation detector, detector prototyping, code generation, medical physics, radiation transport, CADMesh, gamma spectroscopy, caesium-137, scintillating fiber, alpha particle range, absorbed dose scoring, computational dosimetry, NIST-ASTAR, Python GUI

Cite Scienmag News

Denise Maddox. (November 22, 2026). Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation. Scienmag. https://scienmag.com/open-source-framework-automates-geant4-radiation-detector-prototyping-and-code-generation/

Denise Maddox. "Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation." Scienmag, 22 November 2026, https://scienmag.com/open-source-framework-automates-geant4-radiation-detector-prototyping-and-code-generation/. Accessed 22 November 2026.

Denise Maddox. "Open Source Framework Automates Geant4 Radiation Detector Prototyping and Code Generation." Scienmag. November 22, 2026. https://scienmag.com/open-source-framework-automates-geant4-radiation-detector-prototyping-and-code-generation/

Tags: absorbed dose scoringalpha particle rangeCADMeshcaesium-137code generationcomputational dosimetrydetector prototypinggamma-spectroscopyGeant4MC-ADDmedical physicsMonte Carlo simulationNIST-ASTARPython GUIradiation detectorradiation transportscintillating fiber
Share26Tweet16
Previous Post

Neutrophil Drug Delivery Systems Target Inflammation and Tumors in Preclinical Studies

Next Post

Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids

Related Posts

Open Source QGIS Plugin Automates Multi Method Spatial Interpolation for Agriculture
Technology and Engineering

Open Source QGIS Plugin Automates Multi Method Spatial Interpolation for Agriculture

November 22, 2026
Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids
Technology and Engineering

Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids

November 22, 2026
Neutrophil Drug Delivery Systems Target Inflammation and Tumors in Preclinical Studies
Biotechnology

Neutrophil Drug Delivery Systems Target Inflammation and Tumors in Preclinical Studies

November 22, 2026
Italian Citizens Favor Farm Artificial Intelligence While Expressing Notable Response Uncertainty
Agriculture

Italian Citizens Favor Farm Artificial Intelligence While Expressing Notable Response Uncertainty

November 22, 2026
Cross-Environment 3D Documentation Workflow Links Cultural Heritage Mapping to Natural Hazard Simulations
Technology and Engineering

Cross-Environment 3D Documentation Workflow Links Cultural Heritage Mapping to Natural Hazard Simulations

November 22, 2026
Static Lift Corrections Extend Linear Theory for Fixed-Angle Airfoils in Gusts
Technology and Engineering

Static Lift Corrections Extend Linear Theory for Fixed-Angle Airfoils in Gusts

November 22, 2026
Next Post
Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids

Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids

  • Mothers who receive childcare support from maternal grandparents show more optimized

    Mothers who receive childcare support from maternal grandparents show more parental warmth, finds NTU Singapore study

    27656 shares
    Share 11059 Tweet 6912
  • University of Seville Breaks 120-Year-Old Mystery, Revises a Key Einstein Concept

    1061 shares
    Share 424 Tweet 265
  • Bee body mass, pathogens and local climate influence heat tolerance

    682 shares
    Share 273 Tweet 171
  • Researchers record first-ever images and data of a shark experiencing a boat strike

    546 shares
    Share 218 Tweet 137
  • Groundbreaking Clinical Trial Reveals Lubiprostone Enhances Kidney Function

    531 shares
    Share 212 Tweet 133
Science

Embark on a thrilling journey of discovery with Scienmag.com—your ultimate source for cutting-edge breakthroughs. Immerse yourself in a world where curiosity knows no limits and tomorrow’s possibilities become today’s reality!

RECENT NEWS

  • Endothelial FBXW7 Degrades NOTCH1 to Silence SEMA3G and Curb Liver Fibrosis
  • Open Source QGIS Plugin Automates Multi Method Spatial Interpolation for Agriculture
  • Herbal Nanovesicles Suppress Colorectal Tumors and Boost Immunotherapy in Mouse Models
  • Harmony Framework Unifies Modeling and Stability Analysis for Hybrid Power Grids

Categories

  • Agriculture
  • Anthropology
  • Archaeology
  • Athmospheric
  • Biology
  • Biotechnology
  • Blog
  • Bussines
  • Cancer
  • Chemistry
  • Climate
  • Earth Science
  • Editorial Policy
  • Marine
  • Mathematics
  • Medicine
  • Pediatry
  • Policy
  • Psychology & Psychiatry
  • Science Education
  • Science News
  • Social Science
  • Space
  • Technology and Engineering

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,151 other subscribers

© 2026 Scienmag - Science Magazine

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • HOME
  • SCIENCE NEWS
  • CONTACT US

© 2026 Scienmag - Science Magazine

Discover more from Science

Subscribe now to keep reading and get access to the full archive.

Continue reading