  A new photoelectric phenomenon, the in-plane photoelectric (IPPE) effect, has
been recently discovered at terahertz (THz) frequencies in a
GaAs/Al$_x$Ga$_{1-x}$As heterostructure with a two-dimensional (2D) electron
gas (W. Michailow et al., Sci. Adv. \textbf{8}, eabi8398 (2022)). In contrast
to the conventional PE phenomena, the IPPE effect is observed at normal
incidence of radiation, the height of the in-plane potential step, which
electrons overcome after absorption of a THz photon, is electrically tunable by
gate voltages, and the effect is maximal at a negative electron ``work
function'', when the Fermi energy lies above the potential barrier. Based on
the discovered phenomenon, efficient detection of THz radiation has been
demonstrated. In this work we present a detailed theory of the IPPE effect
providing analytical results for the THz wave generated photocurrent, the
quantum efficiency, and the internal responsivity of the detector, in
dependence on the frequency, the gate voltages, and the geometrical parameters
of the detector. The calculations are performed for macroscopically wide
samples at zero temperature. Results of the theory are applicable to any
semiconductor systems with 2D electron gases, including III-V structures,
silicon-based field effect transistors, and the novel 2D layered,
graphene-related materials.
