  Pulsars have been identified as good candidates for the acceleration of
cosmic rays, up to ultra-high energies. However, a precise description of the
acceleration processes at play is still to be established. Using 2D
particle-in-cell simulations, we study proton acceleration in axisymmetric
pulsar magnetospheres. Protons and electrons are extracted from the neutron
star surface by the strong electric field induced by the rotation of the star,
and electrons and positrons are produced in the magnetosphere through pair
production process. As pair production has a crucial impact on electromagnetic
fields, on gaps and thus on particle acceleration, we study its influence on
the maximum energy and luminosity of protons escaping the magnetosphere.
Protons are accelerated and escape in all our simulations. However, the
acceleration sites are different for the protons and the pairs. As shown in
previous studies, pairs are accelerated to their highest energies at the
Y-point and in the equatorial current sheet, where magnetic reconnection plays
and important role. In contrast, protons gain most of their kinetic energy
below the light-cylinder radius within the separatrix current layers, but they
are not confined within the equatorial current sheet. Their maximum Lorentz
factors can reach $15\%$ to $75\%$ of the maximum Lorentz factor obtained by
acceleration through the full vacuum potential drop from pole to equator, and
increase with decreasing pair production. Their luminosity can reach $0.2\%$ to
$4\%$ of the theoretical spin down luminosity of an aligned pulsar, and the
minimum luminosity is obtained at the transition between the force-free and
electrosphere regimes. These estimates support that millisecond pulsars could
accelerate cosmic rays up to PeV energies and that new born millisecond pulsars
could accelerate cosmic rays up to ultra-high energies.
