The two options for the standard G4VPVParameterisation parameterization were only investigated for a small number of protons to accommodate increased memory usage of G4VPV-3D. As described in section 2.1.1, the standard G4VPVParameterisation parameterization is not recommended for volumes with a large number of parametrized voxels such as patient CT. We found G4VPV-1D to be a factor 66 (liver patient) to 154 (head and neck) slower than other parameterizations. G4VPV-3D, while only a factor 2 (head and neck) to 10 (prostate) slower than the other parameterizations, needed a factor of 15.2 (head and neck) to 18.5 (prostate) more memory to run. The 3D optimization for the largest CT volume, the liver patient, was not tested as there was insuffcient memory, and the simulation would not run. In the case of a prostate patient with 512 × 512 × 119 CT voxels, the G4VPV-3D optimization method requires 25 GB of memory. G4VPV-1D and -3D were thus excluded from all further studies.
A list of timing information for the different patients, the system time, the setup time and the corrected run time normalized to 106 particles is shown in . The processing time of protons depends strongly on their energy (range), which varies substantially between the three treatment cases. For the other particles this dependency is much weaker. The set-up times for each parameterization were around 200 seconds. If boundary skipping was switched on for G4Phantom, the set-up time doubled. We corrected the CPU times for the set-up times. Note that for a typical patient simulation at MGH, the calculations are distributed to several phase spaces (usually 20) that are run in parallel on a dedicated computing cluster. A complete patient simulation with this set-up starting at nozzle exit, i.e. after acquiring the phase spaces, takes 20-30 minutes. The dose distributions from each of those simulations are then added to produce the final dose distribution that is used for comparison with pencil beam scanning algorithms. All simulations were performed with both a phase space consisting only of protons at nozzle exit and a phase space that included all particles (protons, electrons, positrons, photons and neutrons). The percent difference in run time normalized to the G4Nested result is displayed in for all particles and for protons only. We found that all parameterizations take approximately the same time to run in a heterogeneous CT volume (see ). The difference in timing for the simulations was less than 3%. The average ratio of the CPU time used for the simulation was found to be G4VNestedParameterisation : G4PhantomParameterisation : MGHParameterisation = 1 : 1:014 : 1:015. In addition to the exact patient geometries, the same three CT cubes were used with all voxels, including the air voxels outside of the patient, set to be made of water. This resulted in a CPU time reduction of 5-40%, however, the differences between the three parameterization methods were within 5.5%, see . This was the optimal setting for the use of the boundary skipping method for G4Phantom. It effectively removed all boundaries of the voxels. When using the boundary skipping option for this set-up, the CPU time was reduced by 27-32%. This option is not included in the results figure.
Table 3 CPU run time results for the navigation for three parameterizations for all three patients for the nominal CT volume and the CT volume set to be filled with water and for phase spaces containing p, n, γ, e± or only protons. The CPU time (more ...)
Figure 2 Percent difference of the CPU timing results compared to G4VNestedParameterisation (G4Nested). Shown are G4PhantomParameterisation (G4Phantom) and MGHParameterization (G4MGH) for the nominal CT volume and the CT volume with all voxels set to be made of (more ...)
Switching on boundary skipping for G4Phantom, where the voxels had to have exactly the same HU, improved the speed performance by less than 5% compared to the G4Phantom parameterization without boundary skipping in our heterogeneous data sets, the average ratio being = 1 : 0:97. Note that this number would improve if fewer different materials were considered, as shown in the case of the entire CT being replaced by water, where we found a speed up of up to 32%.
Random differences in timing, estimated by rerunning the same simulation twice, were found to be within 0.5%.
Overall, G4Nested parameterization had the fastest parameterization navigation. The large timing differences for different patient sites can be explained by the following considerations. Protons from the phase space for the prostate site have energies between 140 and 210 MeV, for the head and neck site between 40 and 110 MeV and for the liver site between 30 and 90 MeV, resulting in different ranges in the patient. Additionally, the head and neck CT volume had air cavities, which result in an extended range of the protons. Higher beam energy causes more steps per proton in the patient and we see a higher percentage of nuclear interactions with a higher range. The probability of a proton undergoing a nuclear interaction in a Bragg curve is about 1% per cm range. The voxel sizes vary with patient and site. The variation of tissues differ by treatment site, the number of HUs used in the CT volumes being 2605 for liver, 3002 for prostate and 3694 for the head and neck case. In addition, timing depends on the treatment volume, because the bigger the volume the more protons are needed to reach the prescription dose.
3.2. Dose distributions
shows the gamma index with a criterion of 3% and 3 mm for G4Nested and G4Phantom with and without boundary skipping for all three patient sites, dose distributions obtained with G4MGH were used as reference. A distribution is typically considered to pass the gamma criterion if less than 5% of the voxels have a gamma value above 1, as indicated by the dashed light blue line and solid red line in the figure. This is the cut-off value used for clinical dose comparisons at MGH. All dose distributions agree within statistical fluctuations, see . This study was optimized for the timing study, resulting in low statistics for the dose distribution, the statistical precision was estimated to be 7.8% (head and neck), 6.8% (liver) and 8.0% (prostate). Dose difference plots have also been investigated to look for systematic shifts. The dose difference plot (4a, b) of the head and neck patient shows the area where the dose distribution for G4Phantom deviates from the reference dose distribution. This effect is seen inside an air cavity of the nose.
Figure 3 Gamma index distributions with G4MGH as the reference dose distribution. The distributions are for a) head and neck, b) prostate and c) liver patients. Shown are G4Nested (blue, solid), G4Phantom without (green, dashed) and with (red, thin dashes) boundary (more ...)
While a study of the boundary-skipping technique for the G4Phantom in an earlier publication (Arce et al. 2008
) showed good agreement for the depth dose in a simple water phantom, our analysis shows the technique to be risky in heterogeneous patient data sets. The approximations of the dose deposits seem to fail when volumes of same HU, where the mean free path of the protons is larger than the voxel size, are surrounded by high density materials such as bone. To investigate this behavior further, we performed an additional study where we used an artificial CT volume that was composed of repeat sequences of 20 voxels in a row where 4 voxels with HU=3000 are followed by 16 voxels of air. This was constructed to emphasize differences in the dose distribution calculated with the G4Phantom parameterization navigation with boundary skipping. The dose difference distributions for G4Nested and G4Phantom with boundary skipping are shown in . G4MGH was used as the reference distribution.
Figure 4 Dose difference plots. a-b: Head and neck patient, slice with air cavities from the nose. Dose difference plots are obtained by subtracting the dose distribution from G4MGH from G4Nested (a) and G4Phantom (b). Statistical fluctuations can be seen together (more ...)
By default, boundary skipping is switched on in Geant4. Since the no-boundary skipping option shows no significant advantage in speed for heterogeneous CT data sets while the skipping option shows the danger of wrong dose deposition, we do not recommend the use of this parameterization in heterogeneous geometries.
The maximum memory used for all simulations was between 0.9 and 1.9 GB, the maximum swap memory between 1.1 and 2.2GB, depending on the patient site. Maximum memory and maximum swap memory usage are given in for the prostate patient. For a single patient CT, the memory usage was similar across the parameterizations. G4Phantom without boundary skipping used the least memory, and depending on the patient site, either G4Phantom with boundary skipping or G4MGH required the most memory.
Maximum memory and maximum swap memory used. The values are for the prostate (Prost.), liver (liver) and head and neck (H&N) patient. For G4Phantom, values with and without the boundary skipping option are given.
Memory usage can effect the timing of the simulations. When the faster RAM memory is filled, the program starts to use swap memory. Since disk access is slower than RAM access, frequent and extensive use of the swap memory will increase the time a program runs. Especially the G4VPV-3D option would run faster on a computer with larger RAM since it uses very large memory. A comparison between G4VPV-3D and G4Nested would be interesting with computers with more RAM. For all other parameterizations, the difference of memory usage is small and the total memory used less than the available RAM, thus we do not anticipate that the availability of more RAM would influence the timing results.