The Giotto implanted ion spectrometer (IIS): physics and techniques of detection