ATLAS Offline Software
Loading...
Searching...
No Matches
TrkTruthAlgsConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2# Configuration of TrkTruthAlgs package
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def TrackTruthSimilaritySelectorCfg(flags, name='Selector', **kwargs) :
7 acc = ComponentAccumulator()
8
9 if "TrackTruthSimilarityTool" not in kwargs:
10 from TrkConfig.TrkTruthCreatorToolsConfig import InDetTruthMatchToolCfg
11 kwargs.setdefault("TrackTruthSimilarityTool", acc.popToolsAndMerge(
12 InDetTruthMatchToolCfg(flags)))
13
14 acc.addEventAlgo(CompFactory.TrackTruthSimilaritySelector(kwargs["OutputName"]+name, **kwargs))
15 return acc
16
17def ITkTrackTruthSimilaritySelectorCfg(flags, name='Selector', **kwargs) :
18 acc = ComponentAccumulator()
19
20 if "TrackTruthSimilarityTool" not in kwargs:
21 from TrkConfig.TrkTruthCreatorToolsConfig import ITkTruthMatchToolCfg
22 kwargs.setdefault("TrackTruthSimilarityTool", acc.popToolsAndMerge(
23 ITkTruthMatchToolCfg(flags)))
24
25 acc.addEventAlgo(CompFactory.TrackTruthSimilaritySelector(kwargs["OutputName"]+name, **kwargs))
26 return acc
27
28def TrackTruthSelectorCfg(flags, name="Selector", tracks="", **kwargs):
29 acc = ComponentAccumulator()
30 kwargs.setdefault("DetailedTrackTruthName", tracks+"DetailedTruth")
31 kwargs.setdefault("OutputName", tracks+"Truth")
32 acc.addEventAlgo(CompFactory.TrackTruthSelector(tracks+name, **kwargs))
33 return acc
34
35def TrackParticleTruthAlgCfg(flags, name="TruthAlg", tracks="", **kwargs):
36 acc = ComponentAccumulator()
37 kwargs.setdefault("TrackTruthName", tracks+"Truth")
38 acc.addEventAlgo(CompFactory.TrackParticleTruthAlg(tracks+name, **kwargs))
39 return acc
TrackTruthSelectorCfg(flags, name="Selector", tracks="", **kwargs)
TrackTruthSimilaritySelectorCfg(flags, name='Selector', **kwargs)
TrackParticleTruthAlgCfg(flags, name="TruthAlg", tracks="", **kwargs)
ITkTrackTruthSimilaritySelectorCfg(flags, name='Selector', **kwargs)