Particle acceleration in a MHD simulation of magnetotail dynamics