  We compare two different experimental techniques for the magnetic-sub-level
preparation of metastable $^4$He in the $2^3$S$_1$ level in a supersonic beam,
namely magnetic hexapole focusing and optical pumping by laser radiation. At a
beam velocity of $v = 830\,$m/s, we deduce from a comparison with a particle
trajectory simulation that up to $99\,$\% of the metastable atoms are in the
$M_{J^{''}} = +1$ sub-level after magnetic hexapole focusing. Using laser
optical pumping via the $2^3$P$_2-2^3$S$_1$ transition, we achieve a maximum
efficiency of $94\pm3\,$\% for the population of the $M_{J^{''}} = +1$
sub-level. For the first time, we show that laser optical pumping via the
$2^3$P$_1-2^3$S$_1$ transition can be used to selectively populate each of the
three $M_{J^{''}}$ sub-levels ($M_{J^{''}} = $ -1, 0, +1). We also find that
laser optical pumping leads to higher absolute atom numbers in specific
$M_{J^{''}}$ sub-levels than magnetic hexapole focusing.
