5def TRTStandaloneCfg(flags, InputCollections = None):
6 acc = ComponentAccumulator()
7
8
9
10
11 prd_to_track_map = ''
12 if flags.Tracking.ActiveConfig.usePrdAssociationTool:
13 prd_to_track_map = 'InDetTRTonly_PRDtoTrackMap'
14 from InDetConfig.InDetTrackPRD_AssociationConfig import (
15 InDetTrackPRD_AssociationCfg)
16 acc.merge(InDetTrackPRD_AssociationCfg(flags,
17 name = 'InDetTRTonly_TrackPRD_Association',
18 AssociationMapName = prd_to_track_map,
19 TracksName = list(InputCollections)))
20
21 if flags.Beam.Type is BeamType.Cosmics:
22
23
24
25 from InDetConfig.TRT_SegmentsToTrackConfig import TRT_Cosmics_SegmentsToTrackCfg
26 acc.merge(TRT_Cosmics_SegmentsToTrackCfg(flags, name = 'InDetTRT_SegmentsToTrack_Barrel',
27 OutputTrackCollection = 'TRTStandaloneTracks',
28 InputSegmentsCollection = 'TRTSegments',
29 InputAssociationMapName = prd_to_track_map))
30
31 else:
32
33
34
35 from InDetConfig.TRT_StandaloneTrackFinderConfig import (
36 TRT_StandaloneTrackFinderCfg)
37 acc.merge(TRT_StandaloneTrackFinderCfg(flags,
38 InputSegmentsLocation = 'TRTSegments',
39 PRDtoTrackMap = prd_to_track_map))
40 if flags.Tracking.doTruth:
41 from InDetConfig.TrackTruthConfig import InDetTrackTruthCfg
42 acc.merge(InDetTrackTruthCfg(
43 flags,
44 Tracks = "TRTStandaloneTracks",
45 DetailedTruth = "TRTStandaloneTracksDetailedTruth",
46 TracksTruth = "TRTStandaloneTracksTruthCollection"))
47
48 return acc
49