  Context. Accurate model predictions including the physics of baryons are
required to make the most of the upcoming large cosmological surveys devoted to
gravitational lensing. The advent of hydrodynamical cosmological simulations
enables such predictions on sufficiently sizeable volumes. Aims. Lensing
quantities (deflection, shear, convergence) and their statistics (convergence
power spectrum, shear correlation functions, galaxy-galaxy lensing) are
computed in the past lightcone built in the Horizon-AGN hydrodynamical
cosmological simulation, which implements our best knowledge on baryonic
physics at the galaxy scale in order to mimic galaxy populations over cosmic
time. Methods. Lensing quantities are generated over a one square degree field
of view by performing multiple-lens plane ray-tracing through the lightcone,
taking full advantage of the 1 kpc resolution and splitting the line of sight
over 500 planes all the way to redshift z~7. Two methods are explored (standard
projection of particles with adaptive smoothing, and integration of the
acceleration field) to assert a good implementation. The focus is on small
scales where baryons matter most. Results. Standard cosmic shear statistics are
impacted at the 10% level by the baryonic component for angular scales below a
few arcmin. The galaxy-galaxy lensing signal, or galaxy-shear correlation
function, is consistent with measurements for the redshift z~0.5 massive galaxy
population. At higher redshift z>1, the impact of magnification bias on this
correlation is relevant for separations greater than 1 Mpc. Conclusions. This
work is pivotal for all current and upcoming weak lensing surveys and
represents a first step towards building a full end-to-end generation of lensed
mock images from large cosmological hydrodynamical simulations.
