Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/stim_pixe_tomography/README is written in an unsupported language. File is not indexed.

0001 stim_pixe_tomography advanced example
0002 
0003 The stim_pixe_tomography advanced example is developed to simulate three dimensional STIM or
0004 PIXE tomography experiments. The simulation results are written in a binary file and can be easily accessed using the
0005 provided scripts.
0006 
0007  Publications:
0008 
0009     [1] Li Z, Incerti S, Beasley D, Shen H, Wang S, Seznec H, et al. Accuracy of three-dimensional proton imaging of an
0010     inertial confinement fusion target assessed by Geant4 simulation. Nucl Instrum Methods Phys Res B. 2023;
0011     536:38-44. https://doi.org/10.1016/j.nimb.2022.12.026.
0012 
0013     [2] Michelet C, Li Z, Jalenques H, Incerti S, Barberet P, Devs G, et al. A Geant4 simulation of X-ray emission
0014     for three-dimensional proton imaging of microscopic samples. Phys Med. 2022;94:85-93. https://doi.org/10.1016/j.ejmp.2021.12.002.
0015 
0016     [3] Michelet C, Li Z, Yang W, Incerti S, Desbarats P, Giovannelli J-F, et al. A Geant4 simulation for
0017     three-dimensional proton imaging of microscopic samples. Phys Med. 2019;65:172-80. https://doi.org/10.1016/j.ejmp.2019.08.022.
0018 
0019  Contact:
0020 
0021     michelet@lp2ib.in2p3.fr      (Claire Michelet)
0022 
0023     zhuxin.li@outlook.com        (Zhuxin Li)
0024 
0025 
0026 More information and a detailed UserGuide are available: http://geant4.in2p3.fr (Documentation section)
0027 
0028  1 - GEOMETRY DEFINITION
0029 
0030   Three phantoms are available, users can build up new phantoms or choose the following
0031   three phantoms by setting the "phantom_type":
0032 
0033     1) A simple cube (see publication [2-3]), phantom_type = 1
0034 
0035     The absorber is a box made of a given material.
0036 
0037     2) Upper part of Caenorhabditis elegans (C.elegans) worm (see publication [2-3]) , phantom_type = 2
0038 
0039     C.elegans phantom is composed of  6 ellipsoids. The size and shape of ellipsoids are based on the
0040     nanotoxicology studies carried-out at LP2I Bordeaux laboratory .
0041 
0042     3) Inertial confinement fusion (ICF) target (see publication [1]), phantom_type = 3
0043 
0044     ICF target is sphere shell, made of Ge-doped glow discharge polymer (GDP)
0045 
0046 
0047 2 - PHYSICS LIST
0048 
0049   Physics lists are based on modular design. Several modules are instantiated:
0050 
0051     1) Transportation
0052     2) EM physics
0053     3) Decay physics
0054     4) Hadron physics, optional
0055 
0056  EM physics builders can be local or from G4 kernel physics_lists subdirectory.
0057 
0058      - "emlivermore"             default low-energy EM physics using Livermore data
0059      - "local"                   local physics builders, options are explicit in PhysListEmStandard
0060      - "emstandard_opt0"         recommended standard EM physics for LHC
0061      - "emstandard_opt1"         best CPU performance standard physics for LHC
0062      - "emstandard_opt2"         similar fast simulation
0063      - "emstandard_opt3"         best standard EM options - analog to "local" above
0064      - "emstandard_opt4"         best current advanced EM options standard + lowenergy
0065      - "emstandardWVI"           standard EM physics and WentzelVI multiple scattering
0066      - "emstandardSS"            standard EM physics and single scattering model
0067      - "emstandardGS"            standard EM physics and Goudsmit-Saunderson multiple scatt.
0068      - "empenelope"              low-energy EM physics implementing Penelope models
0069      - "emlowenergy"             low-energy EM physics implementing experimental
0070 
0071   Decay and StepMax processes are added to each list.
0072 
0073   Optional components can be added:
0074 
0075      - "elastic"       elastic scattering of hadrons
0076      - "binary"        QBBC configuration of hadron inelastic models
0077      - "binary_ion"    Binary ion inelastic models
0078 
0079   Physics lists and options can be (re)set with UI commands.
0080 
0081 
0082 3 - HOW TO RUN
0083 
0084  To run a PIXE tomography simulation in 'batch' mode using a pixe3d.mac file:
0085 
0086     ./stim_pixe_tomography -p pixe3d.mac
0087 
0088  or if you want to specify the number of threads:
0089 
0090     ./stim_pixe_tomography -p pixe3d.mac N
0091 
0092     N is the number of threads
0093 
0094   An example of pixe3d.mac is provided.
0095   It is designed for the PIXE-T simulation of the cube phantom of 40 um.
0096   It is defined for 10 projections  1 slice  20 pixels. 1000000 protons are used for each beam.
0097 
0098 
0099  To run a STIM tomography simulation:
0100 
0101       ./stim_pixe_tomography -s pixe3d_stim.mac
0102 
0103   or if you want to specify the number of threads:
0104 
0105     ./stim_pixe_tomography -s pixe3d_stim.mac N
0106 
0107     N is the number of threads
0108 
0109  An example of pixe3d_stim.mac (arbitrarily name, you may rename it pixe3d.mac if you wish) is provided.
0110  It is designed for the STIM-T simulation of the cube phantom of 40 um.
0111  It is defined for 10 projections  1 slice  20 pixels. 100 protons are used for each beam.
0112 
0113 4 - VISUALISATION
0114 To visualize the phantoms, run:
0115 
0116     ./stim_pixe_tomography
0117 
0118 5 - OUTPUT FILES
0119 
0120  If a PIXE tomography simulation is made, two files are going to be generated:
0121 
0122     1) GammaAtCreation.dat, which keeps the info of secondary photons at creation
0123     2) GammaAtExit.dat, which keeps the info of secondary photons at exit of the phantom
0124 
0125  If a STIM tomography simulation is made, ProtonAtExit.dat is generated, in which the info of primary protons is kept
0126 
0127 
0128 6 - LIST OF MACROS AND SCRIPTS
0129 
0130 Once you build the example, the following macros and script will be copied to your build directory:
0131 
0132         pixe3d.mac: an example macro to run a PIXE-T simulation for cube of 40 um
0133         pixe3d_stim.mac: an example macro to run a STIM-T simulation for cube of 40 um
0134         pixe3d_initial.mac: it contains the information of physics processes
0135         init_vis.mac and vis.mac: for the visualization
0136         GPSPointLoop.C: it generates a macro file to run the simulation by reading pixe3d_initial.mac
0137 
0138 In the Scripts folder, you will find other scripts for different uses.
0139 
0140 To obtain the reconstruction data:
0141 
0142         BinToStd_ProtonAtExit.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle momentum.
0143         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.
0144         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.
0145         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
0146         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
0147 
0148 To locate the interruption if an interruption of simulation occurs:
0149 
0150         LocateInterruption_ProtonAtExit.C: in case of interruption, it locates the projection position of interruption for STIM-T simulation.
0151         LocateInterruption_GammaAtExit.C: in case of interruption, it locates the projection position of interruption for PIXE-T simulation.
0152 To obtain the reconstruction data in case of an interruption of simulation:***
0153 
0154         Concatenate_BinToStd_ProtonAtExit.C: in case of one interruption, it reads STIM-T simulation results and generates the data file for STIM-T reconstruction.
0155         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.
0156         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.
0157 To visualize the spectrum:
0158 
0159         Spectrum_proton.C: it visualizes the spectrum of protons and plots a histogram by reading simulation result ProtonAtExit.dat.
0160         Spectrum_gamma.C: it visualizes the spectrum of X-rays and plots a histogram by reading simulation result GammaAtCreation.dat or GammaAtExit.dat.
0161         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.
0162         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.
0163         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.
0164 Scripts for specific use:
0165 
0166         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.
0167         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.
0168         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.
0169         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.
0170         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
0171 Scripts to generate voxelized phantoms:***
0172 
0173 In order to compare the reconstructed tomographic images with original
0174 phantoms, it may be necessary to use a voxelized phantom.
0175 
0176         generate_voxelized_sphere_phantom.py: it generates a voxelized phantom of an inertial confinement fusion target.
0177         generate_voxelized_worm_phantom.py: it generates a voxelized phantom of the upper part of C. elegans.
0178 More information can be found in the UserGuide.