Dynamic mass spectrometry