Electron-electron interaction in semiconductors with application to hot-electron transistors in silicon and gallium arsenide