ATLAS Offline Software
Loading...
Searching...
No Matches
BackTrackingConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3
4# ------------------------------------------------------------
5#
6# ----------- 2nd iteration, outside in tracking
7#
8# ------------------------------------------------------------
9
10def BackTrackingCfg(flags, InputCollections = None,
11 ClusterSplitProbContainer=''):
12 acc = ComponentAccumulator()
13 # ------------------------------------------------------------
14 #
15 # ---------- TRT Seeded Tracking
16 #
17 # ------------------------------------------------------------
18
19 from InDetConfig.TRT_SeededTrackFinderConfig import TRT_SeededTrackFinderCfg
20 acc.merge(TRT_SeededTrackFinderCfg(flags,
21 InputCollections = InputCollections))
22
23 from InDetConfig.TrackTruthConfig import InDetTrackTruthCfg
24 if flags.Tracking.doTruth:
25 acc.merge(InDetTrackTruthCfg(
26 flags,
27 Tracks = "TRTSeededTracks",
28 DetailedTruth = "TRTSeededTracksDetailedTruth",
29 TracksTruth = "TRTSeededTracksTruthCollection"))
30
31 # ------------------------------------------------------------
32 #
33 # --- Resolve back tracking tracks
34 #
35 # ------------------------------------------------------------
36 from TrkConfig.TrkAmbiguitySolverConfig import TrkAmbiguityScore_TRT_Cfg, TrkAmbiguitySolver_TRT_Cfg
37 acc.merge(TrkAmbiguityScore_TRT_Cfg(flags))
38 acc.merge(TrkAmbiguitySolver_TRT_Cfg(flags,
39 ClusterSplitProbContainer = ClusterSplitProbContainer))
40
41 if flags.Tracking.doTruth:
42 acc.merge(InDetTrackTruthCfg(
43 flags,
44 Tracks = "ResolvedTRTSeededTracks",
45 DetailedTruth = "ResolvedTRTSeededTracksDetailedTruth",
46 TracksTruth = "ResolvedTRTSeededTracksTruthCollection"))
47
48 return acc
49
50
51if __name__ == "__main__":
52 from AthenaConfiguration.AllConfigFlags import initConfigFlags
53 flags = initConfigFlags()
54
55 from AthenaConfiguration.TestDefaults import defaultTestFiles
56 flags.Input.Files=defaultTestFiles.RDO_RUN2
57
58 # disable calo for this test
59 flags.Detector.EnableCalo = False
60
61 numThreads=1
62 flags.Concurrency.NumThreads=numThreads
63 flags.Concurrency.NumConcurrentEvents=numThreads
64
65 flags = flags.cloneAndReplace("Tracking.ActiveConfig", "Tracking.MainPass")
66
67 flags.lock()
68 flags.dump()
69
70 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
71 top_acc = MainServicesCfg(flags)
72
73
75 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
76 top_acc.merge(PoolReadCfg(flags))
77
78
79 from InDetConfig.SiliconPreProcessing import InDetRecPreProcessingSiliconCfg
80 top_acc.merge(InDetRecPreProcessingSiliconCfg(flags))
81
82
83
84 from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg
85 top_acc.merge(TRTPreProcessingCfg(flags))
86
87
88
89 from InDetConfig.TRTSegmentFindingConfig import TRTSegmentFindingCfg
90 top_acc.merge(TRTSegmentFindingCfg(flags))
91
92
93
94 top_acc.merge(BackTrackingCfg(flags))
95
96
97
98 iovsvc = top_acc.getService('IOVDbSvc')
99 iovsvc.OutputLevel=5
100
101 top_acc.printConfig()
102 top_acc.store(open("test_BackTrackingConfig.pkl", "wb"))
103 import sys
104 if "--norun" not in sys.argv:
105 sc = top_acc.run(5)
106 sys.exit(not sc.isSuccess())
BackTrackingCfg(flags, InputCollections=None, ClusterSplitProbContainer='')