In X-ray fluorescence (XRF) a material is exposed to X-rays with a relatively high energy. These photons are capable of exciting (ejecting) the electrons in the core levels of the material under investigation. The induced excited state relaxes under emission of a X-ray photon with a smaller energy. This emitted light is analysed in a spectrometer. Because the core levels have very different energies for different elements the XRF spectrum contains information on the elemental composition of the sample under investigation.