Physics with ring imaging Cherenkov detectors