The space charge voltage depression in a drifting heavy ion beam during the final stages of current pulse compression can be hundreds of kV. For example, a 1 kA beam of ions at β= v/ c=0.4 would have a beam center-to-edge potential difference of 75 kV. With suitable clearance from beam edge to the beam pipe, this amount is typically increased by a factor of 2–3 by the (1+2 ln( b/ a)) term that accounts for the ratio of pipe radius, b, to beam radius, a. Such high voltages, and resulting high electric fields at the pipe wall, will result in electrons being pulled into the beam pipe. These electrons which are emitted from the grounded beam pipe, will pass through the ion beam at high velocity and then turn around without (usually) striking the wall and continue to pass through the beam on repeated oscillations. It is possible to control the longitudinal motion of these trapped electrons by suitably varying the pipe size while considering the beam diameter. A segment of the beam pipe that has a larger diameter will result in a potential well that traps the electrons longitudinally. In a constant current scenario in a uniform pipe, the electrons will drift in the direction of the beam. However, the head and especially the tail of the ion beam will have a dramatic effect on the electrons, causing them to be pulled into the ion beam. These complex processes will continue until the ion beam passes through an optical element such as a beam transport magnet that will effectively block the motion of the electron clouds following the ions. In this paper, we will show examples of how electrons can be trapped and controlled by varying the conditions determining their emission and confinement. Ray tracing simulations using the EGN2 (Herrmannsfeldt, SLAC Electron Trajectory Program, SLAC-331 (1988)) computer code will be used to model the electron trajectories in the presence of a high current heavy ion beam. The self-magnetic field of the ion beam, while not sufficient to affect the ions themselves significantly, has a strong influence on the electron orbits.