This invention concerns a mass spectrometer with an ion focusing optical system that efficiently separates the charged and neutral particles. It concerns an apparatus that can be used in ionisation areas operating at relatively high pressure (> 10/sup -2/ Torr). The invention relates more particularly to a mass spectrometer with an inlet device for the samples to be identified, a sample ionisation system for forming charged and neutral particles, a mass analyser and an optical system for focusing the ions formed in the mass analyser. The optics include several conducting components of which at least one has sides formed of grids, in the direction of the axis, towards the analyser the optics forming a potential well along the axis. The selected charged particles are focused in the analyser and the remaining particles can escape by the openings in the conducting grids.