Self-consistent modeling of pair cascades in the polar cap of a pulsarстатья