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
16 if "TrackSummaryTool" not in kwargs:
17 from TrkConfig.TrkTrackSummaryToolConfig import InDetTrackSummaryToolCfg
18 kwargs.setdefault("TrackSummaryTool",
19 result.popToolsAndMerge(InDetTrackSummaryToolCfg(flags)))
20
21
22 result.addEventAlgo(CompFactory.Trk.AddTrackSummaryAlg(name, **kwargs))
23
24 return result
25