ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsAlignmentAlgs
python
AlignmentAlgsConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
3
from
AthenaConfiguration.ComponentFactory
import
CompFactory
4
from
AthenaConfiguration.AccumulatorCache
import
AccumulatorCache
5
6
7
def
ActsAlignStoreProviderAlgCfg
(flags, name="AlignStoreProviderAlg", **kwargs):
8
result = ComponentAccumulator()
9
10
from
AthenaConfiguration.Enums
import
ProductionStep
11
12
kwargs.setdefault(
"FillAlignCache"
,
13
flags.Common.ProductionStep != ProductionStep.Simulation)
14
15
from
ActsConfig.ActsGeometryConfig
import
ActsTrackingGeometrySvcCfg
16
kwargs.setdefault(
"TrackingGeometrySvc"
, result.getPrimaryAndMerge(ActsTrackingGeometrySvcCfg(flags))
17
if
kwargs[
"FillAlignCache"
]
else
""
)
18
the_alg = CompFactory.ActsTrk.AlignStoreProviderAlg(name, **kwargs)
19
result.addCondAlgo(the_alg, primary =
True
)
20
return
result
21
22
def
DetectorAlignCondAlgCfg
(flags, name="DetectorAlignCondAlg", **kwargs):
23
result = ComponentAccumulator()
24
25
from
AthenaConfiguration.Enums
import
ProductionStep
26
27
kwargs.setdefault(
"FillAlignCache"
,
28
flags.Common.ProductionStep != ProductionStep.Simulation)
29
30
from
ActsConfig.ActsGeometryConfig
import
ActsTrackingGeometrySvcCfg
31
kwargs.setdefault(
"TrackingGeometrySvc"
, result.getPrimaryAndMerge(ActsTrackingGeometrySvcCfg(flags))
32
if
kwargs[
"FillAlignCache"
]
else
""
)
33
34
the_alg = CompFactory.ActsTrk.DetectorAlignCondAlg(name, **kwargs)
35
result.addCondAlgo(the_alg, primary =
True
)
36
return
result
37
38
39
40
def
PixelAlignCondAlgCfg
(flags):
41
result = ComponentAccumulator()
42
from
ROOT.ActsTrk
import
DetectorType
43
44
if
flags.Detector.GeometryITkPixel:
45
from
PixelConditionsAlgorithms.ITkPixelConditionsConfig
import
ITkPixelAlignCondAlgCfg
46
result.merge(ITkPixelAlignCondAlgCfg(flags))
47
result.merge(
DetectorAlignCondAlgCfg
(flags,
48
name=
"ActsDetAlignmentCondAlgITkPixel"
,
49
InputTransforms=
"ITkPixelAlignmentStore"
,
50
ActsTransforms=
"ActsITkPixelAlignmentStore"
,
51
DetectorType=DetectorType.Pixel))
52
result.merge(
ActsAlignStoreProviderAlgCfg
(flags,
53
name=
"ActsDetAlignmentAlgITkPixel"
,
54
CondAlignStore=
"ActsITkPixelAlignmentStore"
,
55
EventAlignStore=
"ActsITkPixelAlignmentStore"
,
56
DetectorType=DetectorType.Pixel))
57
58
elif
flags.Detector.GeometryPixel:
59
from
PixelConditionsAlgorithms.PixelConditionsConfig
import
PixelAlignCondAlgCfg
60
result.merge(
PixelAlignCondAlgCfg
(flags))
61
result.merge(
DetectorAlignCondAlgCfg
(flags,
62
name=
"ActsDetAlignmentCondAlgPixel"
,
63
InputTransforms=
"PixelAlignmentStore"
,
64
ActsTransforms=
"ActsPixelAlignmentStore"
,
65
DetectorType=DetectorType.Pixel))
66
result.merge(
ActsAlignStoreProviderAlgCfg
(flags,
67
name=
"ActsDetAlignmentAlgPixel"
,
68
CondAlignStore=
"ActsPixelAlignmentStore"
,
69
EventAlignStore=
"ActsPixelAlignmentStore"
,
70
DetectorType=DetectorType.Pixel))
71
return
result
72
73
74
def
SctAlignCondAlgCfg
(flags):
75
result = ComponentAccumulator()
76
from
ROOT.ActsTrk
import
DetectorType
77
78
if
flags.Detector.GeometryITkStrip:
79
from
SCT_ConditionsAlgorithms.ITkStripConditionsAlgorithmsConfig
import
ITkStripAlignCondAlgCfg
80
result.merge(ITkStripAlignCondAlgCfg(flags))
81
result.merge(
DetectorAlignCondAlgCfg
(flags,
82
name=
"ActsDetAlignmentCondAlgITkSct"
,
83
InputTransforms=
"ITkStripAlignmentStore"
,
84
ActsTransforms=
"ActsITkStripAlignmentStore"
,
85
DetectorType=DetectorType.Sct))
86
result.merge(
ActsAlignStoreProviderAlgCfg
(flags,
87
name=
"ActsDetAlignmentAlgITkSct"
,
88
CondAlignStore=
"ActsITkStripAlignmentStore"
,
89
EventAlignStore=
"ActsITkStripAlignmentStore"
,
90
DetectorType=DetectorType.Sct))
91
elif
flags.Detector.GeometrySCT:
92
from
SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig
import
SCT_AlignCondAlgCfg
93
result.merge(SCT_AlignCondAlgCfg(flags))
94
result.merge(
DetectorAlignCondAlgCfg
(flags,
95
name=
"ActsDetAlignmentCondAlgSct"
,
96
InputTransforms=
"SCTAlignmentStore"
,
97
ActsTransforms=
"ActsSCTAlignmentStore"
,
98
DetectorType=DetectorType.Sct))
99
100
result.merge(
ActsAlignStoreProviderAlgCfg
(flags,
101
name=
"ActsDetAlignmentAlgSct"
,
102
CondAlignStore=
"ActsSCTAlignmentStore"
,
103
EventAlignStore=
"ActsSCTAlignmentStore"
,
104
DetectorType=DetectorType.Sct))
105
return
result
106
107
108
@AccumulatorCache
109
def
ActsGeometryContextAlgCfg
(flags, name="GeometryContextAlg", **kwargs):
110
result = ComponentAccumulator()
111
AlignmentStores = []
112
113
from
AthenaConfiguration.Enums
import
ProductionStep
114
115
if
flags.Common.ProductionStep
not
in
[ProductionStep.Simulation,
116
ProductionStep.Digitization,
117
ProductionStep.Overlay ,
118
ProductionStep.PileUpPresampling]:
119
result.merge(
SctAlignCondAlgCfg
(flags))
120
result.merge(
PixelAlignCondAlgCfg
(flags))
121
if
flags.Detector.GeometryITkPixel: AlignmentStores += [
"ActsITkPixelAlignmentStore"
]
122
if
flags.Detector.GeometryITkStrip: AlignmentStores += [
"ActsITkStripAlignmentStore"
]
123
if
flags.Detector.GeometryPixel: AlignmentStores += [
"ActsPixelAlignmentStore"
]
124
if
flags.Detector.GeometrySCT: AlignmentStores += [
"ActsSCTAlignmentStore"
]
125
126
127
if
flags.Muon.usePhaseIIGeoSetup:
128
from
MuonGeoModelR4.MuonGeoModelConfig
import
MuonAlignStoreCfg
129
result.merge(MuonAlignStoreCfg(flags))
130
131
if
flags.Detector.GeometryMDT: AlignmentStores += [
"MdtActsAlignContainer"
]
132
if
flags.Detector.GeometryRPC: AlignmentStores += [
"RpcActsAlignContainer"
]
133
if
flags.Detector.GeometryTGC: AlignmentStores += [
"TgcActsAlignContainer"
]
134
if
flags.Detector.GeometrysTGC: AlignmentStores += [
"sTgcActsAlignContainer"
]
135
if
flags.Detector.GeometryMM: AlignmentStores += [
"MmActsAlignContainer"
]
136
137
kwargs.setdefault(
"AlignmentStores"
, AlignmentStores)
138
139
the_alg = CompFactory.ActsTrk.GeometryContextAlg(name, **kwargs)
140
result.addCondAlgo(the_alg, primary =
True
)
141
return
result
AlignmentAlgsConfig.SctAlignCondAlgCfg
SctAlignCondAlgCfg(flags)
Setups the Acts alignment for the Sct detectors.
Definition
AlignmentAlgsConfig.py:74
AlignmentAlgsConfig.DetectorAlignCondAlgCfg
DetectorAlignCondAlgCfg(flags, name="DetectorAlignCondAlg", **kwargs)
Definition
AlignmentAlgsConfig.py:22
AlignmentAlgsConfig.PixelAlignCondAlgCfg
PixelAlignCondAlgCfg(flags)
Setups the Acts alignment for the Pixel detectors.
Definition
AlignmentAlgsConfig.py:40
AlignmentAlgsConfig.ActsGeometryContextAlgCfg
ActsGeometryContextAlgCfg(flags, name="GeometryContextAlg", **kwargs)
Setup the Geometry context algorithm.
Definition
AlignmentAlgsConfig.py:109
AlignmentAlgsConfig.ActsAlignStoreProviderAlgCfg
ActsAlignStoreProviderAlgCfg(flags, name="AlignStoreProviderAlg", **kwargs)
Definition
AlignmentAlgsConfig.py:7
Generated on
for ATLAS Offline Software by
1.17.0