Formation of the high-energy ion population in the earth's magnetotail: spacecraft observations and theoretical models