ATLAS Offline Software
Loading...
Searching...
No Matches
AddTrackSummaryAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def AddTrackSummaryAlgCfg(flags, name="AddTrackSummaryAlg", **kwargs):
7 """
8 Configure the AddTrackSummaryAlg to add TrackSummary to tracks read from file
9
10 This is needed for track overlay where pileup tracks don't have TrackSummary
11 objects (not persisted with Track EDM).
12 """
13 result = ComponentAccumulator()
14
15 # Get the track summary tool
16 if "TrackSummaryTool" not in kwargs:
17 from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
18 kwargs.setdefault("TrackSummaryTool",
19 result.popToolsAndMerge(InDetTrackSummaryToolCfg(flags)))
20
21 # Create the algorithm
22 result.addEventAlgo(CompFactory.Trk.AddTrackSummaryAlg(name, **kwargs))
23
24 return result
25
AddTrackSummaryAlgCfg(flags, name="AddTrackSummaryAlg", **kwargs)