The present invention relates to a method for obtaining a shielding element for minimizing the penumbra of a beam of hadrons outside a target area, the hadron beam being guided in a longitudinal direction by an irradiation unit, and the beam having a width (σ). The method includes:(i) defining a closed or open contour of said target area(ii) providing a block having a longitudinal thickness capable of blocking the passage of said beam and having a lateral surface perpendicular to said longitudinal thickness(iii) forming an aperture of a shape similar to said contour and crossing said longitudinal thickness of said block for letting through said beam, said aperture forming a longitudinal internal surface and(iv) trimming said block so as to form a longitudinal external surface around said longitudinal internals surface, said longitudinal internal and longitudinal external surfaces delimiting a side wall.