  X-ray based imaging modalities are widely used in research, industry, and in
the medical field. Consequently, there is a strong motivation to improve their
performances with respect to resolution, dose, and contrast. Ghost imaging (GI)
is an imaging technique in which the images are reconstructed from measurements
with a single-pixel detector using correlation between the detected intensities
and the intensity structures of the input beam. The method that has been
recently extended to X-rays provides intriguing possibilities to overcome
several fundamental challenges of X-ray imaging. However, understanding the
potential of the method and designing X-ray GI systems pose challenges since in
addition to geometric optic effects, radiation-matter interactions must be
considered. Such considerations are fundamentally more complex than those at
longer wavelengths as relativistic effects such as Compton scattering become
significant. In this work we present a new method for designing and
implementing GI systems using the particle transport code FLUKA, that rely on
Monte Carlo (MC) sampling. This new approach enables comprehensive
consideration of the radiation-matter interactions, facilitating successful
planning of complex GI systems. As an example of an advanced imaging system, we
simulate a high-resolution scattered photons GI technique.
