Geant4 monte carlo energy spectrum detection simulation modeling method based on front and back end separation architecture
By adopting the Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture, the problems of high cost and low accuracy in the measurement of gamma energy spectra of samples with different shapes and materials in traditional methods are solved. This method enables flexible detector simulation and efficiency calibration, and broadens the application range of the detector.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
- Filing Date
- 2022-12-16
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies require the use of standard sources for efficiency calibration when measuring the gamma spectrum of radioactive samples of different shapes and materials, which results in high costs and difficulties, and the self-absorption effect affects accuracy.
We adopt the Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture. Through custom macro instructions, server communication, root software processing, front-end visualization and Docker deployment, we can achieve flexible simulation and efficiency scaling of the detector and avoid using standard sources.
It enables simulation of the response of radioactive sources of various shapes and materials, saving time and costs, broadening the scope of detector applications, and providing a flexible efficiency calibration method.
Smart Images

Figure CN116127712B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of numerical simulation of radioactive gamma spectrum detection, and specifically to a simulation modeling method for Geant4 Monte Carlo spectrum detection based on a front-end and back-end separation architecture. Background Technology
[0002] As is well known, gamma spectroscopy is one of the main techniques for the qualitative and quantitative analysis of natural or artificial radionuclides, such as in environmental sample analysis and activation experiments. This technique analyzes the gamma spectrum measured by the detector by calibrating, counting, and identifying the characteristic energy peaks emitted by different nuclides in the sample. However, when analyzing environmental samples or thickly activated samples, quantifying the emitted radiation is a challenging task fraught with uncertainty due to the matrix effects of numerous and varied types of nuclides. How to reduce this uncertainty remains a topic worthy of further exploration.
[0003] Traditional active efficiency calibration methods face numerous limitations in practical measurements. In actual measurements, the measured objects typically possess various shapes, such as cylinders, mugs, and irregular shapes. Furthermore, the self-absorption effect of the sample can affect the accuracy of the efficiency calibration. Therefore, during sample measurements, a standard source with the same material, composition, and dimensions as the sample is required for detector efficiency calibration, increasing the difficulty and cost of sample measurements. Monte Carlo numerical methods are a type of simulation-statistical method, where statistical simulation refers to the method of using any sequence of random numbers to perform the simulation. Today, Monte Carlo simulations are used in various fields, and their calculations involve simulating a large number of particle transport events to obtain valuable uncertainty statistics.
[0004] The Geant4 simulation toolkit provides an accurate method for simulating gamma-ray spectra using the Monte Carlo method. It can accurately simulate the interaction of photons with matter through the photoelectric effect, Compton scattering, electron-electron pair effects, or Rayleigh scattering. In gamma-ray spectrum acquisition, the Monte Carlo method is considered a novel approach to assessing radioactivity, avoiding the cost and risks associated with calibrating detectors using radioactive sources. Applying Geant4 Monte Carlo simulations to detector spectrum measurements improves the efficiency calibration of detectors measuring different geometries, providing detector models and measurement samples with arbitrarily adjustable structures for different types of detectors. After obtaining the Geant4 simulation efficiency, it is compared with experimental results to evaluate the accuracy of the results. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture that can flexibly simulate the response of detectors to various shapes, materials and radiation sources, and can perform efficiency calibration of detectors without the need for a standard source.
[0006] The technical solution adopted by this invention to solve its technical problem is: a Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture, comprising the following steps:
[0007] S1. Write some interfaces for Geant4 according to requirements, and add custom macro commands using UICommand;
[0008] S2. Build a server to communicate with Geant4, enabling the transfer of simulation parameters, operation of the simulation process, and processing of simulation results;
[0009] S3. Process the recorded simulation results information through the Root software, broaden the output energy spectrum, and return the processing results or output them as a separate file according to the specified channel address and energy range.
[0010] S4. Build the front end of the simulation system to visualize the detector model and radiation source, provide simulation execution operations and related adjustable parameters and options, and process and analyze the received simulation results.
[0011] S5. Use linear efficiency scaling and quadratic efficiency scaling to calibrate the simulation results and save the calibration results;
[0012] S6. Design a custom model conversion interface to model and convert within FreeCAD, export GDML files, and support importing them into the front-end system and converting them into target entities for the Geant4 simulation process.
[0013] S7. Deploy the database to save the simulation results and related data for each simulation.
[0014] S8. Deploy all backend containers and database containers using Docker to achieve cross-platform operation and one-click application startup.
[0015] Furthermore, in step S1, the custom UICommand is used to define all macro instruction parameters related to the execution of the simulation, including: adjustable detector parameters and spatial coordinates, the path to import the GDML mode file, the level of detail of the runtime output, radioactive source information and spatial coordinates, radioactive source type, and quantity.
[0016] Using macros, all programs only need to be compiled once, and all variables are specified by macro files and passed to the Geant4 main program as runtime parameters.
[0017] Furthermore, in step S2, the server designs interfaces for performing simulations under different conditions, including: Geant4 built-in modeling mode, GDML model mode, and access to simulation result files;
[0018] The results are retrieved and expanded, and the runtime information of the Geant4 program is output through WebSocket.
[0019] Furthermore, in step S3, the information to be recorded during the simulation is stored in the ".root" file in the form of a one-dimensional histogram. The simulation result histogram is visualized on the front end. By transmitting the total address, energy range, and broadening parameters, the broadening calculation is performed on each bin of the recorded histogram data. The calculation formula is as follows:
[0020] ;
[0021] In the formula: σ refers to the widening parameter, and x refers to the target address after widening. It refers to the central address of Bin.
[0022] Furthermore, in step S4, a front-end system is written using the cross-platform front-end framework Tauri, a detector template is preset, and the location, shape and size of the model, the world and the radiation source are visualized. Different composition structures are divided according to the logical volume, and a specified separate structure is provided as a logical volume for simulation data statistics.
[0023] Specify the level of detail for runtime information and adjust the output of different content information during simulation, including: file processing information output, a specified number of event information output intervals, and particle information recorded in Tracking;
[0024] Based on the set parameters, the system receives energy spectrum and broadened spectrum data returned from the server, provides interactive display in the results analysis module, and performs efficiency scaling based on histogram data or custom scale points.
[0025] Each simulation is saved as a separate database and can be viewed in the results module. The recorded information for a single simulation includes: simulation title and description, detector template, simulation time, simulation result energy spectrum, 3D rendering of the simulation result scene, and basic information of the radioactive source.
[0026] Furthermore, in step S5, the system incorporates two efficiency scaling methods: linear efficiency scaling and quadratic efficiency scaling.
[0027] The linear efficiency scale is calculated by selecting two points from the histogram of the simulation results; the calculation formula is as follows:
[0028]
[0029] Where E is the characteristic energy, in keV; ε is the detection efficiency; , The fitting parameters are calculated by selecting two points on the histogram of the simulation results, and are used to describe the trend of efficiency changing with energy.
[0030] The secondary efficiency scale is calculated by selecting multiple points from the histogram of simulation results; the calculation formula is as follows:
[0031] ;
[0032] In the formula: This is a constant term that determines the baseline level of the efficiency curve. The coefficient of the first term describes the linear trend of efficiency with the logarithm of energy; The coefficient of the quadratic term reflects the degree of nonlinear change in efficiency with the logarithm of energy, and is used to capture the bending characteristics of the efficiency curve; it is obtained by multi-point calculation of the histogram of simulation results.
[0033] Furthermore, in step S6, modeling in FreeCAD includes: basic GDML solid modeling, sketch extrusion, sketch rotation, and STL solid conversion;
[0034] All modeling is exported under the default World Part, where World is the default root geometry volume;
[0035] The basic GDML solid modeling is the same as the basic geometry defined internally by Geant4, and the Boolean operations of the basic solid are implemented in FreeCAD;
[0036] The sketch extrusion modeling utilizes FreeCAD's sketch design, where a sketch is designed on the axial plane formed by two specified axes. After completing shape closure and parameter constraints, the solid is extruded along the normal direction or the specified axis direction.
[0037] The sketch rotation is performed by designing a sketch on the axial plane, rotating the planar sketch at a specified angle along the Z-axis to obtain the solid model generated under the rotation path.
[0038] The modeling completed using the above method is used as a child node under Part, and the material or element composition of the individual part is specified through the Geant4 material list in FreeCAD.
[0039] After completing all modeling and material specification, select the root node World volume, and export all nodes within its child nodes as a GDML XML markup file. This file can be processed by the simulation system and recognized internally by Geant4.
[0040] Furthermore, in step S7, the designed database includes a nuclide database and a simulation results database;
[0041] The nuclide database provides the system with the option to select energy points within the efficiency scale table. Each nuclide includes its name, peak energy, and half-life.
[0042] The simulation results database records the model file, simulation results file, results scene file, radioactive source information, and simulation notes for each simulation.
[0043] Furthermore, in step S8, the Docker images of the main application and the server are built on Ubuntu, and the Geant4 main program and root data processing and analysis tools are compiled inside. The server compiled in Go language is used as an EntryPoint, and the internal 8080 port is mapped to the front-end system.
[0044] The database container is based on the official MySQL image and provides basic database operations to the server through the Docker internal shared network.
[0045] All images use the Docker Compose command to initialize the database, start backend services, and deploy multi-container applications.
[0046] The beneficial effects of this invention are: the Geant4 Monte Carlo energy spectrum detection simulation modeling method based on the front-end and back-end separation architecture described in this invention can flexibly simulate the detector's response to various shapes, materials and radioactive sources, and can perform efficiency calibration of the detector without the need for a standard source, saving both time and cost; it greatly expands the scope of application of the detector and provides convenience for workers in the radiometric measurement industry. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture in this invention.
[0048] Figure 2 This is a flowchart illustrating the simulation of the model built using the Geant4 Monte Carlo energy spectrum detection simulation modeling method with a front-end and back-end separated architecture in this embodiment of the invention.
[0049] Figure 3 This is a schematic diagram of the interaction logic of GDML files in an embodiment of the present invention;
[0050] Figure 4 This is a block diagram of an interactive 2D and 3D graphics display system implemented using WebGL in an embodiment of the present invention;
[0051] Figure 5 This is a flowchart for recording particle trajectory information in an embodiment of the present invention. Detailed Implementation
[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0053] As attached Figure 1As shown, the Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture described in this invention includes the following steps:
[0054] S1. Write some interfaces for Geant4 according to requirements, and add custom macro commands using UICommand;
[0055] In step S1, the custom UICommand is used to define all macro instruction parameters related to the execution of the simulation, including: adjustable detector parameters and spatial coordinates, the path to import the GDML mode file, the level of detail of the runtime output, radioactive source information and spatial coordinates, radioactive source type, and quantity.
[0056] Using macros, all programs only need to be compiled once, and all variables are specified by macro files and passed to the Geant4 main program as runtime parameters.
[0057] Specifically, the detector model construction, display, and storage system in the GDML model file includes a detector geometry description that provides all the data needed to simulate and reconstruct the path of particles through the detector. Generally, the information that must be provided is the geometric hierarchy (geometry tree) of the detector volume, the solids (shapes) that make up the volume, and the material of the detector; these are all composed of different parts. A common method for representing the geometry tree is to use the concepts of logical volumes and physical volumes. Logical volumes are unlocated objects, described by the entities and materials they constitute. Furthermore, logical volumes can have "child" volumes. "Child" volumes are physical volumes, meaning they are specific "locations" within certain other logical volumes within a given logical volume. The location of physical volumes is done in a local (one of the "parent" volumes) coordinate system, which typically includes translation and rotation. This hierarchical approach is a very efficient way to describe detector geometry and forms the basis for simulation selection of different detectors and any geometric model reading and writing. The interaction logic of the GDML file is as follows: Figure 3 As shown.
[0058] S2. Build a server to communicate with Geant4, enabling the transfer of simulation parameters, operation of the simulation process, and processing of simulation results;
[0059] In step S2, the server designs interfaces for performing simulations under different conditions, including: Geant4 built-in modeling mode, GDML model mode, and access to simulation result files;
[0060] The results are retrieved and expanded, and the runtime information of the Geant4 program is output through WebSocket.
[0061] S3. Process the recorded simulation results information through the Root software, broaden the output energy spectrum, and return the processing results or output them as a separate file according to the specified channel address and energy range.
[0062] The Root model has three main components: a) Pad is the basic entity containing a list of graphic objects to be drawn, implemented by the RPAD class. b) Canvas is the topmost Pad of the window, implemented by RCanvas. c) A stretchable entity that assigns deformation properties to any available graphics drawn on the Pad.
[0063] In step S3, the information to be recorded during the simulation is stored in the ".root" file in the form of a one-dimensional histogram. The simulation result histogram is visualized on the front end. The total address, energy range, and broadening parameters are passed to calculate the broadening of each bin of the recorded histogram data. The calculation formula is as follows:
[0064] ;
[0065] In the formula: σ refers to the widening parameter, and x refers to the target address after widening. It refers to the central address of Bin.
[0066] S4. Build the front end of the simulation system to visualize the detector model and radiation source, provide simulation execution operations and related adjustable parameters and options, and process and analyze the received simulation results.
[0067] In step S4, a front-end system is written using the cross-platform front-end framework Tauri, a detector template is preset, and the location, shape and size of the model, the world and the radiation source are visualized. Different composition structures are divided according to the logical volume, and a specified separate structure is provided as a logical volume for simulation data statistics.
[0068] Specify the level of detail for runtime information and adjust the output of different content information during simulation, including: file processing information output, a specified number of event information output intervals, and particle information recorded in Tracking;
[0069] Based on the set parameters, the system receives energy spectrum and broadened spectrum data returned from the server, provides interactive display in the results analysis module, and performs efficiency scaling based on histogram data or custom scale points.
[0070] Each simulation is saved as a separate database and can be viewed in the results module. The recorded information for a single simulation includes: simulation title and description, detector template, simulation time, simulation result energy spectrum, 3D rendering of the simulation result scene, and basic information of the radioactive source.
[0071] In the visualization of detector models and radiation sources, an interactive 2D and 3D graphics display system implemented using WebGL is employed. The JavaScript Root library allows for efficient reading and display of Root objects, with rendering effects very close to those of native Root. Through its flexible API, JSRoot can be used in any project containing a web framework. Web-based client and server applications can be created using JsRoot, where the server is a standard C++ Root application, and the client can run in any type of browser. Besides applications that embed calibration software locally, THttpServer can be used to handle communication between different components and TBufferJson for input and output. All geometric models are independent of the local graphics backend, and JavaScript rendering can be performed on the local canvas, such as... Figure 4 As shown.
[0072] Furthermore, it can achieve the recording of particle trajectory information; specifically, it can utilize the read geometric model to perform particle physics simulation and trajectory tracking recording systems. After obtaining the precise geometric dimensions, matrix composition, and density of the high-purity germanium detector and source, a physical calculation model of the measurement structure can be established using Geant4. The calculated simulated volume source efficiency values are then compared and analyzed with the measured values. Figure 5 As shown.
[0073] S5. Provides multiple methods to calibrate the efficiency of simulation results and saves the calibration results;
[0074] In step S5, the system has two built-in efficiency scaling methods: linear efficiency scaling and quadratic efficiency scaling;
[0075] The linear efficiency scale is calculated by selecting two points from the histogram of the simulation results; the calculation formula is as follows:
[0076]
[0077] Where E is the characteristic energy, in keV; ε is the detection efficiency; , The fitting parameters are calculated by selecting two points on the histogram of the simulation results, and are used to describe the trend of efficiency changing with energy.
[0078] The secondary efficiency scale is calculated by selecting multiple points from the histogram of simulation results; the calculation formula is as follows:
[0079] ;
[0080] In the formula: This is a constant term that determines the baseline level of the efficiency curve. The coefficient of the first term describes the linear trend of efficiency as a function of the logarithm of energy. The coefficient of the quadratic term reflects the degree of nonlinear change in efficiency with the logarithm of energy, and is used to capture the bending characteristics of the efficiency curve; it is obtained by multi-point calculation of the histogram of simulation results.
[0081] S6. Design a custom model conversion interface to export GDML files through FreeCAD modeling and conversion, supporting import into the front-end system and conversion into target entities for the Geant4 simulation process;
[0082] In step S6, modeling in FreeCAD includes: basic GDML solid modeling, sketch extrusion, sketch rotation, and STL solid conversion;
[0083] All modeling is exported under the default World Part, where World is the default root geometry volume;
[0084] The basic GDML solid modeling is the same as the basic geometry defined internally by Geant4, and the Boolean operations of the basic solid are implemented in FreeCAD;
[0085] The sketch extrusion modeling utilizes FreeCAD's sketch design, designing a sketch on the axial plane formed by two specified axes. After completing shape closure and parameter constraints, the solid is extruded along the normal direction or the specified axis direction.
[0086] The sketch rotation is performed by designing a sketch on the axial plane, rotating the planar sketch at a specified angle along the Z-axis to obtain the solid model generated under the rotation path;
[0087] The modeling completed using the above method is used as a child node under Part, and the material or element composition of the individual part is specified through the Geant4 material list in FreeCAD.
[0088] After completing all modeling and material specification, select the root node World volume, and export all nodes within its child nodes as a GDML XML markup file. This file can be processed by the simulation system and recognized internally by Geant4.
[0089] S7. Deploy the database to save the simulation results and related data for each simulation.
[0090] In step S7, the designed database includes a nuclide database and a simulation results database.
[0091] The nuclide database provides the system with the option to select energy points within the efficiency scale table. Each nuclide includes its name, peak energy, and half-life.
[0092] The simulation results database records the model file, simulation results file, results scene file, radioactive source information, and simulation notes for each simulation.
[0093] S8. Deploy all backend containers and database containers using Docker to achieve cross-platform operation and one-click application startup.
[0094] In step S8, the Docker images of the main application and the server are built on Ubuntu. The Geant4 main program and the Root data processing and analysis tool are compiled inside, and the server compiled in Go language is used as an EntryPoint, mapping the internal 8080 port to the front-end system.
[0095] The database container is based on the official MySQL image and provides basic database operations to the server through the Docker internal shared network.
[0096] All images use the Docker Compose command to initialize the database, start backend services, and deploy multi-container applications.
[0097] Example
[0098] The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separation architecture, as described in this invention, is used to set up a sodium iodide detector model for... 60 Co simulation detection process;
[0099] Specifically, the following steps are included:
[0100] 1. Write the Geant4 part of the interface according to the requirements, and add custom macro commands using UICommand;
[0101] The custom macro commands include the following: adjustable detector parameters and spatial coordinates, path to import GDML mode files, level of detail in runtime output, radioactive source information and spatial coordinates, radioactive source type, and quantity.
[0102] 2. Build a server to communicate with Geant4, enabling the transfer of simulation parameters, operation of the simulation process, and processing of simulation results;
[0103] 3. Process the recorded simulation results information through the Root software, broaden the output energy spectrum, and return the processing results or output them as a separate file according to the specified channel address and energy range;
[0104] 4. Build the front end of the simulation system to visualize the detector model and radiation source, provide simulation execution operations and related adjustable parameters and options, and process and analyze the received simulation results;
[0105] 5. Use linear efficiency scaling and quadratic efficiency scaling to calibrate the simulation results, and save the calibration results;
[0106] 6. Design a custom model conversion interface to export GDML files through FreeCAD modeling and conversion, supporting import into the front-end system and conversion into target entities for the Geant4 simulation process;
[0107] 7. Deploy a database to save the simulation results and related data for each simulation;
[0108] 8. Deploy all backend containers and database containers using Docker to achieve cross-platform operation and one-click application startup.
[0109] In progress 60 When simulating Co detection, import 60 A GDML model file for a Co detector and its detection environment; the GDML model file includes: selecting a built-in NaI detector template, adjusting the NaI detector structural parameters including: PMT, scintillator, alumina layer thickness, etc.; setting the spatial location, type, and type of the radioactive source. 60 Co and the number of emitted particles; set the model structure volume to record energy deposition, and adjust whether the running results are saved as a scene;
[0110] Start the simulation. After starting, the total number of particles in the current simulation will be output. After the simulation is complete, an energy deposition histogram will be plotted. Select the full-energy peak channel and its corresponding energy point within the histogram; a minimum of two points must be selected. 60 Co is 1132.5 keV and 1173.2 keV. After selection, the ratio of the selected peak's efficiency to the total number of particles is automatically calculated and filled into the efficiency value of the calibration parameters. Select the calibration method to calibrate the efficiency of the spectrum of the simulation results, and the calculation target is the set energy value table. After the calculation is completed, the calculation results can be saved.
Claims
1. A simulation modeling method for Geant4 Monte Carlo energy spectrum detection based on a front-end and back-end separated architecture, characterized in that, Includes the following steps: S1. Write the interface for Geant4 according to the requirements, and add custom macro commands using UICommand; S2. Build a server to communicate with Geant4, enabling the transfer of simulation parameters, operation of the simulation process, and processing of simulation results; S3. Process the recorded simulation results information through the Root software, broaden the output energy spectrum, and return the processing results or output them as a separate file according to the specified channel address and energy range. S4. Build the front end of the simulation system to visualize the detector model and radiation source, provide simulation execution operations and related adjustable parameters and options, and process and analyze the received simulation results. S5. Use linear efficiency scaling and quadratic efficiency scaling to calibrate the simulation results and save the calibration results; S6. Design a custom model conversion interface to model and convert within FreeCAD, export GDML files, and support importing them into the front-end system and converting them into target entities for the Geant4 simulation process. S7. Deploy the database to save the simulation results and related data for each simulation. S8. Deploy all backend containers and database containers using Docker to achieve cross-platform operation and one-click application startup.
2. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 1, characterized in that: In step S1, the custom UICommand is used to define all macro instruction parameters related to the execution of the simulation, including: adjustable detector parameters and spatial coordinates, the path to import the GDML mode file, the level of detail of the runtime output, radioactive source information and spatial coordinates, radioactive source type, and quantity. Using macros, all programs only need to be compiled once, and all variables are specified by macro files and passed to the Geant4 main program as runtime parameters.
3. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 2, characterized in that: In step S2, the server designs interfaces for performing simulations under different conditions, including: Geant4 built-in modeling mode, GDML model mode, and access to simulation result files; The results are retrieved and expanded, and the runtime information of the Geant4 program is output through WebSocket.
4. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 3, characterized in that: In step S3, the information to be recorded during the simulation is stored in the ".root" file in the form of a one-dimensional histogram. The simulation result histogram is visualized on the front end. By transmitting the total address, energy range, and broadening parameters, the broadening calculation is performed on each bin of the recorded histogram data. The calculation formula is as follows: ; In the formula: σ refers to the widening parameter, and x refers to the target address after widening. It refers to the central address of Bin.
5. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 4, characterized in that: In step S4, a front-end system is written using the cross-platform front-end framework Tauri, a detector template is preset, and the location, shape and size of the model, the world and the radiation source are visualized. Different composition structures are divided according to the logical volume, and a specified separate structure is provided as a logical volume for simulation data statistics. Specify the level of detail for runtime information and adjust the output of different content information during simulation, including: file processing information output, a specified number of event information output intervals, and particle information recorded in Tracking; Based on the set parameters, the system receives energy spectrum and broadened spectrum data returned from the server, provides interactive display in the results analysis module, and performs efficiency scaling based on histogram data or custom scale points. Each simulation is saved as a separate database and can be viewed in the results module. The recorded information for a single simulation includes: simulation title and description, detector template, simulation time, simulation result energy spectrum, 3D rendering of the simulation result scene, and basic information of the radioactive source.
6. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 5, characterized in that: In step S5, the system has two built-in efficiency scaling methods: linear efficiency scaling and quadratic efficiency scaling; The linear efficiency scale is calculated by selecting two points from the histogram of the simulation results; the calculation formula is as follows: ; Where E is the characteristic energy, in keV; ε is the detection efficiency; , The fitting parameters are calculated by selecting two points on the histogram of the simulation results, and are used to describe the trend of efficiency changing with energy. The secondary efficiency scale is calculated by selecting multiple points from the histogram of simulation results; the calculation formula is as follows: ; In the formula: This is a constant term that determines the baseline level of the efficiency curve. The coefficient of the first term describes the linear trend of efficiency with the logarithm of energy; The coefficient of the quadratic term reflects the degree of nonlinear change in efficiency with the logarithm of energy, and is used to capture the bending characteristics of the efficiency curve; it is obtained by multi-point calculation of the histogram of simulation results.
7. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 6, characterized in that: In step S6, modeling in FreeCAD includes: basic GDML solid modeling, sketch extrusion, sketch rotation, and STL solid conversion; All modeling is exported under the default World Part, where World is the default root geometry volume; The basic GDML solid modeling is the same as the basic geometry defined internally by Geant4, and the Boolean operations of the basic solid are implemented in FreeCAD; The sketch extrusion modeling utilizes FreeCAD's sketch design, designing a sketch on the axial plane formed by two specified axes. After completing shape closure and parameter constraints, the solid is extruded along the normal direction or the specified axis direction. The sketch rotation is performed by designing a sketch on the axial plane, rotating the planar sketch at a specified angle along the Z-axis to obtain the solid model generated under the rotation path. The modeling completed using the above method is used as a child node under Part, and the material or element composition of the individual part is specified through the Geant4 material list in FreeCAD. After completing all modeling and material specification, select the root node World volume, and export all nodes within its child nodes as a GDML XML markup file. This file can be processed by the simulation system and recognized internally by Geant4.
8. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 7, characterized in that: In step S7, the designed database includes a nuclide database and a simulation results database. The nuclide database provides the system with the option to select energy points within the efficiency scale table. Each nuclide includes its name, peak energy, and half-life. The simulation results database records the model file, simulation results file, results scene file, radioactive source information, and simulation notes for each simulation.
9. The Geant4 Monte Carlo energy spectrum detection simulation modeling method based on a front-end and back-end separated architecture as described in claim 8, characterized in that: In step S8, the Docker images of the main application and the server are built on Ubuntu. The Geant4 main program and the Root data processing and analysis tool are compiled inside, and the server compiled in Go language is used as an EntryPoint, mapping the internal 8080 port to the front-end system. The database container is based on the official MySQL image and provides basic database operations to the server through the Docker internal shared network. All images use the Docker Compose command to initialize the database, start backend services, and deploy multi-container applications.