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
Clean up tau related nanoAOD content #33513
Merged
cmsbuild
merged 8 commits into
cms-sw:master
from
cms-tau-pog:CMSSW_11_3_X_tau-pog_nanoAODcleanUp
May 7, 2021
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
52bbb7e
clean up tau nanoAOD content
14218f2
fix era modification
c4735ec
avoid parameter collisions in temporary PSets
9516b7b
restore MVA2017v2 for 94XMiniAODv1 and further clean up
1985468
clean up DQM
30cec2e
restore tau DQM for previous eras
8db6c0b
fix syntax of removal of idDecayModeOldDMs in DQM
9aef44e
import missing era modifiers to DQM config
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,13 @@ | |
|
||
finalTaus = cms.EDFilter("PATTauRefSelector", | ||
src = cms.InputTag("slimmedTausUpdated"), | ||
cut = cms.string("pt > 18 && tauID('decayModeFindingNewDMs') && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || tauID('byVLooseIsolationMVArun2v1DBoldDMwLT2015') || tauID('byVLooseIsolationMVArun2v1DBnewDMwLT') || tauID('byVLooseIsolationMVArun2v1DBdR03oldDMwLT') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBnewDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2') || tauID('byVVVLooseDeepTau2017v2p1VSjet'))") | ||
cut = cms.string("pt > 18 && tauID('decayModeFindingNewDMs') && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || (tauID('chargedIsoPtSumdR03')+max(0.,tauID('neutralIsoPtSumdR03')-0.072*tauID('puCorrPtSum'))<2.5) || tauID('byVVVLooseDeepTau2017v2p1VSjet'))") | ||
) | ||
|
||
for era in [run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1, run2_nanoAOD_106Xv1]: | ||
era.toModify(finalTaus, | ||
cut = cms.string("pt > 18 && tauID('decayModeFindingNewDMs') && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || tauID('byVLooseIsolationMVArun2v1DBoldDMwLT2015') || tauID('byVLooseIsolationMVArun2v1DBnewDMwLT') || tauID('byVLooseIsolationMVArun2v1DBdR03oldDMwLT') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBnewDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2') || tauID('byVVVLooseDeepTau2017v2p1VSjet'))") | ||
) | ||
for era in [run2_nanoAOD_94XMiniAODv1,]: | ||
era.toModify(finalTaus, | ||
cut = cms.string("pt > 18 && tauID('decayModeFindingNewDMs') && (tauID('byLooseCombinedIsolationDeltaBetaCorr3Hits') || tauID('byVLooseIsolationMVArun2v1DBoldDMwLT') || tauID('byVLooseIsolationMVArun2v1DBnewDMwLT') || tauID('byVLooseIsolationMVArun2v1DBdR03oldDMwLT') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT2017v1') || tauID('byVVLooseIsolationMVArun2v1DBoldDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBnewDMwLT2017v2') || tauID('byVVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2') || tauID('byVVVLooseDeepTau2017v2p1VSjet'))") | ||
|
@@ -56,8 +60,7 @@ def _tauId8WPMask(pattern,doc): | |
charge = Var("charge", int, doc="electric charge"), | ||
jetIdx = Var("?hasUserCand('jet')?userCand('jet').key():-1", int, doc="index of the associated jet (-1 if none)"), | ||
decayMode = Var("decayMode()",int), | ||
idDecayMode = Var("tauID('decayModeFinding')", bool), | ||
idDecayModeNewDMs = Var("tauID('decayModeFindingNewDMs')", bool), | ||
idDecayModeOldDMs = Var("tauID('decayModeFinding')", bool), | ||
|
||
leadTkPtOverTauPt = Var("leadChargedHadrCand.pt/pt ",float, doc="pt of the leading track divided by tau pt",precision=10), | ||
leadTkDeltaEta = Var("leadChargedHadrCand.eta - eta ",float, doc="eta of the leading track, minus tau eta",precision=8), | ||
|
@@ -130,10 +133,6 @@ def _tauId8WPMask(pattern,doc): | |
|
||
_variablesMiniV2 = cms.PSet( | ||
_tauVarsBase, | ||
_mvaAntiEVars, | ||
_mvaIsoVars2015Reduced, | ||
_mvaIsoVars2017v1, | ||
_mvaIsoVars2017v2, | ||
_deepTauVars2017v2p1 | ||
) | ||
_variablesMiniV1 = _variablesMiniV2.clone() | ||
|
@@ -149,6 +148,9 @@ def _tauId8WPMask(pattern,doc): | |
|
||
tauTable.variables = _variablesMiniV2 | ||
|
||
(run2_nanoAOD_92X | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_94X2016 | run2_nanoAOD_102Xv1 | run2_nanoAOD_106Xv1).toModify(tauTable, | ||
variables = cms.PSet(tauTable.variables, _mvaAntiEVars, _mvaIsoVars2015Reduced, _mvaIsoVars2017v1, _mvaIsoVars2017v2) | ||
) | ||
for era in [run2_nanoAOD_94XMiniAODv1,]: | ||
era.toModify(tauTable, | ||
variables = _variablesMiniV1 | ||
|
@@ -167,6 +169,13 @@ def _tauId8WPMask(pattern,doc): | |
idAntiEle = _tauId5WPMask("againstElectron%sMVA6", doc= "Anti-electron MVA discriminator V6 (2015)") | ||
) | ||
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. These lines replace the PSet _mvaAntiEVars in all cases it is used. Therefore I suggest to remove _mvaAntiEVars above and only keep this modifier. |
||
|
||
for era in [run2_miniAOD_80XLegacy, run2_nanoAOD_92X, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, \ | ||
run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1, run2_nanoAOD_106Xv1]: | ||
era.toModify(tauTable.variables, | ||
idDecayMode = Var("tauID('decayModeFinding')", bool), | ||
idDecayModeNewDMs = Var("tauID('decayModeFindingNewDMs')", bool), | ||
idDecayModeOldDMs = None | ||
) | ||
run2_miniAOD_80XLegacy.toModify(tauTable.variables, | ||
idAntiEleDeadECal = None) | ||
for era in [run2_nanoAOD_92X, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, \ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these selection (i.e. EOY16, EOY17part2 vs EOY17part1) differs for the following:
tauID('byVLooseIsolationMVArun2v1DBoldDMwLT') --> byVLooseIsolationMVArun2v1DBoldDMwLT2015
byVVLooseIsolationMVArun2v1DBoldDMwLT -->
byVVLooseIsolationMVArun2v1DBoldDMwLT2017v1
this appears also later for the cleanup of the
is this expected ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is expected in the sense that it was like this before the clean up and I did not intend to change anything about earlier eras. But I can't tell you the reason why this was treated this way. I would have to ask back to TauPOG.