  We present the MOdel for the Rise of GAlaxies aNd Active nuclei (MORGANA).
Starting from the merger trees of dark matter halos and a model for the
evolution of substructure within the halos, the complex physics of baryons is
modeled with a set of state-of-the-art models that describe the mass, metal and
energy flows between the various components and phases of a galaxy. The
processes of shock-heating and cooling, star formation, feedback, galactic
winds and super-winds, accretion onto BHs and AGN feedback are described by new
models. In particular, the evolution of the halo gas explicitly follows the
thermal and kinetic energies of the hot and cold phases, while star formation
and feedback follow the results of the multi-phase model by Monaco (2004a). The
increased level of sophistication allows to move from a phenomenological
description of gas physics, based on simple scalings with the depth of the DM
halo potential, toward a fully physically motivated one. The comparison of the
predictions of MORGANA with a basic set of galactic data reveals from the one
hand an overall rough agreement, and from the other hand highlights a number of
well- or less-known problems: (i) producing the cutoff of the luminosity
function requires to force the quenching of the late cooling flows by AGN
feedback, (ii) the normalization of the Tully-Fisher relation of local spirals
cannot be recovered unless the dark matter halos are assumed to have a very low
concentration, (iii) the mass function of HI gas is not easily fitted at small
masses, unless a similarly low concentration is assumed, (iv) there is an
excess of small elliptical galaxies at z=0. These discrepancies, more than the
points of agreement with data, give important clues on the missing ingredients
of galaxy formation. (ABRIDGED)
