def is_matched_to_b(jet):
    """returns true if jet.match is a b quark.
    matching must be done before.
    does not work because of low matching efficiency? 
    """
    is_bjet = False
    if jet.match and abs(jet.match.pdgid()) == 5:
        is_bjet = True
    return is_bjet
