Theory and observation of energetic ions in the lobes of the geomagnetic tail