Electro and gamma nuclear physics in Geant4