A particle therapy system includes a particle accelerator to output a particle beam and a scanning system for the particle accelerator to scan the particle beam across at least part of an irradiation target. The scanning system is configured to scan the particle beam in two dimensions that are at an angle relative to a direction of the particle beam. A structure defines an edge. The structure is controllable to move in the two dimensions relative to the irradiation target such that at least part of the structure is between at least part of the particle beam and the irradiation target. The structure includes a material that inhibits transmission of the particle beam.