Purpose: The INTRABEAM system is a miniature accelerator for low-energy X-ray Intra-Operative Radiation Therapy (IORT), and it could benefit from a fast and accurate dose computation tool. With regards to accuracy, dose computed with Monte Carlo (MC) simulations are the gold standard, however, they require a large computational effort and consequently they are not suitable for realtime dose planning. This work presents a comparison of the implementation on Graphics Processing Unit (GPU) of two different dose calculation algorithms based on MC phase-space (PHSP) information to compute dose distributions for the INTRABEAM device within seconds and with the accuracy of realistic MC simulations. Methods: The MC-based algorithms we present incorporate photoelectric, Compton and Rayleigh effects for the interaction of low-energy X-rays. XIORT-MC (X-ray Intra-Operative Radiation Therapy Monte Carlo) includes two dose calculation algorithms; a Woodcock-based MC algorithm (WC-MC) and a Hybrid MC algorithm (HMC), and it is implemented in CPU and in GPU. Detailed MC simulations have been generated to validate our tool in homogeneous and heterogeneous conditions with all INTRABEAM applicators, including three clinically realistic CT-based simulations. A performance study has been done to determine the acceleration reached with the code, in both CPU and GPU implementations. Results: Dose distributions were obtained with the HMC and the WC-MC and compared to standard reference MC simulations with more than 95% voxels fulfilling a 7%-0.5 mm gamma evaluation in all the cases considered. The CPU-HMC is 100 times more efficient than the reference MC, and the CPU-WC-MC is about 50 times more efficient. With the GPU implementation, the particle tracking of the WC-MC is faster than the HMC, with the extraction of the particle's information from the PHSP file taking a major part of the time. However, thanks to the variance reduction techniques implemented in the HMC, up to 400 times less particles are needed in the HMC to reach the same level of noise than the WC-MC. Therefore, in our implementation for INTRABEAM energies, the HMC is about 1.3 times more efficient than the WC-MC in an NVIDIA GeForce GTX 1080 Ti card and about 5.5 times more efficient in an NVIDIA GeForce RTX 3090. Dose with noise below 5% has been obtained in realistic situations in less than 5 s with the WC-MC and in less than 0.5 s with the HMC.
Conclusions:The XIORT-MC is a dose computation tool designed to take full advantage of modern GPUs, making possible to obtain MC-grade accurate dose distributions within seconds. Its high speed allows a real-time dose calculation that includes the realistic effects of the beam in voxelized geometries