Introduction: The radioluminescence (RL) and optically stimulated luminescence (OSL) response of Al2O3:C crystals attached to optical fibres can be used for active and passive in-vivo dosimetry in radiotherapy treatments and clinical imaging techniques. Their use in particle beams, however, can be seriously hampered by variations in detector efficiency (light output per energy imparted) due to high-LET effects and gradients along the physical size (~mm) of the detector crystals. Amorphous track models (ATMs) such as the Ion-Gamma-Kill (IGK) approach by Katz and co-workers or the ECLaT code by Geiß et al. had reasonable success in predicting the response of solid state dosimeters and can also help to understand the luminescence response of Al2O3:C in particle beams. There are, however, a large number of submodels and parameter sets found in literature which hinders the direct comparison between the models and the selection of the most appropriate approach. Materials and methods: We have therefore developed a generic, open-source and publically available ATM code library (libSGP) including a number of ATMs, which can be used as a common platform to investigate the principal approaches and underlying assumptions in a variety of detectors. The library also includes simple particle transportation or can be interfaced to external transport codes. We applied our code to RL and OSL data from fiber-coupled Al2O3:C-detectors in a proton (nominal energies 10 MeV to 60 MeV) and a carbon beam (270 MeV/u). Results: The library proved to be a useful tool for to investigate the results from different ATMs over a broad parameter space. We found good agreement between the model predictions and the experimental luminescence data and will discuss the influence on the selected approaches and their parameters. An extended version of the library has also been applied to radiobiological data (Grzanka et al., this volume).