  We present a new algorithm which groups the subhaloes found in cosmological
N- body simulations by structure finders such as SUBFIND into dark matter
haloes whose formation histories are strictly hierarchical. One advantage of
these `Dhaloes' over the commonly used friends-of-friends (FoF) haloes is that
they retain their individual identity in cases when FoF haloes are artificially
merged by tenuous bridges of particles or by an overlap of their outer diffuse
haloes. Dhaloes are thus well-suited for modelling galaxy formation and their
merger trees form the basis of the Durham semi-analytic galaxy formation model,
GALFORM. Applying the Dhalo construction to the LambdaCDM Millennium-2
simulation we find that approximately 90% of Dhaloes have a one-to-one,
bijective match with a corresponding FoF halo. The remaining 10% are typically
secondary components of large FoF haloes. Although the mass functions of both
types of haloes are similar, the mass of Dhaloes correlates much more tightly
with the virial mass, M200, than FoF haloes. Approximately 80% of FoF and
bijective and non-bijective Dhaloes are relaxed according to standard criteria.
For these relaxed haloes all three types have similar concentration-M200
relations and, at fixed mass, the concentration distributions are described
accurately by log-normal distributions.
