Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13_0_X] [Nano] Fix JetTable genJetIdx matching #41112

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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