  Microscopic origins of charge currents and electromagnetic (EM) radiation
generated by them in spintronic THz emitters -- such as, femtosecond laser
pulse-driven single magnetic layer or its heterostructures with a nonmagnetic
layer hosting strong spin-orbit coupling (SOC) -- remain poorly understood
despite nearly three decades since the discovery of ultrafast demagnetization.
We introduce a first-principles method to compute these quantities, where the
dynamics of charge and current densities is obtained from real-time
time-dependent density functional theory (TDDFT), which are then fed into the
Jefimenko equations for properly retarded electric and magnetic field solutions
of the Maxwell equations. By Fourier transforming different time-dependent
terms in the Jefimenko equations, we unravel that in 0.1--30 THz range the
electric field of far-field EM radiation by Ni layer, chosen as an example, is
{\em dominated by charge current pumped by demagnetization}, while often
invoked magnetic dipole radiation from time-dependent magnetization of a single
magnetic layer is a negligible effect. Such overlooked case of charge current
pumping by time-dependent quantum system, whose magnetization is shrinking
while its vector does not rotate, does not require any spin-to-charge
conversion via SOC effects. In Ni/Pt bilayer, EM radiation remains dominated by
charge current within Ni layer, whose magnitude is larger than in the case of
single Ni layer due to faster demagnetization, while often invoked
spin-to-charge conversion within Pt layer provides additional but smaller
contribution. By using Poynting vector and its flux, we also quantify
efficiency of conversion of light into emitted EM radiation, as well as the
angular distribution of the latter.
