## 2 Theoretical Model
### The Equation of Motion of Electron Layer
As one can clearly see, during an increase of \(\varepsilon_{0}\), the layer starts to speed up and its energy begins to increase in comparison with the energy of a single electron. When \(\varepsilon_{0}=0.02\), the target electrons speed up until the energy, which is significantly higher than the energy of a single electron, is obtained in the wave. During the pulse action period, the maximum energy oscillates and the Lorentz factor gains the magnitude 1000. At a fixed value of \(\mathrm{a}_{0}\), when the target width increases further, the layer stops to speed up and its energy begins to oscillate in time with the same amplitudes. Hence, the equations for the layer motion demonstrate that there is an optimum width for acceleration, and that the instantaneous layer energy during the laser pulse action period can be significantly higher than that when the pulse is switched off. This is why, when solving the acceleration optimization problem, it is reasonable to terminate the pulse action at the instant of the maximum gained energy. As will be shown, this can be done either by settling an additional plasma layer cutting the laser field off the electrons. It is noteworthy that the following formula for the angle of electron layer propagation (with respect to the axis x) out of the laser field is valid  
\[\varphi=arctg\frac{\sqrt{\gamma^{2}-\gamma_{x}^{\ 2}}}{\gamma\sqrt{\gamma_{x}^{ \ 2}-1}} \tag{3}\]  
Let us determine the optimal width of the electron layer for maximum energy gain. Target width should be thicker than 0.1 nm (one-atomic layer) and \(n_{e}\) / \(n_{c}\) > 100  for solid targets that is why the lower limit should be \(\varepsilon_{0}\approx 0.04\). In order for such a target to gain the energy of 1 \(\mathrm{GeV}\), it is sufficient to have a pulse with \(\mathrm{a}_{0}=19\) and duration 5 laser periods. At laser wavelength 0.8 \(\mathrm{\SIUnitSymbolMicro m}\), the corresponding intensity becomes \(8\times 10^{20}\) W/cm\({}^{2}\). In order to tune the electron energy peak to the pulse end, one needs to alter the pulse duration and slightly changes \(\varepsilon_{0}\). For example, for the pulse intensity \(2\,\times\,10^{21}\) W/cm\({}^{2}\) (\(a_{0}=30\)) and duration of exactly 4 periods the target with \(\varepsilon_{0}=0.042\) gains a maximum energy of 2.06 \(\mathrm{GeV}\), and the energy becomes 1.8 \(\mathrm{GeV}\) at the end of the 4 th period, _i.e._ close to the maximum one. However, if one slightly changes \(\varepsilon_{0}\), for example, to 0.05, then the takeoff energy drops to only 306 \(\mathrm{MeV}\). Hence, the electron energy peak related to the end of the laser pulse exhibits a resonance character and its optimization requires the exact tuning of all parameters. It is significant that the high takeoff electron energies can be gained through the abrupt switching-off of the laser pulse. If one considers the major (during 2 and 4 periods) switching-off of the laser pulse, then the takeoff energies are one order lower than the maximum one. Real laser pulses, unless special technical tricks are employed, have the time growth and drop-off of the order of several periods and these times are not determined with high accuracy, _i.e._, a fraction of the periods. Consequently, in a real experiment, it is rather impossible to get the resonance tuning to the maximum layer energy after the interaction. Let us outline that dynamic Equation (1) were obtained in the approximation of a thin (in comparison with the laser wavelength) electron layer and do not take into account its broadening by Coulomb repulsion, which was done in [8]. Using the formulas of this paper, we have shown that our approximation of thin layer is valid until the instant of probe radiation scattering off electron mirror. The reflection coefficient of such a mirror depends only on electron surface density as \(n_{e}(t)l_{f}(t)\approx n_{e}(0)l_{f}(0)\) does not change during Coulomb repulsion. We were subsequently able to calculate electron layer thickness within an appropriate accuracy.