Ray tracing codes are useful to study the electromagnetic wave propagation and absorption in the geometrical optics approximation. In magnetized fusion plasma community, most ray tracing codes assume the plasma density and temperature be functions of the magnetic flux and study waves only inside the last closed flux surface, which are sufficient for the present day tokamak. However, they are difficult to be used for configurations with open magnetic field line plasmas, such as mirror machine and field-reversed-configuration (FRC). We develop a ray tracing code in cylindrical coordinates (r,ϕ,z) to support arbitrary axisymmetric configurations with both closed and open field lines plasmas. For wave propagation, the cold plasma dispersion relation is usually sufficient, and we require the magnetic field B(r,z) and species densities ns0(r,z) profiles as input. For wave absorption, we require a further temperature Ts0(r,z) profile to solve a hot kinetic plasma dispersion relation. In difference to other ray tracing codes which calculate the imaginary part of wave vector k⊥,i for wave absorption, we calculate the imaginary part of wave frequency ωi, which is shown to be equivalent with the former technique under weak damping approximation. The code can use either numerical or analytical equilibrium. Examples and benchmarks with electron cyclotron wave, lower hybrid wave and ion cyclotron wave for tokamak, spherical tokamak (ST), FRC and mirror machine are shown. Program summaryProgram Title: BORAYCPC Library link to program files:https://doi.org/10.17632/tnkrjdbcz8.1Code Ocean capsule:https://codeocean.com/capsule/6205646Licensing provisions: BSD 3-clauseProgramming language: MatlabNature of problem: Solve the plasmas electromagnetic wave propagation and absorption in the geometrical optics approximation for magnetized plasmas based on ray tracing of plasma dispersion relation. In axisymmetric (r,z) coordinates, the code can be used for both closed and open field lines plasmas of various configurations such as tokamak, spherical tokamak, FRC and mirror machine.Solution method: Runge-Kutta time integral to solve ray tracing equations for wave propagation, and integral the imaginary part of the wave frequency in hot kinetic dispersion relation for wave absorption.Additional comments including restrictions and unusual features: Kinetic relativistic effects and collisional damping are not included in the present version yet. Only axisymmetric two-dimensional (2D) profiles are support in present version.