particle in a magnetic field