Skip to content

Commit

Permalink
Merge pull request #41112 from swertz/fixGenJetIdx_13_0_X
Browse files Browse the repository at this point in the history
[13_0_X] [Nano] Fix JetTable genJetIdx matching
  • Loading branch information
cmsbuild authored Mar 22, 2023
2 parents 16774d2 + d0f4f40 commit 5d3040e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PhysicsTools/NanoAOD/python/jetMC_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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"),
)
)
Expand Down

0 comments on commit 5d3040e

Please sign in to comment.