ATLAS Offline Software
Functions
GNNVertexFitterConfig Namespace Reference

Functions

def GNNVertexFitterToolCfg (flags, name="GNNVertexFitterTool", **kwargs)
 
def GNNVertexFitterAlgCfg (flags, jetcol="AntiKt4EMPFlowJets", inclusive=False, **kwargs)
 

Function Documentation

◆ GNNVertexFitterAlgCfg()

def GNNVertexFitterConfig.GNNVertexFitterAlgCfg (   flags,
  jetcol = "AntiKt4EMPFlowJets",
  inclusive = False,
**  kwargs 
)

Definition at line 32 of file GNNVertexFitterConfig.py.

32 def GNNVertexFitterAlgCfg(flags, jetcol="AntiKt4EMPFlowJets", inclusive=False, **kwargs):
33  acc = ComponentAccumulator()
34 
35  trackCollection = 'InDetTrackParticles'
36  JetTrackAssociator = "TracksForBTagging"
37 
38  #Track Augmenter
39  acc.merge(BTagTrackAugmenterAlgCfg(flags))
40 
42  flags,
43  JetCollection=jetcol,
44  InputParticleCollection=trackCollection,
45  OutputParticleDecoration=JetTrackAssociator,
46  ))
47 
48  # decorate b-tagging directly to the jets
49  for networks in flags.BTagging.NNs.get(jetcol, []):
50  assert len(networks['folds']) > 1
51 
52  nnFilePaths=networks['folds']
53  common = commonpath(nnFilePaths)
54  nn_name = '_'.join(PurePath(common).with_suffix('').parts)
55  algname = f'{nn_name}_Jet'
56 
57  remapping=networks.get('remapping', {})
58  remapping['BTagTrackToJetAssociator'] = JetTrackAssociator
59 
60  args = dict(
61  flags=flags,
62  BTaggingCollection=None,
63  TrackCollection=trackCollection,
64  nnFilePaths=nnFilePaths,
65  remapping=remapping,
66  JetCollection=jetcol,
67  )
68 
69  acc.merge(MultifoldGNNCfg(**args))
70 
71  tool = acc.popToolsAndMerge(
73  flags,
74  name=f'{algname}_VertexFitterTool',
75  GNNModel=algname,
76  doInclusiveVertexing=inclusive,
77  removeNonHFVertices=inclusive, # if running inclusive vertexing, remove vertices with no HF tracks
78  )
79  )
80 
81  name = f'{algname}_VertexFitterAlg{"Incl" if inclusive else ""}'
82  outcol = f'{"Inclusive" if inclusive else ""}GNNVertices'
83 
84  acc.addEventAlgo(
85  CompFactory.Rec.GNNVertexFitterAlg(
86  name = name,
87  VtxTool=tool,
88  inputJetContainer=jetcol,
89  outputVertexContainer=outcol,
90  **kwargs
91  )
92  )
93 
94  return acc

◆ GNNVertexFitterToolCfg()

def GNNVertexFitterConfig.GNNVertexFitterToolCfg (   flags,
  name = "GNNVertexFitterTool",
**  kwargs 
)

Definition at line 15 of file GNNVertexFitterConfig.py.

15 def GNNVertexFitterToolCfg(flags, name="GNNVertexFitterTool", **kwargs):
16  acc = ComponentAccumulator()
17 
18  acc.merge(BeamSpotCondAlgCfg(flags))
19  kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(TrkVKalVrtFitterCfg(flags)))
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))
29 
30  return acc
31 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GNNVertexFitterConfig.GNNVertexFitterAlgCfg
def GNNVertexFitterAlgCfg(flags, jetcol="AntiKt4EMPFlowJets", inclusive=False, **kwargs)
Definition: GNNVertexFitterConfig.py:32
python.BeamSpotConditionsConfig.BeamSpotCondAlgCfg
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs)
Definition: BeamSpotConditionsConfig.py:7
python.BTagTrackAugmenterAlgConfig.BTagTrackAugmenterAlgCfg
def BTagTrackAugmenterAlgCfg(flags, TrackCollection='InDetTrackParticles', PrimaryVertexCollectionName='PrimaryVertices', prefix=None)
Definition: BTagTrackAugmenterAlgConfig.py:9
python.FlavorTagNNConfig.MultifoldGNNCfg
def MultifoldGNNCfg(flags, JetCollection, TrackCollection, nnFilePaths, BTaggingCollection=None, FlipConfig="STANDARD", remapping={}, useBTaggingObject=None, tag_requirements=set(), defaultOutputValues={})
Definition: FlavorTagNNConfig.py:217
python.TrkVKalVrtFitterConfig.TrkVKalVrtFitterCfg
def TrkVKalVrtFitterCfg(flags, name="TrkVKalVrtFitter", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:7
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
JetParticleAssociationAlgConfig.JetParticleAssociationAlgCfg
def JetParticleAssociationAlgCfg(ConfigFlags, JetCollection, InputParticleCollection, OutputParticleDecoration, MinimumJetPt=None, MinimumJetPtFlag=None)
Definition: AnalysisCommon/ParticleJetTools/python/JetParticleAssociationAlgConfig.py:26
GNNVertexFitterConfig.GNNVertexFitterToolCfg
def GNNVertexFitterToolCfg(flags, name="GNNVertexFitterTool", **kwargs)
Definition: GNNVertexFitterConfig.py:15