Modifications for G4 simulation: