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

Remove DeepTauID v2.1 from mini- and nanoAOD #46063

Merged
merged 1 commit into from
Sep 21, 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
6 changes: 0 additions & 6 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,6 @@
Plot1D('idAntiMu', 'idAntiMu', 11, -0.5, 10.5, 'Anti-muon discriminator V3: : int 1 = Loose, 2 = Tight'),
Plot1D('idDecayModeOldDMs', 'idDecayModeOldDMs', 2, -0.5, 1.5, "tauID('decayModeFinding')"),
Plot1D('idDecayModeNewDMs', 'idDecayModeNewDMs', 2, -0.5, 1.5, "tauID('decayModeFindingNewDMs')"),
Plot1D('idDeepTau2017v2p1VSe', 'idDeepTau2017v2p1VSe', 11, -0.5, 10.5, 'byDeepTau2017v2p1VSe ID working points (deepTau2017v2p1): int 1 = VVVLoose, 2 = VVLoose, 3 = VLoose, 4 = Loose, 5 = Medium, 6 = Tight, 7 = VTight, 8 = VVTight'),
Plot1D('idDeepTau2017v2p1VSjet', 'idDeepTau2017v2p1VSjet', 11, -0.5, 10.5, 'byDeepTau2017v2p1VSjet ID working points (deepTau2017v2p1): int 1 = VVVLoose, 2 = VVLoose, 3 = VLoose, 4 = Loose, 5 = Medium, 6 = Tight, 7 = VTight, 8 = VVTight'),
Plot1D('idDeepTau2017v2p1VSmu', 'idDeepTau2017v2p1VSmu', 11, -0.5, 10.5, 'byDeepTau2017v2p1VSmu ID working points (deepTau2017v2p1): int 1 = VLoose, 2 = Loose, 3 = Medium, 4 = Tight'),
Plot1D('idDeepTau2018v2p5VSe', 'idDeepTau2018v2p5VSe', 11, -0.5, 10.5, 'byDeepTau2018v2p5VSe ID working points (deepTau2018v2p5): int 1 = VVVLoose, 2 = VVLoose, 3 = VLoose, 4 = Loose, 5 = Medium, 6 = Tight, 7 = VTight, 8 = VVTight'),
Plot1D('idDeepTau2018v2p5VSjet', 'idDeepTau2018v2p5VSjet', 11, -0.5, 10.5, 'byDeepTau2018v2p5VSjet ID working points (deepTau2018v2p5): int 1 = VVVLoose, 2 = VVLoose, 3 = VLoose, 4 = Loose, 5 = Medium, 6 = Tight, 7 = VTight, 8 = VVTight'),
Plot1D('idDeepTau2018v2p5VSmu', 'idDeepTau2018v2p5VSmu', 11, -0.5, 10.5, 'byDeepTau2018v2p5VSmu ID working points (deepTau2018v2p5): int 1 = VLoose, 2 = Loose, 3 = Medium, 4 = Tight'),
Expand All @@ -857,9 +854,6 @@
Plot1D('photonsOutsideSignalCone', 'photonsOutsideSignalCone', 20, 0, 30, 'sum of photons outside signal cone'),
Plot1D('pt', 'pt', 20, 0, 200, 'pt'),
Plot1D('puCorr', 'puCorr', 20, 0, 90, 'pileup correction'),
Plot1D('rawDeepTau2017v2p1VSe', 'rawDeepTau2017v2p1VSe', 20, 0, 1, 'byDeepTau2017v2p1VSe raw output discriminator (deepTau2017v2p1)'),
Plot1D('rawDeepTau2017v2p1VSjet', 'rawDeepTau2017v2p1VSjet', 20, 0, 1, 'byDeepTau2017v2p1VSjet raw output discriminator (deepTau2017v2p1)'),
Plot1D('rawDeepTau2017v2p1VSmu', 'rawDeepTau2017v2p1VSmu', 20, 0, 1, 'byDeepTau2017v2p1VSmu raw output discriminator (deepTau2017v2p1)'),
Plot1D('rawDeepTau2018v2p5VSe', 'rawDeepTau2018v2p5VSe', 20, 0, 1, 'byDeepTau2018v2p5VSe raw output discriminator (deepTau2018v2p5)'),
Plot1D('rawDeepTau2018v2p5VSjet', 'rawDeepTau2018v2p5VSjet', 20, 0, 1, 'byDeepTau2018v2p5VSjet raw output discriminator (deepTau2018v2p5)'),
Plot1D('rawDeepTau2018v2p5VSmu', 'rawDeepTau2018v2p5VSmu', 20, 0, 1, 'byDeepTau2018v2p5VSmu raw output discriminator (deepTau2018v2p5)'),
Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
nanoSequenceMC = nanoSequenceFS.copy()
nanoSequenceMC.insert(nanoSequenceFS.index(nanoSequenceCommon)+1,nanoSequenceOnlyFullSim)

# modifier which adds new tauIDs (currently only deepTauId2017v2p1 is being added)
# modifier which adds new tauIDs
import RecoTauTag.RecoTau.tools.runTauIdMVA as tauIdConfig
def nanoAOD_addTauIds(process, idsToRun=[]):
if idsToRun: #no-empty list of tauIDs to run
Expand Down
19 changes: 2 additions & 17 deletions PhysicsTools/NanoAOD/python/taus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

finalTaus = cms.EDFilter("PATTauRefSelector",
src = cms.InputTag("slimmedTaus"),
cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2017v2p1VSjet') || tauID('byVVVLooseDeepTau2018v2p5VSjet'))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(0.05, 0.05))
cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2018v2p5VSjet'))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(0.05, 0.05))
)

run3_nanoAOD_124.toModify(
finalTaus,
cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2017v2p1VSjet') || (tauID('byDeepTau2018v2p5VSjetraw') > {}))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(WORKING_POINTS_v2p5["jet"]["VVVLoose"], 0.05, 0.05))
cut = cms.string("pt > 18 && ((tauID('decayModeFindingNewDMs') > 0.5 && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || (tauID('byDeepTau2018v2p5VSjetraw') > {}))) || (?isTauIDAvailable('byUTagCHSVSjetraw')?tauID('byUTagCHSVSjetraw'):-1) > {} || (?isTauIDAvailable('byUTagPUPPIVSjetraw')?tauID('byUTagPUPPIVSjetraw'):-1) > {})".format(WORKING_POINTS_v2p5["jet"]["VVVLoose"], 0.05, 0.05))
)

##################### Tables for final output and docs ##########################
Expand Down Expand Up @@ -85,20 +85,6 @@ def _tauIdWPMask(pattern, choices, doc="", from_raw=False, wp_thrs=None):

)

_deepTauVars2017v2p1 = cms.PSet(
rawDeepTau2017v2p1VSe = Var("?isTauIDAvailable('byDeepTau2017v2p1VSeraw')?tauID('byDeepTau2017v2p1VSeraw'):-1", float, doc="byDeepTau2017v2p1VSe raw output discriminator (deepTau2017v2p1)", precision=10),
rawDeepTau2017v2p1VSmu = Var("?isTauIDAvailable('byDeepTau2017v2p1VSmuraw')?tauID('byDeepTau2017v2p1VSmuraw'):-1", float, doc="byDeepTau2017v2p1VSmu raw output discriminator (deepTau2017v2p1)", precision=10),
rawDeepTau2017v2p1VSjet = Var("?isTauIDAvailable('byDeepTau2017v2p1VSjetraw')?tauID('byDeepTau2017v2p1VSjetraw'):-1", float, doc="byDeepTau2017v2p1VSjet raw output discriminator (deepTau2017v2p1)", precision=10),
idDeepTau2017v2p1VSe = _tauIdWPMask("by%sDeepTau2017v2p1VSe",
choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
doc="byDeepTau2017v2p1VSe ID working points (deepTau2017v2p1)"),
idDeepTau2017v2p1VSmu = _tauIdWPMask("by%sDeepTau2017v2p1VSmu",
choices=("VLoose", "Loose", "Medium", "Tight"),
doc="byDeepTau2017v2p1VSmu ID working points (deepTau2017v2p1)"),
idDeepTau2017v2p1VSjet = _tauIdWPMask("by%sDeepTau2017v2p1VSjet",
choices=("VVVLoose","VVLoose","VLoose","Loose","Medium","Tight","VTight","VVTight"),
doc="byDeepTau2017v2p1VSjet ID working points (deepTau2017v2p1)"),
)
_deepTauVars2018v2p5 = cms.PSet(
rawDeepTau2018v2p5VSe = Var("?isTauIDAvailable('byDeepTau2018v2p5VSeraw')?tauID('byDeepTau2018v2p5VSeraw'):-1", float, doc="byDeepTau2018v2p5VSe raw output discriminator (deepTau2018v2p5)", precision=10),
rawDeepTau2018v2p5VSmu = Var("?isTauIDAvailable('byDeepTau2018v2p5VSmuraw')?tauID('byDeepTau2018v2p5VSmuraw'):-1", float, doc="byDeepTau2018v2p5VSmu raw output discriminator (deepTau2018v2p5)", precision=10),
Expand Down Expand Up @@ -144,7 +130,6 @@ def _tauIdWPMask(pattern, choices, doc="", from_raw=False, wp_thrs=None):

_variablesMiniV2 = cms.PSet(
_tauVarsBase,
_deepTauVars2017v2p1,
_deepTauVars2018v2p5,
_UTagCHS,
_UTagPUPPI
Expand Down
5 changes: 2 additions & 3 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,16 +324,15 @@ def _add_deepFlavour(process):
process.makePatTausTask, _makePatTausTaskWithRetrainedMVATauID
)
#-- Adding DeepTauID
# deepTau v2p1 and v2p5
_updatedTauName = 'slimmedTausDeepIDsv2p1'
_updatedTauName = 'slimmedTausDeepIDs'
_noUpdatedTauName = 'slimmedTausNoDeepIDs'
import RecoTauTag.RecoTau.tools.runTauIdMVA as tauIdConfig
tauIdEmbedder = tauIdConfig.TauIDEmbedder(
process, debug = False,
originalTauName = _noUpdatedTauName,
updatedTauName = _updatedTauName,
postfix = 'ForMini',
toKeep = ['deepTau2017v2p1','deepTau2018v2p5']
toKeep = ['deepTau2018v2p5']
)
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common #Phase2 Tau MVA
_tauIds_phase2 = ['deepTau2026v2p5']
Expand Down