Geant4 Cross Reference |
1 stim_pixe_tomography advanced example 1 stim_pixe_tomography advanced example 2 2 3 The stim_pixe_tomography advanced example is d 3 The stim_pixe_tomography advanced example is developed to simulate three dimensional STIM or 4 PIXE tomography experiments. The simulation re 4 PIXE tomography experiments. The simulation results are written in a binary file and can be easily accessed using the 5 provided scripts. 5 provided scripts. 6 6 7 Publications: 7 Publications: 8 8 9 [1] Li Z, Incerti S, Beasley D, Shen H, Wa 9 [1] Li Z, Incerti S, Beasley D, Shen H, Wang S, Seznec H, et al. Accuracy of three-dimensional proton imaging of an 10 inertial confinement fusion target assesse 10 inertial confinement fusion target assessed by Geant4 simulation. Nucl Instrum Methods Phys Res B. 2023; 11 536:38-44. https://doi.org/10.1016/j.nimb. 11 536:38-44. https://doi.org/10.1016/j.nimb.2022.12.026. 12 12 13 [2] Michelet C, Li Z, Jalenques H, Incerti 13 [2] Michelet C, Li Z, Jalenques H, Incerti S, Barberet P, Devs G, et al. A Geant4 simulation of X-ray emission 14 for three-dimensional proton imaging of mi 14 for three-dimensional proton imaging of microscopic samples. Phys Med. 2022;94:85-93. https://doi.org/10.1016/j.ejmp.2021.12.002. 15 15 16 [3] Michelet C, Li Z, Yang W, Incerti S, D 16 [3] Michelet C, Li Z, Yang W, Incerti S, Desbarats P, Giovannelli J-F, et al. A Geant4 simulation for 17 three-dimensional proton imaging of micros 17 three-dimensional proton imaging of microscopic samples. Phys Med. 2019;65:172-80. https://doi.org/10.1016/j.ejmp.2019.08.022. 18 18 19 Contact: 19 Contact: 20 20 21 michelet@lp2ib.in2p3.fr (Claire Miche 21 michelet@lp2ib.in2p3.fr (Claire Michelet) 22 22 23 zhuxin.li@outlook.com (Zhuxin Li) 23 zhuxin.li@outlook.com (Zhuxin Li) 24 24 25 25 26 More information and a detailed UserGuide are 26 More information and a detailed UserGuide are available: http://geant4.in2p3.fr (Documentation section) 27 27 28 1 - GEOMETRY DEFINITION 28 1 - GEOMETRY DEFINITION 29 29 30 Three phantoms are available, users can buil 30 Three phantoms are available, users can build up new phantoms or choose the following 31 three phantoms by setting the "phantom_type" 31 three phantoms by setting the "phantom_type": 32 32 33 1) A simple cube (see publication [2-3]), 33 1) A simple cube (see publication [2-3]), phantom_type = 1 34 34 35 The absorber is a box made of a given mate 35 The absorber is a box made of a given material. 36 36 37 2) Upper part of Caenorhabditis elegans (C 37 2) Upper part of Caenorhabditis elegans (C.elegans) worm (see publication [2-3]) , phantom_type = 2 38 38 39 C.elegans phantom is composed of 6 ellips 39 C.elegans phantom is composed of 6 ellipsoids. The size and shape of ellipsoids are based on the 40 nanotoxicology studies carried-out at LP2I 40 nanotoxicology studies carried-out at LP2I Bordeaux laboratory . 41 41 42 3) Inertial confinement fusion (ICF) targe 42 3) Inertial confinement fusion (ICF) target (see publication [1]), phantom_type = 3 43 43 44 ICF target is sphere shell, made of Ge-dop 44 ICF target is sphere shell, made of Ge-doped glow discharge polymer (GDP) 45 45 46 46 47 2 - PHYSICS LIST 47 2 - PHYSICS LIST 48 48 49 Physics lists are based on modular design. S 49 Physics lists are based on modular design. Several modules are instantiated: 50 50 51 1) Transportation 51 1) Transportation 52 2) EM physics 52 2) EM physics 53 3) Decay physics 53 3) Decay physics 54 4) Hadron physics, optional 54 4) Hadron physics, optional 55 55 56 EM physics builders can be local or from G4 k 56 EM physics builders can be local or from G4 kernel physics_lists subdirectory. 57 57 58 - "emlivermore" default low-e 58 - "emlivermore" default low-energy EM physics using Livermore data 59 - "local" local physics 59 - "local" local physics builders, options are explicit in PhysListEmStandard 60 - "emstandard_opt0" recommended s 60 - "emstandard_opt0" recommended standard EM physics for LHC 61 - "emstandard_opt1" best CPU perf 61 - "emstandard_opt1" best CPU performance standard physics for LHC 62 - "emstandard_opt2" similar fast 62 - "emstandard_opt2" similar fast simulation 63 - "emstandard_opt3" best standard 63 - "emstandard_opt3" best standard EM options - analog to "local" above 64 - "emstandard_opt4" best current 64 - "emstandard_opt4" best current advanced EM options standard + lowenergy 65 - "emstandardWVI" standard EM p 65 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering 66 - "emstandardSS" standard EM p 66 - "emstandardSS" standard EM physics and single scattering model 67 - "emstandardGS" standard EM p 67 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt. 68 - "empenelope" low-energy EM 68 - "empenelope" low-energy EM physics implementing Penelope models 69 - "emlowenergy" low-energy EM 69 - "emlowenergy" low-energy EM physics implementing experimental 70 70 71 Decay and StepMax processes are added to eac 71 Decay and StepMax processes are added to each list. 72 72 73 Optional components can be added: 73 Optional components can be added: 74 74 75 - "elastic" elastic scattering of h 75 - "elastic" elastic scattering of hadrons 76 - "binary" QBBC configuration of h 76 - "binary" QBBC configuration of hadron inelastic models 77 - "binary_ion" Binary ion inelastic mo 77 - "binary_ion" Binary ion inelastic models 78 78 79 Physics lists and options can be (re)set wit 79 Physics lists and options can be (re)set with UI commands. 80 80 81 81 82 3 - HOW TO RUN 82 3 - HOW TO RUN 83 83 84 To run a PIXE tomography simulation in 'batch 84 To run a PIXE tomography simulation in 'batch' mode using a pixe3d.mac file: 85 85 86 ./stim_pixe_tomography -p pixe3d.mac 86 ./stim_pixe_tomography -p pixe3d.mac 87 87 88 or if you want to specify the number of threa 88 or if you want to specify the number of threads: 89 89 90 ./stim_pixe_tomography -p pixe3d.mac N 90 ./stim_pixe_tomography -p pixe3d.mac N 91 91 92 N is the number of threads 92 N is the number of threads 93 93 94 An example of pixe3d.mac is provided. 94 An example of pixe3d.mac is provided. 95 It is designed for the PIXE-T simulation of 95 It is designed for the PIXE-T simulation of the cube phantom of 40 um. 96 It is defined for 10 projections 1 slice 2 96 It is defined for 10 projections 1 slice 20 pixels. 1000000 protons are used for each beam. 97 97 98 98 99 To run a STIM tomography simulation: 99 To run a STIM tomography simulation: 100 100 101 ./stim_pixe_tomography -s pixe3d_stim.ma 101 ./stim_pixe_tomography -s pixe3d_stim.mac 102 102 103 or if you want to specify the number of thre 103 or if you want to specify the number of threads: 104 104 105 ./stim_pixe_tomography -s pixe3d_stim.mac 105 ./stim_pixe_tomography -s pixe3d_stim.mac N 106 106 107 N is the number of threads 107 N is the number of threads 108 108 109 An example of pixe3d_stim.mac (arbitrarily na 109 An example of pixe3d_stim.mac (arbitrarily name, you may rename it pixe3d.mac if you wish) is provided. 110 It is designed for the STIM-T simulation of t 110 It is designed for the STIM-T simulation of the cube phantom of 40 um. 111 It is defined for 10 projections 1 slice 20 111 It is defined for 10 projections 1 slice 20 pixels. 100 protons are used for each beam. 112 112 113 4 - VISUALISATION 113 4 - VISUALISATION 114 To visualize the phantoms, run: 114 To visualize the phantoms, run: 115 115 116 ./stim_pixe_tomography 116 ./stim_pixe_tomography 117 117 118 5 - OUTPUT FILES 118 5 - OUTPUT FILES 119 119 120 If a PIXE tomography simulation is made, two 120 If a PIXE tomography simulation is made, two files are going to be generated: 121 121 122 1) GammaAtCreation.dat, which keeps the in 122 1) GammaAtCreation.dat, which keeps the info of secondary photons at creation 123 2) GammaAtExit.dat, which keeps the info o 123 2) GammaAtExit.dat, which keeps the info of secondary photons at exit of the phantom 124 124 125 If a STIM tomography simulation is made, Prot 125 If a STIM tomography simulation is made, ProtonAtExit.dat is generated, in which the info of primary protons is kept 126 126 127 127 128 6 - LIST OF MACROS AND SCRIPTS 128 6 - LIST OF MACROS AND SCRIPTS 129 129 130 Once you build the example, the following macr 130 Once you build the example, the following macros and script will be copied to your build directory: 131 131 132 pixe3d.mac: an example macro to run a 132 pixe3d.mac: an example macro to run a PIXE-T simulation for cube of 40 um 133 pixe3d_stim.mac: an example macro to r 133 pixe3d_stim.mac: an example macro to run a STIM-T simulation for cube of 40 um 134 pixe3d_initial.mac: it contains the in 134 pixe3d_initial.mac: it contains the information of physics processes 135 init_vis.mac and vis.mac: for the visu 135 init_vis.mac and vis.mac: for the visualization 136 GPSPointLoop.C: it generates a macro f 136 GPSPointLoop.C: it generates a macro file to run the simulation by reading pixe3d_initial.mac 137 137 138 In the Scripts folder, you will find other scr 138 In the Scripts folder, you will find other scripts for different uses. 139 139 140 To obtain the reconstruction data: 140 To obtain the reconstruction data: 141 141 142 BinToStd_ProtonAtExit.C: it reads the 142 BinToStd_ProtonAtExit.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle momentum. 143 BinToStd_GammaAtCreation.C: it reads t 143 BinToStd_GammaAtCreation.C: it reads the PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction using selection with particle momentum. 144 BinToStd_GammaAtExit.C: it reads the P 144 BinToStd_GammaAtExit.C: it reads the PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction using selection with particle momentum. 145 BinToStd_proton_position.C: it reads t 145 BinToStd_proton_position.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle position and momentum 146 BinToStd_gamma_position.C: it reads th 146 BinToStd_gamma_position.C: it reads the PIXE-T simulation results for X-rays and generates the data file for PIXE-T reconstruction using selection with particle position and momentum 147 147 148 To locate the interruption if an interruption 148 To locate the interruption if an interruption of simulation occurs: 149 149 150 LocateInterruption_ProtonAtExit.C: in 150 LocateInterruption_ProtonAtExit.C: in case of interruption, it locates the projection position of interruption for STIM-T simulation. 151 LocateInterruption_GammaAtExit.C: in c 151 LocateInterruption_GammaAtExit.C: in case of interruption, it locates the projection position of interruption for PIXE-T simulation. 152 To obtain the reconstruction data in case of a 152 To obtain the reconstruction data in case of an interruption of simulation:*** 153 153 154 Concatenate_BinToStd_ProtonAtExit.C: i 154 Concatenate_BinToStd_ProtonAtExit.C: in case of one interruption, it reads STIM-T simulation results and generates the data file for STIM-T reconstruction. 155 Concatenate_BinToStd_GammaAtCreation.C 155 Concatenate_BinToStd_GammaAtCreation.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction. 156 Concatenate_BinToStd_GammaAtExit.C: in 156 Concatenate_BinToStd_GammaAtExit.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction. 157 To visualize the spectrum: 157 To visualize the spectrum: 158 158 159 Spectrum_proton.C: it visualizes the s 159 Spectrum_proton.C: it visualizes the spectrum of protons and plots a histogram by reading simulation result ProtonAtExit.dat. 160 Spectrum_gamma.C: it visualizes the sp 160 Spectrum_gamma.C: it visualizes the spectrum of X-rays and plots a histogram by reading simulation result GammaAtCreation.dat or GammaAtExit.dat. 161 TomoSpectrum_HIST_proton.C: it visuali 161 TomoSpectrum_HIST_proton.C: it visualizes the spectrum of protons and plots a histogram by reading StimEvent data. It also writes the spectrum data in a txt file. 162 TomoSpectrum.C: it visualizes the spec 162 TomoSpectrum.C: it visualizes the spectrum of X-rays and plots a graph by reading PixeEvent data. It also writes the spectrum data in a txt file. 163 TomoSpectrum_HIST.C: it visualizes the 163 TomoSpectrum_HIST.C: it visualizes the spectrum of X-rays and plots a histogram by reading PixeEvent data. It also writes the spectrum data in a txt file. 164 Scripts for specific use: 164 Scripts for specific use: 165 165 166 Extract_Projection.C: it extracts 50 p 166 Extract_Projection.C: it extracts 50 projections from a PixeEvent data file for tomographic reconstruction, which contains 100 projections. In fact, it extracts the projection 0, 2, 4, 6, 898 from projections 0-99. It eventually generates a new file with new index number of projections 0-49. 167 Check_PixeEventFile.C: it checks if th 167 Check_PixeEventFile.C: it checks if the index of projections of a PixeEvent data file for tomographic reconstruction is correct. For example, if the user extract 50 projections from a data file composed 100 projections, it is necessary to make sure in the new data file, the index of projection starts from 0 and ends at 49. 168 Extract_Slice.C: it extracts a certain 168 Extract_Slice.C: it extracts a certain number of slice(s) from a PixeEvent data file for tomographic reconstruction. Users need to specify the first and the last slice to be extracted. Note that when writing a new data file, the index of slices will be initiated from 0. 169 Concatenate_BinToStd_GammaAtCreation_f 169 Concatenate_BinToStd_GammaAtCreation_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at creation with same energy. 170 Concatenate_BinToStd_GammaAtExit_fabri 170 Concatenate_BinToStd_GammaAtExit_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at exit with same energy 171 Scripts to generate voxelized phantoms:*** 171 Scripts to generate voxelized phantoms:*** 172 172 173 In order to compare the reconstructed tomograp 173 In order to compare the reconstructed tomographic images with original 174 phantoms, it may be necessary to use a voxeliz 174 phantoms, it may be necessary to use a voxelized phantom. 175 175 176 generate_voxelized_sphere_phantom.py: 176 generate_voxelized_sphere_phantom.py: it generates a voxelized phantom of an inertial confinement fusion target. 177 generate_voxelized_worm_phantom.py: it 177 generate_voxelized_worm_phantom.py: it generates a voxelized phantom of the upper part of C. elegans. 178 More information can be found in the UserGuide 178 More information can be found in the UserGuide.