ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPriVxFinderToolConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2# Configuration of InDetPriVxFinderTool package
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from TrkConfig.VertexFindingFlags import VertexSetup
6
7
9 flags, name="InDetIterativePriVxFinderTool", **kwargs):
10 acc = ComponentAccumulator()
11
12 if "SeedFinder" not in kwargs:
13 if flags.Tracking.PriVertex.useBeamConstraint:
14 from TrkConfig.TrkVertexSeedFinderToolsConfig import ZScanSeedFinderCfg
15 kwargs.setdefault("SeedFinder", acc.popToolsAndMerge(
16 ZScanSeedFinderCfg(flags)))
17 else:
18 from TrkConfig.TrkVertexSeedFinderToolsConfig import (
19 IVF_CrossDistancesSeedFinderCfg)
20 kwargs.setdefault("SeedFinder", acc.popToolsAndMerge(
21 IVF_CrossDistancesSeedFinderCfg(flags)))
22
23 if "TrackSelector" not in kwargs:
24 from InDetConfig.InDetTrackSelectionToolConfig import (
25 VtxInDetTrackSelectionCfg)
26 kwargs.setdefault("TrackSelector", acc.popToolsAndMerge(
27 VtxInDetTrackSelectionCfg(flags)))
28
29 if "LinearizedTrackFactory" not in kwargs:
30 from TrkConfig.TrkVertexFitterUtilsConfig import (
31 FullLinearizedTrackFactoryCfg)
32 kwargs.setdefault("LinearizedTrackFactory", acc.popToolsAndMerge(
33 FullLinearizedTrackFactoryCfg(flags)))
34
35 if "ImpactPoint3dEstimator" not in kwargs:
36 from TrkConfig.TrkVertexFitterUtilsConfig import (
37 ImpactPoint3dEstimatorCfg)
38 kwargs.setdefault("ImpactPoint3dEstimator", acc.popToolsAndMerge(
39 ImpactPoint3dEstimatorCfg(flags)))
40
41 if "VertexFitterTool" not in kwargs:
42 from TrkConfig.TrkVertexFittersConfig import AdaptiveVertexFitterCfg
43 kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(
44 AdaptiveVertexFitterCfg(
45 flags,
46 SeedFinder=kwargs["SeedFinder"],
47 LinearizedTrackFactory=kwargs["LinearizedTrackFactory"],
48 ImpactPoint3dEstimator=kwargs["ImpactPoint3dEstimator"])))
49
50 kwargs.setdefault("useBeamConstraint",
51 flags.Tracking.PriVertex.useBeamConstraint)
52 kwargs.setdefault("significanceCutSeeding", 12)
53 kwargs.setdefault("maximumChi2cutForSeeding", 49)
54 kwargs.setdefault("maxVertices", flags.Tracking.PriVertex.maxVertices)
55 kwargs.setdefault("doMaxTracksCut",
56 flags.Tracking.PriVertex.doMaxTracksCut)
57 kwargs.setdefault("MaxTracks", flags.Tracking.PriVertex.maxTracks)
58
59 acc.setPrivateTools(
60 CompFactory.InDet.InDetIterativePriVxFinderTool(name, **kwargs))
61 return acc
62
63
65 flags, name="FastInDetIterativePriVxFinderTool", **kwargs):
66 acc = ComponentAccumulator()
67
68 if "VertexFitterTool" not in kwargs:
69 from TrkConfig.TrkVertexBilloirToolsConfig import FastVertexFitterCfg
70 kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(
71 FastVertexFitterCfg(flags)))
72
73 acc.setPrivateTools(acc.popToolsAndMerge(
74 IterativeFindingBaseCfg(flags, name, **kwargs)))
75 return acc
76
77
79 flags, name="GaussInDetIterativePriVxFinderTool", **kwargs):
80 acc = ComponentAccumulator()
81
82 if "SeedFinder" not in kwargs:
83 from TrkConfig.TrkVertexSeedFinderToolsConfig import (
84 TrackDensitySeedFinderCfg)
85 kwargs.setdefault("SeedFinder", acc.popToolsAndMerge(
86 TrackDensitySeedFinderCfg(flags)))
87
88 acc.setPrivateTools(acc.popToolsAndMerge(
89 IterativeFindingBaseCfg(flags, name, **kwargs)))
90 return acc
91
92
94 flags, name="InDetTrigPriVxFinderTool", **kwargs):
95 acc = ComponentAccumulator()
96
97 if "VertexFitterTool" not in kwargs:
98 from TrkConfig.TrkVertexBilloirToolsConfig import FastVertexFitterCfg
99 kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(
100 FastVertexFitterCfg(flags)))
101
102 if "TrackSelector" not in kwargs:
103 from InDetConfig.InDetTrackSelectionToolConfig import (
104 TrigVtxInDetTrackSelectionCfg)
105 kwargs.setdefault("TrackSelector", acc.popToolsAndMerge(
106 TrigVtxInDetTrackSelectionCfg(flags)))
107
108 kwargs.setdefault("useBeamConstraint", True)
109 kwargs.setdefault("maximumChi2cutForSeeding", 29)
110 kwargs.setdefault("createSplitVertices", False)
111 kwargs.setdefault("doMaxTracksCut", True)
112 kwargs.setdefault("MaxTracks", 3000)
113
114 acc.setPrivateTools(acc.popToolsAndMerge(
116 flags, name+flags.Tracking.ActiveConfig.input_name, **kwargs)))
117 return acc
118
119
120def VertexFinderToolCfg(flags, **kwargs):
121
122 if flags.Tracking.PriVertex.setup == VertexSetup.IVF:
123 return IterativeFindingBaseCfg(flags, **kwargs)
124 elif flags.Tracking.PriVertex.setup == VertexSetup.FastIVF:
125 return FastIterativeFindingCfg(flags, **kwargs)
126 elif flags.Tracking.PriVertex.setup == VertexSetup.ActsGaussAMVF:
127 from ActsConfig.ActsPriVxFinderConfig import ActsGaussAdaptiveMultiFindingCfg
128 return ActsGaussAdaptiveMultiFindingCfg(flags, **kwargs)
129 elif flags.Tracking.PriVertex.setup == VertexSetup.ExperimentalActsIVF:
130 from ActsConfig.ActsPriVxFinderConfig import (
131 ActsIterativeFindingCfg)
132 return ActsIterativeFindingCfg(flags, **kwargs)
133
134 elif flags.Tracking.PriVertex.setup == VertexSetup.ActsGridDensity:
135 from ActsConfig.ActsPriVxFinderConfig import ActsGridAdaptiveMultiFindingCfg
136 return ActsGridAdaptiveMultiFindingCfg(flags, **kwargs)
137
138
139def TrigVertexFinderToolCfg(flags, **kwargs):
140 if flags.Tracking.ActiveConfig.adaptiveVertex:
141 from ActsConfig.ActsPriVxFinderConfig import (
142 TrigActsGaussAdaptiveMultiFindingCfg)
143 return TrigActsGaussAdaptiveMultiFindingCfg(flags, **kwargs)
144 else:
145 return TrigGaussIterativeFindingCfg(flags, **kwargs)
146
FastIterativeFindingCfg(flags, name="FastInDetIterativePriVxFinderTool", **kwargs)
GaussIterativeFindingCfg(flags, name="GaussInDetIterativePriVxFinderTool", **kwargs)
TrigGaussIterativeFindingCfg(flags, name="InDetTrigPriVxFinderTool", **kwargs)
IterativeFindingBaseCfg(flags, name="InDetIterativePriVxFinderTool", **kwargs)