The final energy of the emerging particle beam defines the depth of penetration, and hence, the location of the maximum energy deposition. Since it is easy to deflect the beam by means of electro-magnets in a transverse direction, it is possible to employ a raster scan method, i.e., to scan the target area quickly like the electron beam scans a TV tube. If, in addition, the beam energy and hence, the depth of penetration is varied, an entire target volume can be covered in three dimensions, providing an irradiation exactly following the shape of the tumor.