Phase-space method for the calculation of focalization and magnetic separation of hydrogen atoms