def get_hp_relic(mx, ms, stheta, semi_analytic=True):
    """
    Get relic abundance for Higgs portal model where the DM annihilates
    into mediators.
    """
    def fn(log_gsxx):
        hp = HiggsPortal(mx, ms, 10**log_gsxx, stheta)
        hp.gsxx = 10**log_gsxx
        return relic_density(hp, semi_analytic) - Omega_dm

    if ms < mx:
        bracket = [-5, np.log10(4 * np.pi)]
    else:
        bracket = [-10, 10]
        
    print([fn(b) for b in bracket])
    
    sol = root_scalar(fn, bracket=bracket, xtol=1e-100, rtol=1e-4)
    if not sol.converged:
        raise Exception("didn't converge")

    gsxx_relic = 10**sol.root
    hp = HiggsPortal(mx, ms, gsxx_relic, stheta)
    sigma = hp.annihilation_cross_sections(
        2 * hp.mx * (1 + 1/2 * v_mw**2)
    )["total"]
    sv = sigma * v_mw * sv_inv_MeV_to_cm3_per_s
    b = sigma / v_mw
#     print()

    return sv, gsxx_relic, b
def get_sv_hp_relic(mx, ms, stheta=1):
    def fn(gsxx):
        hp = HiggsPortal(mx, ms, gsxx, stheta)
        return relic_density(hp) - 0.22
    
    if ms < mx:
        bracket = (1e-5, 4*np.pi)
    else:
        bracket = (1e-4, 1e8)
    gsxx = root_scalar(fn, bracket=bracket, xtol=1e-100, rtol=1e-3).root
    hp = HiggsPortal(mx, ms, gsxx, stheta)
    return hp.annihilation_cross_sections(
        2 * hp.mx * (1 + 0.5 * v_mw**2)
    )["total"] * v_mw * sv_inv_MeV_to_cm3_per_s
    def fn(mx, ms, sv):
        assert ms > mx
        hp = HiggsPortal(mx, ms, 1, 1)
        sv_1 = hp.annihilation_cross_sections(
            2 * hp.mx * (1 + 0.5 * v_mw**2)
        )["total"] * v_mw * sv_inv_MeV_to_cm3_per_s

        # Find smallest stheta compatible with <sigma v> for the given
        # gsxx_max
        stheta_min = np.sqrt(sv / sv_1) / gsxx_max
        if stheta_min > 0.999:
            return -1e100
        
        stheta_grid = np.geomspace(stheta_min, 0.999, 20)
        constr_mins = np.full_like(stheta_grid, np.inf)
        gsxxs = np.zeros_like(stheta_grid)
        for i, stheta in enumerate(stheta_grid):
            hp.stheta = stheta
            hp.gsxx = np.sqrt(sv / sv_1) / hp.stheta
            gsxxs[i] = hp.gsxx
            # Figure out strongest constraint
            constr_mins[i] = np.min([fn() for fn in hp.constraints().values()])

        # Check if (mx, ms, sv) point is allowed for some (gsxx, stheta) combination
        return constr_mins.max()
Ejemplo n.º 4
0
    """
    name = f"${name}$"
    label = name.replace("->", "\\to")
    label = label.replace("e e", "e^+ e^-")
    label = label.replace("mu mu", "\mu^+ \mu^-")
    label = label.replace(" pi0", " \pi^0")
    label = label.replace(" pi", " \pi")
    label = label.replace("k ", "K ")
    label = label.replace("kl ", "K_L ")
    label = label.replace(" invis", "\, \mathrm{invis.}")
    label = label.replace("charm", "\mathrm{CHARM}")
    return label


# %% hidden=true
sm = HiggsPortal(mx=150, ms=1e3, gsxx=0.001, stheta=0.1)
mss = np.linspace(0.1, 1e3, 60)
sthetas = np.geomspace(1e-5, 1e0, 50)
constrs = sm.constrain("ms", mss, "stheta", sthetas, "image")

# %% hidden=true
for (name, constr), color in zip(constrs.items(), mpl_colors):
    plt.contourf(
        mss, sthetas, constr, levels=[-1e100, 0], colors=[color], linewidths=[1],
        alpha=0.3
    )
    proxy = plt.Rectangle(
        (0, 0), 1, 1, fc=color, label=get_constr_label(name), alpha=0.3
    )
    plt.gca().patches += [proxy]
 def fn(gsxx):
     hp = HiggsPortal(mx, ms, gsxx, stheta)
     return relic_density(hp) - 0.22
 def fn(mx, ms):
     hp = HiggsPortal(mx, ms, gsxx_max, 1)
     return hp.annihilation_cross_sections(
         2 * hp.mx * (1 + 0.5 * v_mw**2)
     )["total"] * v_mw * sv_inv_MeV_to_cm3_per_s
 def fn(log_gsxx):
     hp = HiggsPortal(mx, ms, 10**log_gsxx, stheta)
     hp.gsxx = 10**log_gsxx
     return relic_density(hp, semi_analytic) - Omega_dm
        return constr_mins.max()

    return np.vectorize(fn)(mx, ms, sv)


# %% [markdown] heading_collapsed=true
# ### Compute

# %% hidden=true
ms_over_mxs = [0.5, 1.5]#, 1.1]
mxs = [
    np.geomspace(0.1, 250, 40) if r > 1 else np.geomspace(0.1, 1000, 40)
    for r in ms_over_mxs
]
mss = [mx * ms_over_mx for mx, ms_over_mx in zip(mxs, ms_over_mxs)]
models = [HiggsPortal(mx=1, ms=1, gsxx=1, stheta=1) for _ in ms_over_mxs]

# %% hidden=true
svs = [{} for _ in mxs]
for i in range(len(mxs)):
    svs[i] = get_constraints(models[i], mxs[i], mss[i])
    # Clean up any extremely weak constraints
    for key in svs[i]:
        svs[i][key][svs[i][key] > 1] = np.inf

# %% hidden=true
beep()

# %% hidden=true
# Save constraints
np.savez("data/higgs_portal_matching/svs.npz", svs=svs)