Real-time tumor targeting in external beam radiotherapy