|Gamma absorption by an atom|
The photoelectric effect occurs in two stages. First, the photon (a) takes out a bound electron in one atom. In the case of gamma photons, it is usually an electron belonging to the innermost layers L or K (as shown). Then the atom that has lost one of its inner electrons is left in an excited state. An electron from an outer layer (b) moves to occupy the vacancy left by the ejected electron. If the ejected electron belonged to the K-shell as in the figure, an X-ray is emitted during this transition.