From 7a81e2ca3472ad9c33ffc4608a301092a65ac2d7 Mon Sep 17 00:00:00 2001 From: Michal Bluj Date: Tue, 4 Aug 2020 15:20:06 +0200 Subject: [PATCH] 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)