A stochastic model for the semiclassical collective dynamics of charged beams in particle accelerators