system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do airport mass spectrometers identify "explosives"

I had an encounter today where my bag "tested positive" for explosives.  The person who questioned me brought up C4 several times.  I know what it is but I've never seen / been around it.  How does this happen?
gpt
A mass spectrometer breaks a molecule into parts. Based on the sizes of those parts you can figure out what you originally had.  Basically, imagine you walk into a room and see a bunch of shattered bits on the floor.  By looking at the pieces you can reasonably guess if it was a window, a plate, or a teacup that shattered.

Big Molecules like  C4 will have signatures of what they look like when they break into pieces, but sometimes you might have stuff on your bag that is just the pieces and looks the same...we have gotten to the point where the process is extremely robust (there are devices that can spray your finger and tell what medications you have been taking), but occasionally false positives will still happen.