  We present our calculation of electromagnetic effects, induced by the
spectator charge on Feynman-$x_F$ distributions of charged pions in peripheral
$Pb+Pb$ collisions at CERN SPS energies, including realistic initial
space-time-momentum conditions for pion emission. The calculation is performed
in the framework of a specific implementation of the fire-streak model, adopted
to the production of both $\pi^-$ and $\pi^+$ mesons. Isospin effects are
included to take into account the asymmetry in production of $\pi^+$ and
$\pi^-$ at high rapidity. A comparison to a simplified model from the
literature is made. We obtain a good description of the NA49 data on the $x_F$-
and $p_T$-dependence of the ratio of cross sections $\pi^+/\pi^-$. The
experimental data favors short times ($0.5<\tau<2$~fm/$c$) for fast pion
creation in the local fire-streak rest frame. The possibility of the expansion
of the spectators is considered in our calculation, and its influence on the
electromagnetic effect observed for the $\pi^+/\pi^-$ ratio is discussed. The
influence of directed and elliptic flow, and vorticity on the observed effect
is also estimated. We conclude that the fire-streak model, which properly
describes the centrality dependence of $\pi^-$ rapidity spectra at CERN SPS
energies, also provides realistic initial conditions for pion production.
Consequently, it provides a quantitative description of the electromagnetic
effect on the $\pi^+/\pi^-$ ratio as a function of $x_F$.
