A device for trimming a particle beam, comprising: structures (140; 300; 435; 436; 701; 702; 703; 802) comprised of material that blocks passage of the particle beam, the structures being configurable to define an edge that is movable into a path of the particle beam such that a first part of the particle beam on a first side of the edge is blocked by the structures and such that a second part of the particle beam on a second side of the edge is not blocked by the structures; linear motors that are controllable to configure the structures to define the edge, each of the linear motors comprising a movable component and a stationary component, the stationary component comprising a magnetic field generator (710a, 710b) to generate a first magnetic field, the movable component comprising one or more coils to conduct current to produce a second magnetic field that interacts with the first magnetic field to cause the moveable component to move relative to the stationary component; wherein the movable component of each linear motor is connected to, or part of, a corresponding one of the structures such that the corresponding structure moves along with movement with the movable component; one or more processing devices to control the linear motors to configure the structures, the one or more processing devices being configured to output one or more control signals to control one or more of the linear motors to extend or to retract one or more of the structures to define the edge, the one or more processing devices being at least partly shielded from exposure to environmental neutron radiation impacting the structures and the linear motors during operation of the device; and encoders that are configured to track movement of the structures and to provide information to the one or more processing devices about the movement of the structures, wherein the encoders comprise electronic devices that are connected to a same assembly as the structures and the linear motors, wherein the encoders comprise one or more of laser sensors, optic sensors, or diode sensors, and characterized in that the device further comprises: a first carriage (414; 415; 801) configured to move in a first dimension (418; 711), the first carriage holding the structures and the linear motors; and a second carriage configured to move in a second dimension that is different from the first dimension, the first carriage being coupled to the second carriage, and that the structures are movable also in the first dimension relative to, and separate from movement of, the first carriage (414; 415; 801). structures (140; 300; 435; 436; 701; 702; 703; 802) comprised of material that blocks passage of the particle beam, the structures being configurable to define an edge that is movable into a path of the particle beam such that a first part of the particle beam on a first side of the edge is blocked by the structures and such that a second part of the particle beam on a second side of the edge is not blocked by the structures; linear motors that are controllable to configure the structures to define the edge, each of the linear motors comprising a movable component and a stationary component, the stationary component comprising a magnetic field generator (710a, 710b) to generate a first magnetic field, the movable component comprising one or more coils to conduct current to produce a second magnetic field that interacts with the first magnetic field to cause the moveable component to move relative to the stationary component; wherein the movable component of each linear motor is connected to, or part of, a corresponding one of the structures such that the corresponding structure moves along with movement with the movable component; one or more processing devices to control the linear motors to configure the structures, the one or more processing devices being configured to output one or more control signals to control one or more of the linear motors to extend or to retract one or more of the structures to define the edge, the one or more processing devices being at least partly shielded from exposure to environmental neutron radiation impacting the structures and the linear motors during operation of the device; and encoders that are configured to track movement of the structures and to provide information to the one or more processing devices about the movement of the structures, wherein the encoders comprise electronic devices that are connected to a same assembly as the structures and the linear motors, wherein the encoders comprise one or more of laser sensors, optic sensors, or diode sensors, and characterized in that the device further comprises: a first carriage (414; 415; 801) configured to move in a first dimension (418; 711), the first carriage holding the structures and the linear motors; and a second carriage configured to move in a second dimension that is different from the first dimension, the first carriage being coupled to the second carriage, and that the structures are movable also in the first dimension relative to, and separate from movement of, the first carriage (414; 415; 801). a first carriage (414; 415; 801) configured to move in a first dimension (418; 711), the first carriage holding the structures and the linear motors; and a second carriage configured to move in a second dimension that is different from the first dimension, the first carriage being coupled to the second carriage, and that the structures are movable also in the first dimension relative to, and separate from movement of, the first carriage (414; 415; 801).