LHAASO-KM2A detector simulation using Geant4