Identification of large-transverse-momentum hadrons using a ring-imaging Cherenkov counter