A quantitative method for detecting explosive materials using terahertz spectroscopy