Performance of the LHCb RICH photodetectors in a charged particle beam