Stripped back version of an old GEANT code of mine to act as a start point.