  In this paper, I use the extension of the excursion set model of Sheth &
Tormen (2002) and the barrier shape obtained in Del Popolo & Gambera (1998) to
calculate the unconditional halo mass function, and the conditional mass
function in several cosmological models. I show that the barrier obtained in
Del Popolo & Gambera (1998), which takes account of tidal interaction between
proto-haloes, is a better description of the mass functions than the spherical
collapse and is in good agreement with numerical simulations (Tozzi & Governato
1998, and Governato et al. 1999). The results are also in good agreement with
those obtained by Sheth & Tormen (2002), only slight differences are observed
expecially at the low mass end. I moreover calculate, and compare with
simulations, the temperature function obtained by means of the mass functions
previously calculated and also using an improved version of the M-T relation,
which accounts for the fact that massive clusters accrete matter
quasi-continuously, and finally taking account of the tidal interaction with
neighboring clusters. Even in this case the discrepancy between the
Press-Schecter predictions and simulations is considerably reduced.
