necessary. We determine the orbital parameters at the last moment when a subhalo is identified in the simulation and use them in the dynamical friction recipe of [@boylan08], which is applicable at radii $r<r_{vir}$. We also tried an alternate recipe in which we make no explicit use of the subhalo information, but apply the dynamical friction formula from the time when the satellites first enter the host halo. We obtained very similar subhalo mass functions and radial distributions with the alternate recipe, confirming the self-consistency of the approach.

For the halo positions in the determination of CFs, we use the coordinates of the most bound particle for distinct and subhalos. For orphans, by definition, the position is not known, so we follow the position of the most bound particle from the last time-step when a subhalo was identified. Since the dynamical friction force vanishes in the dark matter only simulation after a subhalo is dissolved, yet not in reality when a galaxy is present at the center of the subhalo, the distance to the center of the host halo might be slightly overestimated with this prescription.

Connecting galaxies and halos {#s:galaxies}
=============================

In this section we describe how we derive 