  A key issue in heavy fermion research is how subtle changes in the
hybridization between the 4$f$ (5$f$) and conduction electrons can result in
fundamentally different ground states. CeRhIn$_5$ stands out as a particularly
notable example: replacing Rh by either Co or Ir, located above or below Rh in
the periodic table, antiferromagnetism gives way to superconductivity. In this
photoemission study of CeRhIn$_5$, we demonstrate that the use of resonant
ARPES with polarized light allows to extract detailed information on the 4$f$
crystal field states and details on the 4$f$ and conduction electron
hybridization which together determine the ground state. We directly observe
weakly dispersive Kondo resonances of $f$-electrons and identify two of the
three Ce $4f_{5/2}^{1}$ crystal-electric-field levels and band-dependent
hybridization, which signals that the hybridization occurs primarily between
the Ce $4f$ states in the CeIn$_3$ layer and two more three-dimensional bands
composed of the Rh $4d$ and In $5p$ orbitals in the RhIn$_2$ layer. Our results
allow to connect the properties observed at elevated temperatures with the
unusual low-temperature properties of this enigmatic heavy fermion compound.
