Three Dimensional Simulation And Magnetic Decoupling Of The Linac In A Linac-Mr System