Semiclassical theory of diffraction in elastic scattering