The G4HepEm code documentation