ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetAlignAlgs
InDetAlignGenAlgs
python
InDetAlignAlgsConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
6
def
CreateITkMisalignAlgCfg
(flags, name="CreateITkMisalignAlg", **kwargs):
7
8
result = ComponentAccumulator()
9
10
if
flags.Detector.EnableITkPixel:
11
from
PixelGeoModelXml.ITkPixelGeoModelConfig
import
ITkPixelReadoutGeometryCfg
12
result.merge(ITkPixelReadoutGeometryCfg(flags))
13
kwargs.setdefault(
"PixelDetEleCollKey"
,
"ITkPixelDetectorElementCollection"
)
14
else
:
15
kwargs.setdefault(
"PixelDetEleCollKey"
,
""
)
16
17
if
flags.Detector.EnableITkStrip:
18
from
StripGeoModelXml.ITkStripGeoModelConfig
import
ITkStripReadoutGeometryCfg
19
result.merge(ITkStripReadoutGeometryCfg(flags))
20
kwargs.setdefault(
"SCTDetEleCollKey"
,
"ITkStripDetectorElementCollection"
)
21
else
:
22
kwargs.setdefault(
"SCTDetEleCollKey"
,
""
)
23
24
from
InDetAlignGenTools.InDetAlignGenToolsConfig
import
ITkAlignDBTool
25
dbTool = result.popToolsAndMerge(ITkAlignDBTool(flags))
26
27
kwargs.setdefault(
"IDAlignDBTool"
,dbTool)
28
kwargs.setdefault(
"TRTDetEleCollKey"
,
""
)
29
30
histoSvc = CompFactory.THistSvc(Output = [
"IDENTIFIERTREE DATAFILE='ITkIdentifierTree.root' TYPE='ROOT' OPT='RECREATE'"
])
31
result.addService( histoSvc )
32
ntupSvc = CompFactory.NTupleSvc(Output = [
"CREATEMISALIGN DATAFILE='CreateMisalignmentITk.root' TYP='ROOT' OPT='NEW'"
])
33
result.addService( ntupSvc )
34
result.setAppProperty(
"HistogramPersistency"
,
"ROOT"
)
35
36
result.addEventAlgo(CompFactory.InDetAlignment.CreateMisalignAlg(name,**kwargs))
37
return
result
38
39
def
CreateInDetMisalignAlgCfg
(flags, name="CreateInDetMisalignAlg",setAlignmentFolderName="/Indet/Align", **kwargs):
40
result = ComponentAccumulator()
41
42
if
flags.Detector.EnablePixel:
43
from
PixelGeoModel.PixelGeoModelConfig
import
PixelReadoutGeometryCfg
44
result.merge(PixelReadoutGeometryCfg(flags))
45
else
:
46
kwargs.setdefault(
"PixelDetEleCollKey"
,
""
)
47
48
if
flags.Detector.EnableSCT:
49
from
SCT_GeoModel.SCT_GeoModelConfig
import
SCT_ReadoutGeometryCfg
50
result.merge(SCT_ReadoutGeometryCfg(flags))
51
else
:
52
kwargs.setdefault(
"SCTDetEleCollKey"
,
""
)
53
54
if
flags.Detector.EnableTRT:
55
from
TRT_GeoModel.TRT_GeoModelConfig
import
TRT_ReadoutGeometryCfg
56
result.merge(TRT_ReadoutGeometryCfg(flags))
57
else
:
58
kwargs.setdefault(
"TRTDetEleCollKey"
,
""
)
59
60
from
InDetAlignGenTools.InDetAlignGenToolsConfig
import
InDetAlignDBTool
61
dbTool = result.popToolsAndMerge(
InDetAlignDBTool
(flags,setAlignmentFolderName=setAlignmentFolderName))
62
63
histoSvc = CompFactory.THistSvc(Output = [
"IDENTIFIERTREE DATAFILE='InDetIdentifierTree.root' TYPE='ROOT' OPT='RECREATE'"
])
64
result.addService( histoSvc )
65
ntupSvc = CompFactory.NTupleSvc(Output = [
"CREATEMISALIGN DATAFILE='CreateMisalignmentInDet.root' TYP='ROOT' OPT='NEW'"
])
66
result.addService( ntupSvc )
67
result.setAppProperty(
"HistogramPersistency"
,
"ROOT"
)
68
69
kwargs.setdefault(
"IDAlignDBTool"
,dbTool)
70
result.addEventAlgo(CompFactory.InDetAlignment.CreateMisalignAlg(name,**kwargs))
71
return
result
InDetAlignDBTool
Definition
InDetAlignDBTool.h:55
InDetAlignAlgsConfig.CreateInDetMisalignAlgCfg
CreateInDetMisalignAlgCfg(flags, name="CreateInDetMisalignAlg", setAlignmentFolderName="/Indet/Align", **kwargs)
Definition
InDetAlignAlgsConfig.py:39
InDetAlignAlgsConfig.CreateITkMisalignAlgCfg
CreateITkMisalignAlgCfg(flags, name="CreateITkMisalignAlg", **kwargs)
Definition
InDetAlignAlgsConfig.py:6
Generated on
for ATLAS Offline Software by
1.17.0