Design of electron beam bending magnet system for electron and photon therapy : a simulation approach