54 name: str =
"ActsTrackFindingAlg",
55 **kwargs) -> ComponentAccumulator:
57 return c
if isinstance(c, list)
else [c]
61 from ActsConfig.ActsGeometryConfig
import ActsDetectorElementToActsGeometryIdMappingAlgCfg
63 kwargs.setdefault(
'DetectorElementToActsGeometryIdMapKey',
'DetectorElementToActsGeometryIdMap')
68 kwargs.setdefault(
"SeedLabels",
seedOrder(flags, pixel=[
"PPP"], strip=[
"SSS"]))
69 kwargs.setdefault(
"EstimatedTrackParametersKeys",
seedOrder(flags, pixel=[
"ActsPixelEstimatedTrackParams"], strip=[
"ActsStripEstimatedTrackParams"]))
70 kwargs.setdefault(
"SeedContainerKeys",
seedOrder(flags, pixel=[
"ActsPixelSeeds"], strip=[
"ActsStripSeeds"]))
72 kwargs.setdefault(
"UncalibratedMeasurementContainerKeys",
isdet(flags, pixel=[
"ITkPixelClusters_Cached" if flags.Acts.useCache
else "ITkPixelClusters"], strip=[
"ITkStripClusters_Cached" if flags.Acts.useCache
else "ITkStripClusters"], hgtd=[
"HGTD_Clusters"]))
74 kwargs.setdefault(
'ACTSTracksLocation',
'ActsTracks')
76 kwargs.setdefault(
"maxPropagationStep", 10000)
77 kwargs.setdefault(
"skipDuplicateSeeds", flags.Acts.skipDuplicateSeeds)
78 kwargs.setdefault(
"refitSeeds",
seedOrder(flags, pixel=[
False], strip=[
False]))
79 kwargs.setdefault(
"doTwoWay", flags.Acts.doTwoWayCKF)
80 if flags.Acts.reverseTrackFindingForStrips:
81 kwargs.setdefault(
"reverseSearch",
seedOrder(flags, pixel=[
False], strip=[
True]))
87 if flags.Detector.GeometryITk:
88 kwargs.setdefault(
"etaBins", flags.Tracking.ActiveConfig.etaBins)
89 if flags.Acts.trackFindingTrackSelectorConfig <= 0:
91 kwargs.setdefault(
"chi2CutOff", tolist(flags.Tracking.ActiveConfig.Xi2maxNoAdd))
92 elif flags.Acts.trackFindingTrackSelectorConfig == 2:
94 kwargs.setdefault(
"chi2CutOff", tolist(flags.Tracking.ActiveConfig.Xi2max))
96 kwargs.setdefault(
"chi2OutlierCutOff", tolist(flags.Tracking.ActiveConfig.Xi2maxNoAdd))
99 kwargs.setdefault(
"chi2CutOff", [25])
100 kwargs.setdefault(
"chi2OutlierCutOff", [25])
101 if flags.Acts.trackFindingTrackSelectorConfig > 0
and flags.Acts.trackFindingTrackSelectorConfig != 3:
102 kwargs.setdefault(
"branchStopperPtMinFactor", 0.9)
103 kwargs.setdefault(
"branchStopperAbsEtaMaxExtra", 0.1)
105 kwargs.setdefault(
"numMeasurementsCutOff", [1])
110 kwargs.setdefault(
"StatisticEtaBins", [eta/10.
for eta
in range(5, 40, 5)])
112 if flags.Acts.trackFindingTrackSelectorConfig > 0:
113 kwargs.setdefault(
"absEtaMax", flags.Tracking.ActiveConfig.maxEta)
114 kwargs.setdefault(
"ptMin", [p / Units.GeV * UnitConstants.GeV
for p
in tolist(flags.Tracking.ActiveConfig.minPT)])
116 kwargs.setdefault(
"z0Min", [-flags.Tracking.ActiveConfig.maxZImpactSeed / Units.mm * UnitConstants.mm
for etabin
in flags.Tracking.ActiveConfig.etaBins[:-1]])
117 kwargs.setdefault(
"z0Max", [ flags.Tracking.ActiveConfig.maxZImpactSeed / Units.mm * UnitConstants.mm
for etabin
in flags.Tracking.ActiveConfig.etaBins[:-1]])
118 kwargs.setdefault(
"d0Min", [-d0 / Units.mm * UnitConstants.mm
for d0
in tolist(flags.Tracking.ActiveConfig.maxPrimaryImpact)])
119 kwargs.setdefault(
"d0Max", [ d0 / Units.mm * UnitConstants.mm
for d0
in tolist(flags.Tracking.ActiveConfig.maxPrimaryImpact)])
120 kwargs.setdefault(
"minMeasurements", tolist(flags.Tracking.ActiveConfig.minClusters))
121 kwargs.setdefault(
"maxHoles", tolist(flags.Tracking.ActiveConfig.maxHoles))
122 if flags.Acts.trackFindingTrackSelectorConfig != 4:
123 kwargs.setdefault(
"minPixelHits", tolist(flags.Tracking.ActiveConfig.minPixel))
124 kwargs.setdefault(
"maxPixelHoles", tolist(flags.Tracking.ActiveConfig.maxPixelHoles))
125 kwargs.setdefault(
"maxStripHoles", tolist(flags.Tracking.ActiveConfig.maxSctHoles))
127 kwargs.setdefault(
"addPixelStripCounts",
False)
128 if flags.Acts.useDefaultActsMeasurementSelector:
130 kwargs.setdefault(
"maxOutliers", tolist(flags.Tracking.ActiveConfig.maxHoles))
133 kwargs.setdefault(
"maxSharedHits", tolist(flags.Tracking.ActiveConfig.maxShared))
134 kwargs.setdefault(
"ptMinMeasurements",
isdet(flags, pixel=[3], strip=[6]))
135 kwargs.setdefault(
"absEtaMaxMeasurements",
isdet(flags, pixel=[3], strip=[999999]))
137 if 'TrackingGeometryTool' not in kwargs:
138 from ActsConfig.ActsGeometryConfig
import ActsTrackingGeometryToolCfg
140 "TrackingGeometryTool",
144 if 'ExtrapolationTool' not in kwargs:
145 from ActsConfig.ActsGeometryConfig
import ActsExtrapolationToolCfg
151 if flags.Acts.doPrintTrackStates
and 'TrackStatePrinter' not in kwargs:
157 if 'FitterTool' not in kwargs:
158 from ActsConfig.ActsTrackFittingConfig
import ActsFitterCfg
162 ReverseFilteringPt=0,
163 OutlierChi2Cut=
float(
'inf')))
166 if 'PixelCalibrator' not in kwargs:
167 from AthenaConfiguration.Enums
import BeamType
168 from ActsConfig.ActsConfigFlags
import PixelCalibrationStrategy
169 from ActsConfig.ActsMeasurementCalibrationConfig
import ActsAnalogueClusteringToolCfg
171 if not (flags.Tracking.doPixelDigitalClustering
or flags.Beam.Type
is BeamType.Cosmics):
172 if flags.Acts.PixelCalibrationStrategy
in (PixelCalibrationStrategy.AnalogueClustering,
173 PixelCalibrationStrategy.AnalogueClusteringAfterSelection) :
177 CalibrateAfterMeasurementSelection = flags.Acts.PixelCalibrationStrategy
is PixelCalibrationStrategy.AnalogueClusteringAfterSelection))
180 if flags.Acts.doMonitoring
and 'MonTool' not in kwargs:
181 from ActsConfig.ActsMonitoringConfig
import ActsTrackFindingMonitoringToolCfg
182 kwargs.setdefault(
'MonTool', acc.popToolsAndMerge(
185 kwargs.setdefault(
"UseDefaultActsMeasurementSelector",flags.Acts.useDefaultActsMeasurementSelector)
187 acc.addEventAlgo(CompFactory.ActsTrk.TrackFindingAlg(name, **kwargs))