  We describe the system of massive Weyl fields propagating in a background
matter and interacting with an external electromagnetic field. The interaction
with an electromagnetic field is due to the presence of anomalous magnetic
moments. To canonically quantize this system first we develop the classical
field theory treatment of Weyl spinors in frames of the Hamilton formalism
which accounts for the external fields. Then, on the basis of the exact
solution of the wave equation for a massive Weyl field in a background matter
we obtain the effective Hamiltonian for the description of spin-flavor
oscillations of Majorana neutrinos in matter and a magnetic field. Finally, we
incorporate in our analysis the neutrino self-interaction which is essential
when the neutrino density is sufficiently high. We also discuss the
applicability of our results for the studies of collective effects in
spin-flavor oscillations of supernova neutrinos in a dense matter and a strong
magnetic field.
