def _mass_range(name, mass, width, degen, boson):
    """
    Determine the mass thresholds of a resonance for truncating its
    Breit-Wigner distribution.

    """
    PION = 0.14
    KAON = 0.5
    ETA = 0.55
    NUCLEON = 0.94
    LAMBDA = 1.12
    SIGMA = 1.2
    XI = 1.33
    if boson:
        m_min = {'f(0)(500)': 2 * PION, 'rho(770)': 2 * PION, 'omega(782)':
            2 * PION, "eta'(958)": 2 * PION, 'f(0)(980)': 2 * PION,
            'a(0)(980)': ETA + PION, 'phi(1020)': 3 * PION, 'h(1)(1170)': 3 *
            PION, 'b(1)(1235)': 4 * PION, 'a(1)(1260)': 3 * PION,
            'f(2)(1270)': 2 * PION, 'f(1)(1285)': 2 * PION, 'eta(1295)': 
            ETA + 2 * PION, 'pi(1300)': 3 * PION, 'a(2)(1320)': 3 * PION,
            'f(0)(1370)': 2 * PION, 'pi(1)(1400)': ETA + PION, 'eta(1405)':
            ETA + 2 * PION, 'f(1)(1420)': 2 * KAON + PION, 'omega(1420)': 3 *
            PION, 'a(0)(1450)': ETA + PION, 'rho(1450)': 2 * PION,
            'eta(1475)': 2 * KAON + PION, 'f(0)(1500)': 2 * PION,
            "f(2)'(1525)": 2 * PION, 'pi(1)(1600)': 3 * PION,
            'eta(2)(1645)': ETA + 2 * PION, 'omega(1650)': 3 * PION,
            'omega(3)(1670)': 3 * PION, 'pi(2)(1670)': 3 * PION,
            'phi(1680)': 2 * KAON, 'rho(3)(1690)': 2 * PION, 'rho(1700)': 2 *
            PION, 'f(0)(1710)': 2 * PION, 'pi(1800)': 3 * PION,
            'phi(3)(1850)': 2 * KAON, 'f(2)(1950)': 2 * PION, 'f(2)(2010)':
            2 * KAON, 'a(4)(2040)': 3 * PION, 'f(4)(2050)': 2 * PION,
            'f(2)(2300)': 2 * KAON, 'f(2)(2340)': 2 * ETA, 'K*(892)': KAON +
            PION, 'K(1)(1270)': KAON + 2 * PION, 'K(1)(1400)': KAON + 2 *
            PION, 'K*(1410)': KAON + PION, 'K(0)*(1430)': KAON + PION,
            'K(2)*(1430)': KAON + PION, 'K*(1680)': KAON + PION,
            'K(2)(1770)': KAON + 2 * PION, 'K(3)*(1780)': KAON + PION,
            'K(2)(1820)': KAON + 2 * PION, 'K(4)*(2045)': KAON + PION}.get(name
            )
    else:
        m_min = {'N': NUCLEON + PION, 'Delta': NUCLEON + PION, 'Lambda': 
            SIGMA + PION, 'Sigma': LAMBDA + PION, 'Xi': XI + PION, 'Omega':
            XI + KAON + PION}.get(name.split('(')[0])
    assert m_min is not None, 'unknown mass threshold for {}'.format(name)
    assert mass > m_min, 'minimum mass larger than pole mass for {}'.format(
        name)
    m_min = max(m_min, mass - 4 * width)
    m_max = mass + 4 * width
    return m_min, m_max
