EFFICIENT SIMULATION OF ELECTRON TRAPPING IN LASER AND PLASMA WAKEFIELD ACCELERATION