Energy losses of fast electrons in multi-layer systems