McXtrace

McXtrace is an open source software package for performing Monte Carlo simulations of X-ray scattering experiments. While its chief objective is to aid in the optimization of beamlines at e.g. synchrotrons, it may also be used for data analysis and at laboratory sources and beamlines. McXtrace is free software released under the GNU GPL.

McXtrace was first spun off as a sister project to the well known and proven neutron ray-tracing package McStas in a project funded jointly by:
 * DTU Physics at The Technical University of Denmark (DTU)
 * The European Synchrotron Radiation Facility (ESRF) (http://www.esrf.eu)
 * Niels Bohr Institute at University of Copenhagen (KU)
 * The Danish Strategic Research Council under the NaBiIT program
 * SAXSLAB ApS. aka. JJ-XRay Systems (http://www.jjxray.dk)

Description
McXtrace works in the way that a user describes his/her beamline in a special file. This file is then analyzed by the system and converted into a c-file which may be compiled on the target computing system where the simulation is to be run. The beamline file generally contains relative coordinates of the devices present in the beamline.

McXtrace is well suited to describe X-ray synchrotron beam-lines by assembling a series of so-called components:
 * a photon source
 * optics
 * samples
 * detectors and monitors

Even-though McXtrace is similar to other pure ray-tracing such as XRT, SRW, OASYS/Shadow for the source and optics, what makes it different resides in its ability to handle sample models:
 * powder diffraction
 * single crystal diffraction
 * absorption (XAS), which also covers tomography applications
 * small-angle scattering
 * inelastic scattering (IXS, currently from liquids and amorphous systems)
 * fluorescence, Compton and Rayleigh