Fermi-level position at a semiconductor-metal interface