Event generator for medium energy nuclear physics