Development of an efficient scanning and purging magnet system for IMRT with narrow high energy photon beams