The present invention provides a medical instruments(100)Including a magnetic resonance imaging system(110),It is used to obtain magnetic resonance data,It comes from and at least partly covers a subject of interest(120)An imaging volume(122),Wherein magnetic resonance imaging system(110)Including in imaging volume(122)Within generate a magnetic field a main magnet(112),One particle beam apparatus(150),It, which has, is used for charge particles,Including being configured to around a rotary shaft(R)One rack of rotation(156)A particle beams(154)A particle bunch(152),It is arranged on main magnet(112)Longitudinal direction on,Wherein rack(156)Including at least one deflection magnet(158),It is used to guide the particle beams(154)To in imaging volume(122)Within one irradiation capacity(124),One active compensation coil(200),It is configured to substantially around at least imaging volume(122),An and control unit(132),It is used to control active compensation coil(200),It is used at least in main magnet(112)Longitudinal direction in imaging volume(122)Within cancel by least one deflection magnet(158)Caused stray magnetic field. The present invention also provides the shield method for above-mentioned medical instrument (100).