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 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. 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$.
We shall discuss also charge splitting of the directed flow of pions for RHIC beam energy scan data in the same phenomenological approach .
 V. Ozvenchuk, A. Rybicki, A.Szczurek, A. Marcinek, M. Kielbowicz,
 V. Ozvenchuk et al, a paper in preparation.