minor modif
further changes to the code, ok for gen, g4 and tracking