Effects of the magnetic field on the spallation reaction implemented by BUU coupled with a phase-space coalescence afterburner