˜ s$_{z}$ = 1 2 [ K 1 + ue − 2 T R /T e s − (1 + u ) cos( ω$_{e}$T$_{R}$ ) e − T R /T e s − $_{K}$] , (5) K ≡ v uαe − T R /T e s − α cos( ω$_{e}$T$_{R}$ ) − β sin( ω$_{e}$T$_{R}$ ) ] e − T R /T e s . Here v ≡ sin $^{2}$(Θ / 2) / 2, u ≡ cos(Θ / 2), Θ is pulse area, α ≡ 1 + Re (1 / ( τ$_{r}$ Ω)), β ≡ Im (1 / ( τ$_{r}$ Ω)), Ω = 1 /T e s − 1 /τ$_{T}$ + iω$_{e}$ , T$_{R}$ is laser repetition period, ω$_{e}$ = g$_{e}$µ$_{B}$B/ ℏ is the electron spin precession frequency, τ$_{r}$ is the trion recombination time, τ$_{T}$ = T h s τ$_{r}$/ ( T h s + τ$_{r}$ ) is the trion spin lifetime, T h s is the hole spin relaxation time, and T e s is the electron spin relaxation time. and 4(e). These two contributions have not only differ- ent shapes but also slightly different electron g -factors and spreads of g -factors, as given in the figure caption. The variation of g -factors can be traced to its energy de- pendence $^{24}$. The weaker localized carriers, which have a stronger impact on the exciton resonance, have a smaller g -factor and a smaller dispersion. It is worth mentioning that for exciton resonant exci- tation higher energy trions can be formed as compared to the case of trion resonant excitation. These trions can be weaker localized so that they demonstrate short hole spin relaxation times, resulting in efficient spin coherence gen- eration for resident electrons at B = 0. The contribution of such a channel can be described by the conventional RSA shape shown in Fig. 4(d). However, in the studied sample the role of the exciton under these experimental conditions dominated over the possible trion contribu- tion. There are two arguments for this conclusion: (i) the spectral dependence of amplitude of the RSA signal with The expression for a typical RSA contour which de- scribes the contribution due to spin orientation by electron-exciton scattering can be found, for exam- ple, in the online materials to Ref. [6] as Eqs. (B4) and (B5). It is described by Eq. (5) with K = v [ ue − T R /T e s − cos( ω$_{e}$T$_{R}$ ) ] e − T R /T e s . An example of such signal is shown in Fig. 4(d). In order to fit the complicated shape of the RSA sig- nal measured at the exciton resonance we used a sum of contributions due to spin orientation by trion and by exciton. The grey line fit for the exciton in Fig. 4(c), results from two signals shown separately in Figs. 4(d) The strong difference between the signals measured at the exciton and trion energies suggests that different mechanisms are involved in spin coherence generation. The strong suppression of the RSA signal at B = 0 for trion excitation and its bat-like shape serves as direct evi- dence of the long spin relaxation time of the hole involved in the trion $^{9}$. Indeed, in absence of the magnetic field the long-lived electron spin coherence at trion excitation can be generated only as much as the hole spin in trion flips, compare Figs. 5(a) and 5(b). If the hole spin relaxation time T h s exceeds by far the trion recombination time, τ$_{r}$ , the resident electron left behind after trion recombination has the same spin as before and no long-living spin co- herence for the resident electrons is generated, Fig. 5(a). The bat-like trion signal shown in Fig. 4(a) can be modeled with good quantitative agreement, as seen from the comparison of the black and grey lines in Fig. 4(c), in the frame of the approach suggested in Ref. 9. An in- finite sequence of pump pulses with repetition period T$_{R}$ creates an electron spin polarization periodic in time $^{9,18}$. The electron spin polarization, ˜ s$_{z}$ , shortly before pump pulse arrival is described by $^{9,21}$: Interestingly, for exciton resonant excitation (see Fig. 4) the signal is not suppressed at B = 0, which shows that electron spin coherence is efficiently excited even in the absence of electron spin rotation. The corresponding mechanism of resident electron spin coherence generation can be related with the spin flip-flop exchange scattering between a resident electron and a photoexcited electron in the exciton. In such a case the hole spin-flip is not needed: right after the electron flip-flop scattering an uncompensated resident electron spin appears (Fig. 6). This exchange scattering process may be the dominant channel for spin coherence generation at weak magnetic fields, while with increasing magnetic field the spin co- herence generation via the trion state becomes more effi- cient. This results in the increase of the RSA amplitude for fields B > 50 mT, see Fig. 4(a). With increase of the magnetic field the resident carrier spins and the spins of the electron returning from the trion are no longer parallel to each other and the RSA signal increases, see Fig. 5(c). the electron spin ensemble precessing about the magnetic field, can be evaluated $^{4}$. The spin amplification signals measured on the exci- ton and trion resonance qualitatively differ from each other, see Fig. 4(a). They deviate also from the typi- cal RSA shape with decreasing peak amplitude and in- creasing peak width with increasing magnetic field, see Ref. 4 and Fig. 4(d). For the trion resonance the signal amplitude is strongly suppressed at zero magnetic field and the amplitude increases with growing field strength. For the exciton resonance the signal has a complicated shape, which results from a combination of the typical RSA signal from Fig. 4(d) and the trion bat-like signal shown in Fig. 4(e) (see below). 5