-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix for wf 11634.15
#40539
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 for wf 11634.15
#40539
Changes from 3 commits
e2530f1
cc2047c
3542236
3a70499
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |||
| from PhysicsTools.PatAlgos.tools.jetTools import supportedJetAlgos | ||||
| from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection | ||||
|
|
||||
| import copy | ||||
| from Configuration.Eras.Modifier_run3_common_cff import run3_common | ||||
|
|
||||
| bTagCSVV2 = ['pfCombinedInclusiveSecondaryVertexV2BJetTags'] | ||||
| bTagDeepCSV = ['pfDeepCSVJetTags:probb','pfDeepCSVJetTags:probbb','pfDeepCSVJetTags:probc'] | ||||
|
|
@@ -27,7 +27,12 @@ | |||
| 'pfDeepFlavourJetTags:probc','pfDeepFlavourJetTags:probuds','pfDeepFlavourJetTags:probg' | ||||
| ] | ||||
| from RecoBTag.ONNXRuntime.pfParticleNetAK4_cff import _pfParticleNetAK4JetTagsAll | ||||
| bTagDiscriminatorsForAK4 = bTagCSVV2+bTagDeepCSV+bTagDeepJet+_pfParticleNetAK4JetTagsAll | ||||
| bTagDiscriminatorsForAK4 = cms.PSet(foo = cms.vstring(bTagDeepCSV+bTagDeepJet+_pfParticleNetAK4JetTagsAll)) | ||||
| run2_nanoAOD_ANY.toModify( | ||||
| bTagDiscriminatorsForAK4, | ||||
| foo = bTagCSVV2+bTagDeepCSV+bTagDeepJet+_pfParticleNetAK4JetTagsAll | ||||
| ) | ||||
| bTagDiscriminatorsForAK4 = bTagDiscriminatorsForAK4.foo.value() | ||||
|
|
||||
| from RecoBTag.ONNXRuntime.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll | ||||
| from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll | ||||
|
|
@@ -165,7 +170,6 @@ | |||
| ) | ||||
| BTAGVARS = cms.PSet( | ||||
| btagDeepB = Var("?(pt>=15)&&((bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'))>=0)?bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'):-1",float,doc="DeepCSV b+bb tag discriminator",precision=10), | ||||
| btagCSVV2 = Var("?(pt>=15)?bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags'):-1",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10), | ||||
| btagDeepCvL = Var("?(pt>=15)&&(bDiscriminator('pfDeepCSVJetTags:probc')>=0)?bDiscriminator('pfDeepCSVJetTags:probc')/(bDiscriminator('pfDeepCSVJetTags:probc')+bDiscriminator('pfDeepCSVJetTags:probudsg')):-1", float,doc="DeepCSV c vs udsg discriminator",precision=10), | ||||
| btagDeepCvB = Var("?(pt>=15)&&bDiscriminator('pfDeepCSVJetTags:probc')>=0?bDiscriminator('pfDeepCSVJetTags:probc')/(bDiscriminator('pfDeepCSVJetTags:probc')+bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')):-1",float,doc="DeepCSV c vs b+bb discriminator",precision=10), | ||||
| ) | ||||
|
|
@@ -364,7 +368,6 @@ def AddBTaggingScores(proc, jetTableName=""): | |||
| """ | ||||
|
|
||||
| getattr(proc, jetTableName).variables.btagDeepB = BTAGVARS.btagDeepB | ||||
| getattr(proc, jetTableName).variables.btagCSVV2 = BTAGVARS.btagCSVV2 | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't these be put back in for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will check a run2 wf and add it back in case.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the Edit: sorry, spoke too fast, that isn't sufficient. Yes, I suppose it has to go in this function, as well as below as well (L686 and 859)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @swertz I'm looking into this, but aren't these already added back in:
? Those contain exactly: So
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, but in some cases a new table is created instead of reusing the default NanoAOD ones, e.g. in
Haven't checked when that is done in practice, perhaps @nurfikri89 can chime in...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok got it, thanks! But I agree it should be there just in case: so I will add this customization in the function!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addessed in 3a70499
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added in the tests also the |
||||
| getattr(proc, jetTableName).variables.btagDeepCvL = BTAGVARS.btagDeepCvL | ||||
| getattr(proc, jetTableName).variables.btagDeepCvB = BTAGVARS.btagDeepCvB | ||||
| getattr(proc, jetTableName).variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB | ||||
|
|
@@ -680,8 +683,7 @@ def ReclusterAK4PuppiJets(proc, recoJA, runOnMC): | |||
| # | ||||
| # Save standard b-tagging and c-tagging variables | ||||
| # | ||||
| proc.jetPuppiTable.variables.btagDeepB = BTAGVARS.btagDeepB | ||||
| proc.jetPuppiTable.variables.btagCSVV2 = BTAGVARS.btagCSVV2 | ||||
| proc.jetPuppiTable.variables.btagDeepB = BTAGVARS.btagDeepB | ||||
| proc.jetPuppiTable.variables.btagDeepCvL = BTAGVARS.btagDeepCvL | ||||
| proc.jetPuppiTable.variables.btagDeepCvB = BTAGVARS.btagDeepCvB | ||||
| # | ||||
|
|
@@ -856,7 +858,6 @@ def ReclusterAK4CHSJets(proc, recoJA, runOnMC): | |||
| # Save standard b-tagging and c-tagging variables | ||||
| # | ||||
| proc.jetTable.variables.btagDeepB = BTAGVARS.btagDeepB | ||||
| proc.jetTable.variables.btagCSVV2 = BTAGVARS.btagCSVV2 | ||||
| proc.jetTable.variables.btagDeepCvL = BTAGVARS.btagDeepCvL | ||||
| proc.jetTable.variables.btagDeepCvB = BTAGVARS.btagDeepCvB | ||||
| # | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.