We have studied the dark matter (DM) distribution in a approx 10^12 h^-1
M_sun mass halo extracted from a simulation consistent with the concordance
cosmology, where the physics regulating the transformation of gas into stars
was allowed to change producing galaxies with different morphologies. The
presence of baryons produces the concentration of the DM halo with respect to
its corresponding dissipationless run, but we found that this response does not
only depend on the amount of baryons gathered in the central region but also on
the way they have been assembled. DM and baryons affect each other in a complex
way so the formation history of a galaxy plays an important role on its final
total mass distribution. Supernova (SN) feedback regulates the star formation
and triggers galactic outflows not only in the central galaxy but also in its
satellites. Our results suggest that, as the effects of SN feedback get
stronger, satellites get less massive and can even be more easily disrupted by
dynamical friction, transferring less angular momentum. We found indications
that this angular momentum could be acquired not only by the outer part of the
DM halo but also by the inner ones and by the stellar component in the central
galaxy. The latter effect produces stellar migration which contributes to
change the inner potential well, probably working against further DM
contraction. As a consequence of the action of these processes, when the halo
hosts a galaxy with an important disc structure formed by smooth gas accretion,
it is more concentrated than when it hosts a spheroidal system which
experienced more massive mergers and interactions. (abridged)Comment: 16 pages, 16 figures, accepted to MNRA