Transition between hadronic models in Geant4