Gamma photons interact with NaI by the same mechanisms as with other materials, i.e. photoelectric capture, coherent scattering, incoherent (Compton) scattering and pair production, the latter only if the photon energy is higher than 1.022 MeV.
As reaction cross sections increase with the atomic number, photons react much more with iodine than with sodium.
Photocapture dominates at low energies (X-ray range), Compton scattering at intermediate energies (around 1 MeV) and pair production at high photon energies.
The important point as a detector is the amount of energy transferred to the detector, which is the energy transferred to secondary electrons. In the case of coherent scattering, this energy is negligible, and this mechanism does not contribute to the detection.
For other reactions, a part of the energy is given to one or several secondary photons (fluorescence x-rays after photocapture, scattered photon after Compton scattering, annihilation photons after pair production) . The secondary photons may escape , especially from a small NaI crystal. Or they may undergo a second interaction.
The escape of the secondary photons is responsible of well-defined structures in the spectrum of measured energies: X-escape peak, Compton continuum, double escape peak. If all secondary photons are finally captured, the event contributes to the full-energy peak. If one of the annihilation photons is fully captured, the event contributes to the single escape peak. If the secondary photon is scattered, the contribution to the spectrum is a continuum, not well-defined, including the continuum of multiple scattering. As much as 10 successive scattering reactions can occur in a big detector. Monte Carlo simulation is the best tool to calculate it.
The energy of the secondary electron(s) is transferred to electron-hole pairs excited in the band structure of NaI. These pairs recombine at the Thallium activation centers where they produce the scintillation. The number of scintillation photons is approximately, but not exactly, proportional to the energy transferred to secondary electrons. The lack of linearity is important at low measured energies, when only few e-hole pairs are excited.