This program is a Monte Carlo simulation of electron trajectory in solid. This new Monte Carlo programs, Ray, is a extension of the well known Monte Carlo program CASINO, which includes statistical distributions for the backscattered electrons, trapped electrons, energy loss and phi rho z curves for X-ray. The new added features in Ray are: the complete simulation of the X-ray spectrum, the charging effect for insulating specimen.