Advanced beam-dynamics simulation tools for the RIA driver linac, Part I: Low energy beam transport and radiofrequency quadrupole