Study of the magnetization reorientation in HoCo5