A superconducting magnet for a beam delivery system for carbon ion cancer therapy