  We study the symmetry and the structure of the gap in Fe-based
superconductors by decomposing the pairing interaction obtained in the RPA into
s- and d-wave components and into contributions from scattering between
different Fermi surfaces. We show that each interaction is well approximated by
the lowest angular harmonics and use this simplification to analyze the origin
of the attraction in the two channels, the competition between s- and d-wave
solutions, and the origin of superconductivity in heavily doped systems, when
only electron or only hole pockets are present.
