ATLAS Offline Software
Loading...
Searching...
No Matches
InDetTrackPRD_AssociationConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2# Configuration of InDetTrackPRD_Association package
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def InDetTrackPRD_AssociationCfg(flags, name='InDetTrackPRD_Association', **kwargs):
7 acc = ComponentAccumulator()
8 doTrackOverlay = flags.TrackOverlay.isTrackOverlaySeq
9 prefix = 'TrackOverlay_' if doTrackOverlay else ''
10
11 if kwargs.get('TracksName', None) is None :
12 raise Exception('Not TracksName argument provided')
13
14 if 'AssociationTool' not in kwargs:
15 from InDetConfig.InDetAssociationToolsConfig import (
16 InDetPRDtoTrackMapToolGangedPixelsCfg)
17 kwargs.setdefault("AssociationTool", acc.popToolsAndMerge(
18 InDetPRDtoTrackMapToolGangedPixelsCfg(flags)))
19
20 if "AssociationMapName" not in kwargs:
21 kwargs.setdefault("AssociationMapName",
22 "InDetPRDtoTrackMap" +
23 flags.Tracking.ActiveConfig.extension)
24
25 acc.addEventAlgo(
26 CompFactory.InDet.InDetTrackPRD_Association(prefix + name, **kwargs))
27 return acc
28
29def ITkTrackPRD_AssociationCfg(flags, name='ITkTrackPRD_Association', **kwargs):
30 acc = ComponentAccumulator()
31
32 if kwargs.get('TracksName', None) is None :
33 raise Exception('Not TracksName argument provided')
34
35 if 'AssociationTool' not in kwargs:
36 from InDetConfig.InDetAssociationToolsConfig import (
37 ITkPRDtoTrackMapToolGangedPixelsCfg)
38 kwargs.setdefault("AssociationTool", acc.popToolsAndMerge(
39 ITkPRDtoTrackMapToolGangedPixelsCfg(flags)))
40
41 kwargs.setdefault("AssociationMapName",
42 'ITkPRDtoTrackMap' +
43 flags.Tracking.ActiveConfig.extension)
44 acc.addEventAlgo(
45 CompFactory.InDet.InDetTrackPRD_Association(name, **kwargs))
46 return acc
ITkTrackPRD_AssociationCfg(flags, name='ITkTrackPRD_Association', **kwargs)
InDetTrackPRD_AssociationCfg(flags, name='InDetTrackPRD_Association', **kwargs)