Recognition of quaternary ammonium compounds using mass spectrometry