Energy loss in thin layers in GEANT