  Recent progress in manufacturing high-electron-mobility transistors and
optoelectronic devices highlights the necessity of understanding the charge
dynamics and its impact on the optical properties inside heterostructures.
Herein, we study the optical properties of GaN/AlGaN/GaN heterostructures using
cathodoluminescence and photoluminescence spectroscopy. We explore the
influence of generated secondary carriers after electron illumination and their
penetration depth on the luminescence spectra. Our findings indicate that a
higher laser power intensifies the photoluminescence response and establishes
Fabry-Perot-like resonances. Furthermore, the intensity of the
cathodoluminescence response shows a linear behavior versus the acceleration
voltage and the current of electron beams for the yellow luminescence peak. A
near-infrared cathodoluminescence peak (740 nm) is observed only when
illuminating the sample with high currents that is attributed to the trapping
of the secondary electrons within the Schottky barrier and the manipulation of
the two-dimensional electron gas and the quantum-confined states within the
barrier. Self-consistent Poisson-Schr\"odinger simulations verify this aspect.
This research unveils the intricate charge dynamics associated with the
interaction of electron beams with heterostructure systems, paving the way for
innovative optoelectronic applications in semiconductor devices.
