def virial_temp_HB(mass, z):
    """Virial temperature from halo mass according to Haiman & Bryan
    (2006ApJ...650....7).

    z is the redshift.

    Units are Msun and kelvin.

    """
    return 1800. * (mass/1e6)**(2./3.) * (1.+z)/21