An electron spectrometer for measuring both angular and energy distributions of photoemitted electrons