The influence of photoelectron processes in a semiconductor substrate on the adsorption of polycationic and polyanionic molecules