H0LiCOW III. Quantifying the effect of mass along the line of sight to
  the gravitational lens HE 0435-1223 through weighted galaxy counts
  Based on spectroscopy and multiband wide-field observations of the
gravitationally lensed quasar HE 0435-1223, we determine the probability
distribution function of the external convergence $\kappa_\mathrm{ext}$ for
this system. We measure the under/overdensity of the line of sight towards the
lens system and compare it to the average line of sight throughout the
universe, determined by using the CFHTLenS as a control field. Aiming to
constrain $\kappa_\mathrm{ext}$ as tightly as possible, we determine
under/overdensities using various combinations of relevant informative weighing
schemes for the galaxy counts, such as projected distance to the lens,
redshift, and stellar mass. We then convert the measured under/overdensities
into a $\kappa_\mathrm{ext}$ distribution, using ray-tracing through the
Millennium Simulation. We explore several limiting magnitudes and apertures,
and account for systematic and statistical uncertainties relevant to the
quality of the observational data, which we further test through simulations.
Our most robust estimate of $\kappa_\mathrm{ext}$ has a median value
$\kappa^\mathrm{med}_\mathrm{ext} = 0.004$ and a standard deviation of
$\sigma_\kappa = 0.025$. The measured $\sigma_\kappa$ corresponds to $2.5\%$
uncertainty on the time delay distance, and hence the Hubble constant $H_0$
inference from this system. The median $\kappa^\mathrm{med}_\mathrm{ext}$ value
is robust to $\sim0.005$ (i.e. $\sim0.5\%$ on $H_0$) regardless of the adopted
aperture radius, limiting magnitude and weighting scheme, as long as the latter
incorporates galaxy number counts, the projected distance to the main lens, and
a prior on the external shear obtained from mass modeling. The availability of
a well-constrained $\kappa_\mathrm{ext}$ makes \hequad\ a valuable system for
measuring cosmological parameters using strong gravitational lens time delays.
