Selective detection enabled by terahertz spectroscopy and plasmonics: Principles and implementations