  We calculate the masses of baryons containing one, two, or three heavy quarks
using lattice QCD. We consider all possible combinations of charm and bottom
quarks, and compute a total of 36 different states with $J^P = \frac12^+$ and
$J^P = \frac32^+$. We use domain-wall fermions for the up, down, and strange
quarks, a relativistic heavy-quark action for the charm quarks, and
nonrelativistic QCD for the bottom quarks. Our analysis includes results from
two different lattice spacings and seven different pion masses. We perform
extrapolations of the baryon masses to the continuum limit and to the physical
pion mass using $SU(4|2)$ heavy-hadron chiral perturbation theory including
$1/m_Q$ and finite-volume effects. For the 14 singly heavy baryons that have
already been observed, our results agree with the experimental values within
the uncertainties. We compare our predictions for the hitherto unobserved
states with other lattice calculations and quark-model studies.
