Use of a quadrupole mass filter for high energy resolution ion beam production