ATLAS Offline Software
TrackingAnalysisAlgorithmsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 
6 def InDetSecVtxTruthMatchToolCfg(flags, name="InDetSecVtxTruthMatchTool", **kwargs):
8  acc.setPrivateTools(CompFactory.InDetSecVtxTruthMatchTool(**kwargs))
9  return acc
10 
11 def SecVertexTruthMatchAlgCfg(flags, name="SecVertexTruthMatchAlg", useLRTTracks = False, **kwargs):
12 
13  acc = ComponentAccumulator()
14 
15  if useLRTTracks:
16  from DerivationFrameworkInDet.InDetToolsConfig import InDetLRTMergeCfg
17  acc.merge(InDetLRTMergeCfg(flags))
18  kwargs.setdefault("TrackParticleContainer", "InDetWithLRTTrackParticles")
19 
20  kwargs.setdefault("TruthVertexContainer", "TruthVertices")
21  kwargs.setdefault("SecondaryVertexContainer", "VrtSecInclusive_SecondaryVertices")
22  kwargs.setdefault("TargetPDGIDs", [511,521])
23  kwargs.setdefault("MatchTool", acc.popToolsAndMerge(InDetSecVtxTruthMatchToolCfg(flags)))
24 
25  truthMatchAlg = CompFactory.CP.SecVertexTruthMatchAlg(name, **kwargs)
26 
27  acc.addEventAlgo(truthMatchAlg)
28  acc.addService(CompFactory.THistSvc(Output = [f"ANALYSIS DATAFILE='{flags.Output.HISTFileName}' OPT='RECREATE'"]))
29  acc.setAppProperty("HistogramPersistency","ROOT")
30  return acc
31 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrackingAnalysisAlgorithmsConfig.InDetSecVtxTruthMatchToolCfg
def InDetSecVtxTruthMatchToolCfg(flags, name="InDetSecVtxTruthMatchTool", **kwargs)
Definition: TrackingAnalysisAlgorithmsConfig.py:6
TrackingAnalysisAlgorithmsConfig.SecVertexTruthMatchAlgCfg
def SecVertexTruthMatchAlgCfg(flags, name="SecVertexTruthMatchAlg", useLRTTracks=False, **kwargs)
Definition: TrackingAnalysisAlgorithmsConfig.py:11
python.InDetToolsConfig.InDetLRTMergeCfg
def InDetLRTMergeCfg(flags, name="InDetLRTMerge", **kwargs)
Definition: InDetToolsConfig.py:14