Model of the influence of an external magnetic field on the gain of terahertz radiation from semiconductor superlattices.