In method ComputeDerivedQuantities of G4Material.cc, at line: https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/materials/src/G4Material.cc#L318 G4AtomicShells::GetNumberOfFreeElectrons is called with a threshold elecTh given as `15 * CLHEP::eV` i.e. 15E-06 (MeV). However, in the corresponding method at line: https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/materials/src/G4AtomicShells.cc#L792 elecTh (th) is compared to fBindingEnergies which is expressed raw in eV, e.g. 13.6 for H. As a result the comparison always fails. Instead, the previous line should be: if (fBindingEnergies[i] * CLEHP::eV <= th) ... E.g. as here: https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/materials/src/G4AtomicShells.cc#L763
Hello, thank you very much for this very detailed and clear bug report. The fix is merged to the current master of Geant4 and prepared for the next patch for Geant4 10.7. The date of this patch is not yet defined. Vladimir