{'fraction_non_alphanumeric': 0.023617217053471015, 'fraction_numerical': 0.01257540128821184, 'mean_word_length': 4.910574018126888, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Calculation of Mont Carlo Ion Transport Code

In this work, a Monte Carlo code has been developed for quick simulation of carbon ion bombardment in materials. This program realizes the calculation of the displacement damage and ionization of particle (<10MeV/amu) in materials. In addition, high energy carbon (<500MeV/amu) transport calculation is developed to simulate the ionization dose in water. The GPU parallel algorithm is adopted to speed up the program. Subsequently, the vacancies and ionization of target materials induced by various energy carbon iron were simulated and compared with the SRIM2013. Dose depth distributions of different energy carbon in water were simulated and compared with GSI experimental data. Results of simulation are consonant well with SRIM2013 and experimental data. It achieves significant speed-up ratio in different GPU devices.


Introduction
GPU (Graphics Processing Unit) is widely used in high performance computing for its superiority of good parallelism, low energy consumption ratio and cost [1]. TRIM (Transport of Ions in Matter) is a Monte Carlo (MC) program that follows the ion into the target, tracks detailed trajectories of incident ions colliding with target atom, which simulates the transport of ion in various matters. It is extensively applied in the damage and ionization simulation of materials irradiated by medium and low energy ions.
Carbon ion is recognized as the most suitable heavy ion in radiotherapy for its biological benefits such as enhanced Relative Biological Effectiveness (RBE) in the Bragg peak region, low lateral scattering and Oxygen Enhancement Ratio (OER) and large proportion of DNA double-strand break. The carbon ion beam with energy below 500 MeV/amu is appropriate for therapy owing to its proper dose Bragg peak range in human tissue. It is different from low energy carbon ion transport. The dose distribution caused by hundreds of MeV carbon ions is largely affected by the fragments of nuclear reaction with human tissue elements [2]. Therefore, the generation and transport of nuclear reaction fragments between carbon ions and human elements must be considered in carbon therapy simulations. Based on the TRIM theory, GPU Accelerated Carbon ion Transport (GACT) is developed to realize preliminary rapid assessments of the dose and displacement damage of carbon ions. In addition, high energy carbon ion transport cross section is added to the program to calculate the dose of carbon ions.

Physics and Methods
Monte Carlo (MC) method has the powerful ability to deal with complex geometry and materials, It is a powerful tool for simulation and design in the field of nuclear physics and nuclear engineering. Continuous Slowing Down Approximation (CSDA) method [3] is usually used to treat the continuous collision process of ions in matter. MC method and CSDA method are used as basic physical algorithm in this code. Each particle's track is spited into a number of sub steps. In each step, The GPU parallel algorithm is adopted to speed up the program. Subsequently, the vacancies (<500MeV/amu) transport calculation is developed to simulate the ionization dose in water. damage and ionization of particle (<10MeV/amu) in materials. In addition, high energy carbon ion bombardment in materials. This program realizes the calculation of the displacement ionization energy loss at each track is assumed to be equal to the plus of stopping power and track length.

Electronic and Nuclear Stopping
The energy loss of ions transport in the medium comes from two processes: electronic stopping and nuclear stopping. Firstly, the electronic stopping cross-sections of proton are obtained using the Lindhard local-density approximation [3]. For helium ion, the stopping cross-sections are obtained by multiply the effective helium charge by the corresponding proton data. The heavy ions cross-section data are obtained by scaling proton stopping powers according to the Brandt-Kitagawa theory [2]. Bethe-Bloch formula [4] is adopted to get electronic stopping data when the ion energy is above 20MeV/amu. Nuclear stopping comes from the elastic scattering process of ion and target nuclei. In the process of particle nucleon scattering, the target nucleus accept part of the energy of ions, and the direction of ion motion will change after collision. The target nucleus with enough kinetic energy, will leave the original position of the lattice, causing dislocation damage. Universal Interatomic Potential [3] is adopted to treat the nucleon scattering in the code.

Kinchin-Pease Model
In quick GACT, the modified Kinchin-Pease theory is used to calculate target material displacements caused by incident ions and cascade target nucleus. Norgett, Robinson, and Torrens [4] proposed a formula for calculating the number of displacement primary knock-on atom(PKA) which is often referred to as the NRT model. The number of displacements is derived from the NTR equation: Where, is the damage energy and Ed is the threshold displacement energy.

Charged Fragments Cross Section Build-Up
The dose distribution caused by the hundreds of MeV carbon ions is largely affected by the fragments of nuclear reaction with human tissue elements [2]. Therefore, a database of fragments yield for those elements bombed by carbon ion is created. The data recorded information about the energy of incident carbon ion and the corresponding fragment types, energy and angular distributions. Once a carbon ion collides with an atom during the transport process, secondary particles will be produced. For each type of secondary particles, the code performed random process to obtain the yield, energy and scattering angle according to the database. In addition, all electrically neutral particles generated in nuclear interactions is ignored for its very low contribution to dose, and it is a clinically acceptable approximation for treatment planning purposes.

GPU Parallel Algorithm
GPU executes programs in single-instruction-multiple-data (SIMD) mode, which is suitable for data parallelism. The physical process in this work is naturally parallelism, because the particle transport process is relatively independent and the random process is simple. The structure of the GACT is shown in figure 1, which is founded on CUDA architecture of NVIDIA. CPU controls the program, GPU completes all MC computing tasks. GACT uses equal division, since the calculation scale of MC transport is large and each computing task is independent. That is, the calculation task is divided into np / nt, where np is the total number of jobs, nt is the number of threads on GPU. The job number is increased by ni = ni + blockSize * gridSize, where ni is the job number, blockSize is the

Dissociation Number and Ionization Energy Loss Caused by Carbon Ions
Iron is chosen as the calibration material for it is the one of the common nuclear materials elements. For the verification and acceleration efficiency comparison, we used SRIM2013 to simulate the damage and ionization distribution in iron, and execution times were also recorded. The ionization and vacancy distribution caused by carbon ions in different energy are illustrated in figure 2 and figure 3. The identical damage estimation model is used in GACT and SRIM2013 simulations. We can see that the results of GACT are consistent with SRIM2013.

Bragg Peak of Carbon Ions in Water
We compared the axial dose distribution of carbon particles with different energies in water with the GSI experimental data [5,6]. In this simulation, the water target was set as a cylinder, the radius was 10cm and the length 40cm. The energy of carbon ion was set to 135 MeV/amu, 195 MeV/amu, 270 MeV/amu and 330 MeV/amu, Four cases of different carbon energy were set to perform 3×10 7 particle simulations to get sufficient statistics. Figure 4 shows the comparisons between the simulation results of GACT and the experimental results. This indicates the axial distribution curve of dose deposition caused by different energy carbon particles shows the Bragg peak distribution trend obviously. The GPU code simulated position and height of Bragg peak are consistent with the experimental data.

Speedup Test of GACT
NVIDIA TITAN V, Tesla P100, Titan RTX and RTX2080 Ti were selected as the GACT test platforms. SRIM2013 run on ThinkPad-X1 laptop platform with standard voltage CPU i7 8750H. Table 1 shows good speedup results between SRIM2013 and GACT in the calculation of 10 5 particles, and the speedup ratio can reach 3000 to 10000 times. Four cases of high energy carbon were simulated to perform 3×10 7 particle simulations in the same GPU platforms. By contrast, FLUKA was used to perform the same calculation under the same calculation model and carbon particle energy. FLUKA run on the CPU computing cluster, the CPU was Intel Xeon E5-2630 v4, using 40 cores in parallel.  We can see from table 2: (1) With the increase of carbon ion energy, the calculation time is also increasing, this is because at high energy, the number of secondary fragments increases and the range of particles in the material becomes deeper, which results in the increase of calculation. (2) The simulation time is affected by the performance of GPU. The higher the computing power and the larger the memory, the simulation time is shorter.

Conclusion and Discussion
Based on CUDA, the carbon ion transport code GACT is developed. The result of GACT is in good agreement with SRIM2013 and experimental data. The program can be used for rapid damage analysis of materials for incident ion with energy ranged from eV to several MeV. Moreover, the calculation of the dose of carbon ions in water has been initially achieved, and the program will continue to be improved in the future.