In the course of PENeLOPE, an advanced Monte Carlo-simulation for ultra-cold neutrons, protons and electrons was developed.
It uses a flexible C++ class structure and could be easily extended to other particle types by implementing their specific interaction with matter. Additionally, the simulation can directly integrate complex CAD geometry via "StereoLithography" StL-files as well as two- and three-dimensional magnetic and electric field maps from e.g. finite element calculations.
It is used to simulate PENeLOPE, including UCN sources, guides, magnetic and material storage, neutron spin precession and charged particle detection. The results suggested several constraints and changes to the design of PENeLOPE.
If you are interested you can download the code from the GitHub repository.