Selective ionization for elemental analysis with an ion trap mass spectrometer