The open-source Bmad software library has been developed for simulating both charged particle beams and X-rays. Owing to its modular, object-oriented design, Bmad has proved to be versatile, and is currently the basis of many of the accelerator simulations and lattice design programs at CLASSE
Simulated photon trajectories in a bending magnet chamber. Black lines are trajectories, and blue dots are photon absorption sites. The transverse geometry has been distorted from an ellipse to a circle, and the longitudinal dimension has been rectified and divided by 10, for purposes of illustration.