Franck–Hertz effect in cathodo- and photoluminescence of wide-gap materials