diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py index 4805bb6c5b579b5fc4cbbe5cc8a8061645d80de3..4a41cc054a33c2c1debaf60836bb8388d68a10c9 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py @@ -149,20 +149,37 @@ def PrepareStandAloneBTagCfg(inputFlags): return result -def BTagRecoCfg(inputFlags, JetCollection = ['AntiKt4EMTopo'], **kwargs): +def BTagRecoSplitCfg(inputFlags, JetCollection = ['AntiKt4EMTopo'], **kwargs): + + result=ComponentAccumulator() + + taggerList = inputFlags.BTagging.run2TaggersList + result.merge(JetTagCalibCfg(inputFlags, TaggerList = taggerList, **kwargs)) + + secVertexingAndAssociators = {'JetFitter':'BTagTrackToJetAssociator','SV1':'BTagTrackToJetAssociator'} + result.merge(JetBTaggerSplitAlgsCfg(inputFlags, JetCollection = JetCollection[0], TaggerList = taggerList, SecVertexingAndAssociators = secVertexingAndAssociators, **kwargs)) - result=None from AthenaCommon.ConcurrencyFlags import jobproperties - if jobproperties.ConcurrencyFlags.NumThreads() >= 1 : - result=ComponentAccumulator() - else: - result=ComponentAccumulator( "TopAlg" ) + if jobproperties.ConcurrencyFlags.NumThreads() == 0 : + for el in result._allSequences: + el.name = "TopAlg" + + return result + +def BTagRecoCfg(inputFlags, JetCollection = ['AntiKt4EMTopo'], **kwargs): + + result=ComponentAccumulator() taggerList = inputFlags.BTagging.run2TaggersList result.merge(JetTagCalibCfg(inputFlags, TaggerList = taggerList, **kwargs)) result.merge(JetBTaggerAlgCfg(inputFlags, JetCollection = JetCollection[0], PrimaryVertexCollectionName="PrimaryVertices", TaggerList = taggerList, **kwargs)) + from AthenaCommon.ConcurrencyFlags import jobproperties + if jobproperties.ConcurrencyFlags.NumThreads() >= 0 : + for el in result._allSequences: + el.name = "TopAlg" + return result def BTagCfg(inputFlags, JetCollection = [], **kwargs): @@ -242,6 +259,13 @@ def JetBTaggerSplitAlgsCfg(inputFlags, JetCollection="", TaggerList=[], SecVerte 'BTagging/201903/dl1r/antikt4empflow/network.json', 'BTagging/201903/dl1/antikt4empflow/network.json', #'BTagging/201903/dl1rmu/antikt4empflow/network.json', + ], + 'AntiKt4EMTopo': [ + #'BTagging/201903/smt/antikt4empflow/network.json', + 'BTagging/201903/rnnip/antikt4empflow/network.json', + 'BTagging/201903/dl1r/antikt4empflow/network.json', + 'BTagging/201903/dl1/antikt4empflow/network.json', + #'BTagging/201903/dl1rmu/antikt4empflow/network.json', ] } @@ -284,6 +308,7 @@ def JetBTaggerSplitAlgsCfg(inputFlags, JetCollection="", TaggerList=[], SecVerte if ts == "": result.merge(RunHighLevelTaggersCfg(inputFlags, jet, 'BTagTrackToJetAssociator', postTagDL2JetToTrainingMap[jet], ts)) + return result def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps, TimeStamp): diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggerAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggerAlgConfig.py index 80ed01efa833478184b1fb28248de3608b06958d..c83f80f922493dcec826355f3b098541f673fa57 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggerAlgConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggerAlgConfig.py @@ -11,13 +11,7 @@ JetBTaggerAlg=CompFactory.Analysis.JetBTaggerAlg def JetBTaggerAlgCfg(ConfigFlags, JetCollection="", PrimaryVertexCollectionName="", TaggerList=[], SetupScheme="", **options): - acc=None - from AthenaCommon.ConcurrencyFlags import jobproperties - if jobproperties.ConcurrencyFlags.NumThreads() >= 1 : - acc=ComponentAccumulator() - else: - acc=ComponentAccumulator( "TopAlg" ) - + acc=ComponentAccumulator() jetcol = JetCollection # setup the Analysis__BTagTrackAssociation tool diff --git a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py index 8927915680dee32786c46e7a5ea032784bde9e0d..942de70be185bdd6d03b7f7f67cb08e5dfedc460 100755 --- a/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py +++ b/Reconstruction/RecExample/RecExCommon/share/CombinedRec_config.py @@ -134,8 +134,8 @@ if jetOK and rec.doBTagging() and DetFlags.ID_on() and DetFlags.Muon_on(): ConfigFlags.Input.Files = jps.AthenaCommonFlags.FilesInput.get_Value() ConfigFlags.IOVDb.GlobalTag=globalflags.ConditionsTag() # Configure BTagging algorithm - from BTagging.BTagRun3Config import BTagRecoCfg - CAtoGlobalWrapper(BTagRecoCfg, ConfigFlags) + from BTagging.BTagRun3Config import BTagRecoSplitCfg + CAtoGlobalWrapper(BTagRecoSplitCfg, ConfigFlags) except Exception: treatException("Could not set up btagging reconstruction") btaggingOK=False @@ -192,3 +192,6 @@ else: pdr.flag_domain('caloringer') if rec.doCaloRinger: include('CaloRingerAlgs/CaloRinger_jobOptions.py') + + +