ATLAS Offline Software
Loading...
Searching...
No Matches
TrkMeasurementUpdatorConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2# Configuration of TrkMeasurementUpdator_xk and TrkMeasurementUpdator packages
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from TrkConfig.TrkConfigFlags import KalmanUpdatorType
6
7# Relative timing results from ATLASRECTS-6755
8# normalized to Trk::KalmanUpdator_xk time
9# KalmanUpdator_xk : 1
10# KalmanUpdatorSMatrix : 1.45
11# KalmanUpdator : 3.8
12
13
14def KalmanUpdator_xkCfg(flags, name='KalmanUpdator_xk', **kwargs):
15 result = ComponentAccumulator()
16 result.setPrivateTools(CompFactory.Trk.KalmanUpdator_xk(name, **kwargs))
17 return result
18
19
20def KalmanUpdatorCfg(flags, name='KalmanUpdator', **kwargs):
21 acc = ComponentAccumulator()
22 acc.setPrivateTools(CompFactory.Trk.KalmanUpdator(name, **kwargs))
23 return acc
24
25
26def InDetUpdatorCfg(flags, name='InDetUpdator', **kwargs):
27 if flags.Detector.GeometryITk:
28 name = name.replace("InDet", "ITk")
29
30 acc = ComponentAccumulator()
31
32 tool = None
33 if flags.Tracking.kalmanUpdator == KalmanUpdatorType.KalmanUpdator_xk:
34 tool = CompFactory.Trk.KalmanUpdator_xk(name, **kwargs)
35 elif flags.Tracking.kalmanUpdator == KalmanUpdatorType.KalmanUpdatorSMatrix:
36 tool = CompFactory.Trk.KalmanUpdatorSMatrix(name, **kwargs)
37 elif flags.Tracking.kalmanUpdator == KalmanUpdatorType.KalmanUpdator:
38 tool = CompFactory.Trk.KalmanUpdator(name, **kwargs)
39
40 acc.setPrivateTools(tool)
41 return acc
42
43
44def ITkUpdatorCfg(flags, name='ITkUpdator', **kwargs):
45 return InDetUpdatorCfg(flags, name, **kwargs)
KalmanUpdatorCfg(flags, name='KalmanUpdator', **kwargs)
InDetUpdatorCfg(flags, name='InDetUpdator', **kwargs)
ITkUpdatorCfg(flags, name='ITkUpdator', **kwargs)
KalmanUpdator_xkCfg(flags, name='KalmanUpdator_xk', **kwargs)