The magnetic spectrometer of the FOOT experiment