  We investigate shock structure and particle acceleration in relativistic
magnetized collisionless electron-ion shocks by means of 2.5D particle-in-cell
simulations with ion-to-electron mass ratios (m_i/m_e) ranging from 16 to 1000.
We explore a range of inclination angles between the pre-shock magnetic field
and the shock normal. In "subluminal" shocks, where relativistic particles can
escape ahead of the shock along the magnetic field lines, ions are efficiently
accelerated via a Fermi-like mechanism. The downstream ion spectrum consists of
a relativistic Maxwellian and a high-energy power-law tail, which contains ~5%
of ions and ~30% of ion energy. Its slope is -2.1. Upstream electrons enter the
shock with lower energy than ions, so they are more strongly tied to the field.
As a result, only ~1% of the incoming electrons are Fermi-accelerated at the
shock before being advected downstream, where they populate a steep power-law
tail (with slope -3.5). For "superluminal" shocks, where relativistic particles
cannot outrun the shock along the field, the self-generated turbulence is not
strong enough to permit efficient Fermi acceleration, and the ion and electron
downstream spectra are consistent with thermal distributions. The incoming
electrons are heated up to equipartition with ions, due to strong
electromagnetic waves emitted by the shock into the upstream. Thus, efficient
electron heating (>15% of the upstream ion energy) is the universal property of
relativistic electron-ion shocks, but significant nonthermal acceleration of
electrons (>2% by number, >10% by energy, with slope flatter than -2.5) is hard
to achieve in magnetized flows and requires weakly magnetized shocks
(magnetization <1e-3). These findings place important constraints on the models
of AGN jets and Gamma Ray Bursts that invoke particle acceleration in
relativistic magnetized electron-ion shocks.
