A hodoscope spectrometer for high-energy photons