  The radiation of twisted photons by undulators filled with a homogeneous
dielectric dispersive medium is considered. The general formulas for the
average number of radiated twisted photons are obtained. The radiation of
undulators in the dipole regime and the radiation of the helical and planar
wigglers are studied in detail. It is shown that the selection rules for
radiation of twisted photons established for undulators in a vacuum also holds
for undulators filled with a dielectric medium. In the case of a medium with
plasma permittivity the lower undulator harmonics do not form. This fact can be
used for generation of twisted photons with nonzero orbital angular momentum on
the lowest admissible harmonic. The use of the effect of inverse radiation
polarization for generation of twisted photons with larger orbital angular
momentum is described. The influence of the anomalous Doppler effect on the
projection of the total angular momentum of radiated twisted photons is
investigated. The parameters of the undulator and the charged particles are
found such that the produced radiation, in particular, the Vavilov-Cherenkov
radiation, is a pure source of twisted photons with definite nonzero orbital
angular momentum. The developed theory is used to describe the radiation of
twisted photons by beams of electrons and protons in the undulators filled with
helium. We also consider the radiation of X-ray twisted photons by electrons in
the undulator filled with xenon. The parameters are chosen so as to be
achievable at the present experimental facilities.
