def ak8Quality(jet):
    """Quality cut on AK8 jet"""
    energy = jet.energy()
    nhf = jet.neutralHadronEnergy() / jet.energy()
    nef = jet.neutralEmEnergy() / jet.energy()
    chf = jet.chargedHadronEnergy() / jet.energy()
    cef = jet.chargedEmEnergy() / jet.energy()
    nconstituents = jet.numberOfDaughters()
    nch = jet.chargedMultiplicity()
    goodJet = \
        nhf < 0.99 and \
        nef < 0.99 and \
        chf > 0.00 and \
        cef < 0.99 and \
        nconstituents > 1 and \
        nch > 0

    return goodJet