diff --git a/PhysicsTools/NanoAOD/python/jetMC_cff.py b/PhysicsTools/NanoAOD/python/jetMC_cff.py index 736b68afb6850..463569e1415a2 100644 --- a/PhysicsTools/NanoAOD/python/jetMC_cff.py +++ b/PhysicsTools/NanoAOD/python/jetMC_cff.py @@ -12,7 +12,8 @@ variables = cms.PSet( partonFlavour = Var("partonFlavour()", "int16", doc="flavour from parton matching"), hadronFlavour = Var("hadronFlavour()", "uint8", doc="flavour from hadron ghost clustering"), - genJetIdx = Var("?genJetFwdRef().backRef().isNonnull()?genJetFwdRef().backRef().key():-1", "int16", doc="index of matched gen jet"), + # cut should follow genJetTable.cut + genJetIdx = Var("?genJetFwdRef().backRef().isNonnull() && genJetFwdRef().backRef().pt() > 10.?genJetFwdRef().backRef().key():-1", "int16", doc="index of matched gen jet"), ) ) genJetTable = simpleCandidateFlatTableProducer.clone( @@ -90,6 +91,7 @@ nBHadrons = Var("jetFlavourInfo().getbHadrons().size()", "uint8", doc="number of b-hadrons"), nCHadrons = Var("jetFlavourInfo().getcHadrons().size()", "uint8", doc="number of c-hadrons"), hadronFlavour = Var("hadronFlavour()", "uint8", doc="flavour from hadron ghost clustering"), + # cut should follow genJetAK8Table.cut genJetAK8Idx = Var("?genJetFwdRef().backRef().isNonnull() && genJetFwdRef().backRef().pt() > 100.?genJetFwdRef().backRef().key():-1", "int16", doc="index of matched gen AK8 jet"), ) )