Study of atomic excitations in sputtering with the use of Mg, Al, Ca, and Cd targets