Modelling the interaction of a relativistic beam particle with an electron cloud