Employing RHIC and LHC data to determine the transverse momentum dependent gluon density in a proton