A magnetic spectrometer for low energy pion identification in pion production experiments