{'fraction_non_alphanumeric': 0.025938566552901023, 'fraction_numerical': 0.0034129692832764505, 'mean_word_length': 5.159663865546219, 'pattern_counts': {'":': 0, '<': 0, '<?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}}
GXPS: A Geant4-based Monte Carlo code for x-ray polycapillary simulation

With the rapid development of the x-ray polycapillary optics, there is an increasing demand for an effective simulation tool, considering the real physical process and geometry model, to optimize their performance. In this paper, a Geant4-based Monte Carlo code for X-ray Polycapillary Simulation (GXPS) is developed. Based on the classical electromagnetic theory, an x-ray boundary process is developed using the dielectric model, including total external reflection, Fresnel reflection, and Fresnel refraction. The surface roughness of x-ray polycapillary is taken into account using a classical Gaussian slope distribution model. A new geometry solid for x-ray polycapillary modeling is constructed using a cubic function whose coefficients can be derived based on the parameters of a practical lens. To validate the effectiveness of this code, a point-to-parallel x-ray polycapillary lens is simulated with an x-ray energy of 8.04 keV (Cu K α) and the simulation result is compared with the experiment. Well agreement between the simulation and the experimental result is verified considering the transmission efficiency, the output beam profile, and the divergence angle of the lens. The focusing characteristics of the lens are also demonstrated using this code. The simulation result of the focal spot size agrees well with the predicted value calculated using the empirical relation.