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

Modify tau sequences to not pull payloads from outside GT (14_0_X) #44715

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
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
15 changes: 3 additions & 12 deletions PhysicsTools/NanoAOD/python/boostedTaus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
run2_nanoAOD_106Xv2.toModify(
finalBoostedTaus,
cut = "pt > 40 && tauID('decayModeFindingNewDMs') && (tauID('byVVLooseIsolationMVArun2017v2DBoldDMwLT2017') || tauID('byVVLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017') || tauID('byVVLooseIsolationMVArun2017v2DBnewDMwLT2017'))"
cut = "pt > 40 && tauID('decayModeFindingNewDMs') && (tauID('byVVLooseIsolationMVArun2DBoldDMwLT') || tauID('byVVLooseIsolationMVArun2DBoldDMdR0p3wLT') || tauID('byVVLooseIsolationMVArun2DBnewDMwLT'))"
)

boostedTauTable = simpleCandidateFlatTableProducer.clone(
Expand Down Expand Up @@ -49,8 +49,8 @@
)
#MVA 2017 v2 dR<0.3 variables
_boostedTauVarsMVAIsoDr03 = cms.PSet(
rawMVAoldDMdR032017v2 = Var("tauID('byIsolationMVArun2017v2DBoldDMdR0p3wLTraw2017')",float,doc='byIsolationMVArun2DBoldDMdR0p3wLT raw output discriminator (2017v2)'),
idMVAoldDMdR032017v2 = _tauIdWPMask("by%sIsolationMVArun2017v2DBoldDMdR0p3wLT2017",choices=("VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),doc="IsolationMVArun2DBoldDMdR0p3wLT ID working point (2017v2)")
rawMVAoldDMdR032017v2 = Var("tauID('byIsolationMVArun2DBoldDMdR0p3wLTraw')",float,doc='byIsolationMVArun2DBoldDMdR0p3wLT raw output discriminator (2017v2)'),
idMVAoldDMdR032017v2 = _tauIdWPMask("by%sIsolationMVArun2DBoldDMdR0p3wLT",choices=("VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),doc="IsolationMVArun2DBoldDMdR0p3wLT ID working point (2017v2)")
)
#AntiEle MVA 2018 variables
_boostedTauVarsAntiEleMVA = cms.PSet(
Expand All @@ -73,15 +73,6 @@
run2_nanoAOD_106Xv2.toModify(
boostedTauTable,
variables = _boostedTauVarsWithDr03
).toModify(
boostedTauTable.variables,
rawMVAoldDM2017v2 = Var("tauID('byIsolationMVArun2017v2DBoldDMwLTraw2017')",float, doc="byIsolationMVArun2DBoldDMwLT raw output discriminator (2017v2)",precision=10),
rawMVAnewDM2017v2 = Var("tauID('byIsolationMVArun2017v2DBnewDMwLTraw2017')",float,doc='byIsolationMVArun2DBnewDMwLT raw output discriminator (2017v2)',precision=10),
idMVAnewDM2017v2 = _tauIdWPMask("by%sIsolationMVArun2017v2DBnewDMwLT2017", choices=("VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),doc="IsolationMVArun2DBnewDMwLT ID working point (2017v2)"),
idMVAoldDM2017v2 = _tauIdWPMask("by%sIsolationMVArun2017v2DBoldDMwLT2017",choices=("VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),doc="IsolationMVArun2DBoldDMwLT ID working point (2017v2)"),
rawAntiEle2018 = Var("tauID('againstElectronMVA6Raw2018')", float, doc= "Anti-electron MVA discriminator V6 raw output discriminator (2018)", precision=10),
rawAntiEleCat2018 = Var("tauID('againstElectronMVA6category2018')", "int16", doc="Anti-electron MVA discriminator V6 category (2018)"),
idAntiEle2018 = _tauIdWPMask("againstElectron%sMVA62018", choices=("VLoose","Loose","Medium","Tight","VTight"), doc= "Anti-electron MVA discriminator V6 (2018)")
)

boostedTausMCMatchLepTauForTable = tausMCMatchLepTauForTable.clone(
Expand Down
4 changes: 2 additions & 2 deletions PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def nanoAOD_addTauIds(process, idsToRun=[]):
process.finalTaus.src = updatedTauName
#remember to adjust the selection and tables with added IDs

process.tauTask.add( process.rerunMvaIsolationTaskForNano , process.patTauMVAIDsTask )
process.tauTask.add( process.rerunMvaIsolationTaskForNano, getattr(process, updatedTauName) )

return process

Expand Down Expand Up @@ -260,7 +260,7 @@ def nanoAOD_customizeCommon(process):
idsToAdd = cms.vstring()
)
run2_nanoAOD_106Xv2.toModify(
nanoAOD_boostedTau_switch, idsToAdd = ["2017v2", "dR0p32017v2", "newDM2017v2","againstEle2018"]
nanoAOD_boostedTau_switch, idsToAdd = ["mvaIso", "mvaIsoNewDM", "mvaIsoDR0p3", "againstEle"]
).toModify(
process, lambda p : nanoAOD_addBoostedTauIds(p, nanoAOD_boostedTau_switch.idsToAdd.value())
)
Expand Down
4 changes: 0 additions & 4 deletions PhysicsTools/NanoAOD/python/taus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

from PhysicsTools.PatAlgos.patTauSignalCandidatesProducer_cfi import patTauSignalCandidatesProducer

##################### Updated tau collection with MVA-based tau-Ids rerun #######
# Used only in some eras
from PhysicsTools.NanoAOD.taus_updatedMVAIds_cff import *

##################### User floats producers, selectors ##########################

# Original DeepTau v2p5 in 12_4_X doesn't include WPs in MINIAOD
Expand Down
303 changes: 0 additions & 303 deletions PhysicsTools/NanoAOD/python/taus_updatedMVAIds_cff.py

This file was deleted.

Loading