L-shell populations of ions penetrating solids