From 7a81e2ca3472ad9c33ffc4608a301092a65ac2d7 Mon Sep 17 00:00:00 2001 From: Michal Bluj Date: Tue, 4 Aug 2020 15:20:06 +0200 Subject: [PATCH 1/2] Rerun anti-e-in-deadECal tauID for run2_miniAOD_UL era and remove it from tauID list (both for taus in miniAOD) --- .../PatAlgos/python/slimming/miniAOD_tools.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index c2476be41d41e..ae7a36bb32e5e 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -375,6 +375,28 @@ def miniAOD_customizeCommon(process): process.rerunDiscriminationByIsolationMVADBnewDMwLTPhase2.PATTauProducer=_noUpdatedTauName task.add(process.rerunIsolationMVADBnewDMwLTPhase2Task) + #-- Rerun tauID against dead ECal towers to taus for the run2_miniAOD_UL era + # to enable default behoviour with leading track extrapolation to ECAL + _makePatTausTaskWithDeadECalVeto = process.makePatTausTask.copy() + _makePatTausTaskWithDeadECalVeto.add( + process.hpsPFTauDiscriminationByDeadECALElectronRejection + ) + run2_miniAOD_UL.toReplaceWith( + process.makePatTausTask, _makePatTausTaskWithDeadECalVeto + ) + #... and remove this tauID for other eras from list of sources to preserve + # an original setup + _withoutDeadEcalTauIDPs = process.patTaus.tauIDSources.clone() + del _withoutDeadEcalTauIDPs.againstElectronDeadECAL + (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( + process.patTaus, tauIDSources = _withoutDeadEcalTauIDPs + ) + _withoutDeadEcalTauIDBoostedPs = process.patTausBoosted.tauIDSources.clone() + del _withoutDeadEcalTauIDBoostedPs.againstElectronDeadECAL + (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( + process.patTausBoosted, tauIDSources = _withoutDeadEcalTauIDBoostedPs + ) + #-- Adding customization for 80X 2016 legacy reMiniAOD and 2018 heavy ions _makePatTausTaskWithTauReReco = process.makePatTausTask.copy() _makePatTausTaskWithTauReReco.add(process.PFTauTask) From 16c5230a1517713d5b1410e8e9a4d5a696eb9d71 Mon Sep 17 00:00:00 2001 From: Michal Bluj Date: Fri, 7 Aug 2020 21:39:23 +0200 Subject: [PATCH 2/2] Rerun the anti-electron-in-deadECal tauID with any re-MiniAOD modifer --- .../PatAlgos/python/slimming/miniAOD_tools.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index ae7a36bb32e5e..8571d42bfc8c4 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -375,27 +375,16 @@ def miniAOD_customizeCommon(process): process.rerunDiscriminationByIsolationMVADBnewDMwLTPhase2.PATTauProducer=_noUpdatedTauName task.add(process.rerunIsolationMVADBnewDMwLTPhase2Task) - #-- Rerun tauID against dead ECal towers to taus for the run2_miniAOD_UL era + #-- Rerun tauID against dead ECal towers to taus for the various re-MiniAOD eras # to enable default behoviour with leading track extrapolation to ECAL _makePatTausTaskWithDeadECalVeto = process.makePatTausTask.copy() _makePatTausTaskWithDeadECalVeto.add( process.hpsPFTauDiscriminationByDeadECALElectronRejection ) - run2_miniAOD_UL.toReplaceWith( + _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL) + _run2_miniAOD_ANY.toReplaceWith( process.makePatTausTask, _makePatTausTaskWithDeadECalVeto ) - #... and remove this tauID for other eras from list of sources to preserve - # an original setup - _withoutDeadEcalTauIDPs = process.patTaus.tauIDSources.clone() - del _withoutDeadEcalTauIDPs.againstElectronDeadECAL - (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( - process.patTaus, tauIDSources = _withoutDeadEcalTauIDPs - ) - _withoutDeadEcalTauIDBoostedPs = process.patTausBoosted.tauIDSources.clone() - del _withoutDeadEcalTauIDBoostedPs.againstElectronDeadECAL - (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify( - process.patTausBoosted, tauIDSources = _withoutDeadEcalTauIDBoostedPs - ) #-- Adding customization for 80X 2016 legacy reMiniAOD and 2018 heavy ions _makePatTausTaskWithTauReReco = process.makePatTausTask.copy() @@ -410,7 +399,6 @@ def miniAOD_customizeCommon(process): from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 _rerun_puppijets_task = task.copy() _rerun_puppijets_task.add(process.puppi, process.ak4PFJetsPuppi) - _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL) (_run2_miniAOD_ANY | pA_2016 | pp_on_AA_2018).toReplaceWith(task, _rerun_puppijets_task) from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX