FAST ALGORITHMS FOR THE TRACKING OF ELECTRON BEAMS