Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions PhysicsTools/NanoAOD/python/custom_jme_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@
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),
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to:
from Configuration.Eras.Modifier_run3_common_cff import run3_common
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have had indeed, sorry about that. What I did now was to use the modifiers that are already imported, in this case the logic changes such that the standard case is to not read CSVV2, and only for the earlier era it is added.

run3_common.toModify(
BTAGVARS, btagCSVV2 = None
)

DEEPJETVARS = cms.PSet(
btagDeepFlavB = Var("?(pt>=15)?bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb'):-1",float,doc="DeepJet b+bb+lepb tag discriminator",precision=10),
btagDeepFlavC = Var("?(pt>=15)?bDiscriminator('pfDeepFlavourJetTags:probc'):-1",float,doc="DeepFlavour charm tag raw score",precision=10),
Expand Down
4 changes: 4 additions & 0 deletions PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
jetTable.variables.puId, doc="Pileup ID flags with 106X (2017) training"
)

run3_common.toModify(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about importing run3_common

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, has been updated to solve the issue with the era modifiers that are already imported.

jetTable.variables, btagCSVV2 = None
)

bjetNN = cms.EDProducer("BJetEnergyRegressionMVA",
backend = cms.string("ONNX"),
batch_eval = cms.bool(True),
Expand Down
1 change: 0 additions & 1 deletion PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
nSVs = Var("?hasOverlaps('vertices')?overlaps('vertices').size():0", int, doc="number of secondary vertices in the jet"),
btagDeepB = Var("?(bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'))>=0?bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'):-1",float,doc="DeepCSV b+bb tag discriminator",precision=10),
btagDeepFlavB = Var("bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb')",float,doc="DeepJet b+bb+lepb tag discriminator",precision=10),
btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why in PhysicsTools/NanoAOD/python/jetsAK4_Puppi_cff.py you are deleting this while in PhysicsTools/NanoAOD/python/jetsAK4_CHS_cff.py you are using the modifier?
I think the era modifier approach should be used, otherwise here you are removing btagCSVV2 also for Run1, Run2...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I had in mind here was the fact that the PUPPI table is newly added for Run3, but I have now followed the same approach as for CHS.

btagDeepCvL = Var("?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("?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),
btagDeepFlavCvL = Var("?(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg'))>0?bDiscriminator('pfDeepFlavourJetTags:probc')/(bDiscriminator('pfDeepFlavourJetTags:probc')+bDiscriminator('pfDeepFlavourJetTags:probuds')+bDiscriminator('pfDeepFlavourJetTags:probg')):-1",float,doc="DeepJet c vs uds+g discriminator",precision=10),
Expand Down
8 changes: 8 additions & 0 deletions PhysicsTools/NanoAOD/python/jetsAK8_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
)
)

run3_common.toModify(
fatJetTable.variables, btagCSVV2 = None
)

##############################################################
## DeepInfoAK8:Start
## - To be used in nanoAOD_customizeCommon() in nano_cff.py
Expand Down Expand Up @@ -225,6 +229,10 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl
)
)

run3_common.toModify(
subJetTable.variables, btagCSVV2 = None
)

#jets are not as precise as muons
fatJetTable.variables.pt.precision=10
subJetTable.variables.pt.precision=10
Expand Down
16 changes: 8 additions & 8 deletions RecoBTag/SoftLepton/python/SoftLeptonByMVAComputers_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
useAdaBoost = cms.bool(True)
)

from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify(softPFElectronCommon,
useCondDB = cms.bool(False),
)
run3_common.toModify(softPFMuonCommon,
useCondDB = cms.bool(False),
)

softPFElectronComputer = cms.ESProducer("ElectronTaggerESProducer",
softPFElectronCommon,
ipSign = cms.string("any"),
Expand Down Expand Up @@ -45,11 +53,3 @@
softPFMuonCommon,
ipSign = cms.string("positive")
)

from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify(softPFElectronComputer,
useCondDB = cms.bool(False),
)
run3_common.toModify(softPFMuonComputer,
useCondDB = cms.bool(False),
)