Resonance ionization spectroscopy investigations of electronic processes during ion-beam sputtering of metal atoms