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

fix: adjust jme_nano cff for changes in #31618 #31786

Merged
merged 1 commit into from Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions PhysicsTools/NanoAOD/python/custom_jme_cff.py
Expand Up @@ -19,13 +19,12 @@
import copy

bTagCSVV2 = ['pfDeepCSVJetTags:probb','pfDeepCSVJetTags:probbb','pfDeepCSVJetTags:probc']
bTagCMVAV2 = ['pfCombinedMVAV2BJetTags']
bTagDeepCSV = ['pfCombinedInclusiveSecondaryVertexV2BJetTags']
bTagDeepJet = [
'pfDeepFlavourJetTags:probb','pfDeepFlavourJetTags:probbb','pfDeepFlavourJetTags:problepb',
'pfDeepFlavourJetTags:probc','pfDeepFlavourJetTags:probuds','pfDeepFlavourJetTags:probg'
]
bTagDiscriminatorsForAK4 = bTagCSVV2+bTagCMVAV2+bTagDeepCSV+bTagDeepJet
bTagDiscriminatorsForAK4 = bTagCSVV2+bTagDeepCSV+bTagDeepJet

#
# By default, these collections are saved in NanoAODs:
Expand Down Expand Up @@ -170,14 +169,13 @@
qgl_mult = Var("userInt('qgl_mult')", int,doc="PF candidates multiplicity (Quark vs Gluon likelihood input variable)"),
)
BTAGVARS = cms.PSet(
btagCMVA = jetTable.variables.btagCMVA,
btagDeepB = jetTable.variables.btagDeepB,
btagCSVV2 = jetTable.variables.btagCSVV2,
btagDeepC = jetTable.variables.btagDeepC,
btagDeepCvL = jetTable.variables.btagDeepCvL,
)
DEEPJETVARS = cms.PSet(
btagDeepFlavB = jetTable.variables.btagDeepFlavB,
btagDeepFlavC = jetTable.variables.btagDeepFlavC,
btagDeepFlavC = Var("bDiscriminator('pfDeepFlavourJetTags:probc')",float,doc="DeepFlavour charm tag raw score",precision=10),
btagDeepFlavG = Var("bDiscriminator('pfDeepFlavourJetTags:probg')",float,doc="DeepFlavour gluon tag raw score",precision=10),
btagDeepFlavUDS = Var("bDiscriminator('pfDeepFlavourJetTags:probuds')",float,doc="DeepFlavour uds tag raw score",precision=10)
)
Expand Down Expand Up @@ -361,12 +359,11 @@ def AddBTaggingScores(proc, jetTableName=""):
Store b-tagging scores from various algortihm
"""

getattr(proc, jetTableName).variables.btagCMVA = jetTable.variables.btagCMVA
getattr(proc, jetTableName).variables.btagDeepB = jetTable.variables.btagDeepB
getattr(proc, jetTableName).variables.btagCSVV2 = jetTable.variables.btagCSVV2
getattr(proc, jetTableName).variables.btagDeepC = jetTable.variables.btagDeepC
getattr(proc, jetTableName).variables.btagDeepCvL = jetTable.variables.btagDeepCvL
getattr(proc, jetTableName).variables.btagDeepFlavB = jetTable.variables.btagDeepFlavB
getattr(proc, jetTableName).variables.btagDeepFlavC = jetTable.variables.btagDeepFlavC
getattr(proc, jetTableName).variables.btagDeepFlavCvL = jetTable.variables.btagDeepFlavCvL

return proc

Expand Down