Deflection in a magnetic field