Internally detected electron photoexcitation spectroscopy on heterostructures