From cb47dd09ea7f4ca980ab2292d13406d5563d3974 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 24 Aug 2022 19:45:30 -0500 Subject: [PATCH] protection for DeepDoubleX in jetTools --- PhysicsTools/PatAlgos/python/tools/jetTools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PhysicsTools/PatAlgos/python/tools/jetTools.py b/PhysicsTools/PatAlgos/python/tools/jetTools.py index 045cd03b4cece..c217ce6eb9b3c 100644 --- a/PhysicsTools/PatAlgos/python/tools/jetTools.py +++ b/PhysicsTools/PatAlgos/python/tools/jetTools.py @@ -646,6 +646,9 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou process, task) if btagInfo == 'pfDeepDoubleXTagInfos': + # can only run on PAT jets, so the updater needs to be used + if 'updated' not in jetSource.value().lower(): + raise ValueError("Invalid jet collection: %s. pfDeepDoubleXTagInfos only supports running via updateJetCollection." % jetSource.value()) addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix, btag.pfDeepDoubleXTagInfos.clone( jets = jetSource,