3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from TrkConfig.TrkVKalVrtFitterConfig
import TrkVKalVrtFitterCfg
6 from BeamSpotConditions.BeamSpotConditionsConfig
import BeamSpotCondAlgCfg
7 from FlavorTagDiscriminants.FlavorTagNNConfig
import MultifoldGNNCfg
8 from os.path
import commonpath
9 from pathlib
import PurePath
10 from ParticleJetTools.JetParticleAssociationAlgConfig
import (
11 JetParticleAssociationAlgCfg,
13 from BTagging.BTagTrackAugmenterAlgConfig
import BTagTrackAugmenterAlgCfg
20 kwargs.setdefault(
"GNNModel",
"GN2v01")
21 kwargs.setdefault(
"JetCollection",
"AntiKt4EMPFlowJets")
22 kwargs.setdefault(
"includePrimaryVertex",
False)
23 kwargs.setdefault(
"removeNonHFVertices",
False)
24 kwargs.setdefault(
"doInclusiveVertexing",
False)
25 kwargs.setdefault(
"maxChi2", 20)
26 kwargs.setdefault(
"HFRatio", 0)
27 kwargs.setdefault(
"applyCuts",
False)
28 acc.setPrivateTools(CompFactory.Rec.GNNVertexFitterTool(**kwargs))
35 trackCollection =
'InDetTrackParticles'
36 JetTrackAssociator =
"TracksForBTagging"
44 InputParticleCollection=trackCollection,
45 OutputParticleDecoration=JetTrackAssociator,
49 for networks
in flags.BTagging.NNs.get(jetcol, []):
50 assert len(networks[
'folds']) > 1
52 nnFilePaths=networks[
'folds']
53 common = commonpath(nnFilePaths)
54 nn_name =
'_'.
join(PurePath(common).with_suffix(
'').parts)
55 algname = f
'{nn_name}_Jet'
57 remapping=networks.get(
'remapping', {})
58 remapping[
'BTagTrackToJetAssociator'] = JetTrackAssociator
62 BTaggingCollection=
None,
63 TrackCollection=trackCollection,
64 nnFilePaths=nnFilePaths,
71 tool = acc.popToolsAndMerge(
74 name=f
'{algname}_VertexFitterTool',
76 doInclusiveVertexing=inclusive,
77 removeNonHFVertices=inclusive,
81 name = f
'{algname}_VertexFitterAlg{"Incl" if inclusive else ""}'
82 outcol = f
'{"Inclusive" if inclusive else ""}GNNVertices'
85 CompFactory.Rec.GNNVertexFitterAlg(
88 inputJetContainer=jetcol,
89 outputVertexContainer=outcol,