def calc_scale1fb(xs, sum_weights):
    """
    Given xs (in pb) and sum of gen weights,
    calculate scale1fb.
    :param xs: cross section (in pb)
    :type xs: float
    :param sum_weights: sum of gen weights
    :type sum_weights: float
    :return: scale1fb
    :rtype: float
    """
    if xs <= 0:
        return -1
    else:
        return (xs * 1000.) / sum_weights