  We present and analyze exact solutions of the Einstein-Maxwell equations in
higher dimensions which form a large subclass of the Kundt family of
spacetimes. We assume that the cosmological constant may be nonvanishing, and
the matter consists of a background aligned electromagnetic field and an
additional pure radiation (gyratonic) field with a spin. We show that the field
equations reduce to a set of linear equations on the transverse space which can
be solved exactly and expressed in terms of the Green functions. We thus find
explicit exact gyratonic gravitational and electromagnetic fields created by a
radiation beam of null matter with arbitrary profiles of energy density and
angular momenta. In the absence of the gyratonic matter we obtain pure
nonexpanding higher-dimensional gravitational waves.
  In particular, we investigate gyratons and waves propagating on backgrounds
which are a direct-product of 2-spaces of constant curvature. Such type D or 0
background spacetimes generalize 4-dimensional Nariai, anti-Nariai and
Plebanski-Hacyan universes, and conformally flat Bertotti-Robinson and
Minkowski spaces. These spacetimes belong to a wider class of spaces which
admit the Kahler structure related to the background magnetic field. The
obtained wave and gyraton solutions are also members of the recently discussed
class of spacetimes with constant scalar invariants (CSI) of the curvature
tensor.
