We report on the comparison of production characteristics of secondary protons and charged pions in the interactions of protons and charged pions with momentum between 3 GeV/c and 15 GeV/c with beryllium, copper, and tantalum nuclei, with simulations by the FLUKA program and the Geant4 tool kit. Overall production cross-sections are reasonably well reproduced, within factors of two. In more detail, there are areas with poor agreement that are unsatisfactory and call for modelling improvements. Overall, the current FLUKA simulation fares better than the current Geant4 simulation.