Performance of drift chambers in a magnetic rigidity spectrometer for measuring the cosmic radiation