ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConfig
python
InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
6
7
def
ActsPriVxFinderCfg
(flags,
8
name: str =
"ActsPriVxFinder"
,
9
**kwargs) -> ComponentAccumulator:
10
acc = ComponentAccumulator()
11
12
if
"VertexCollectionSortingTool"
not
in
kwargs:
13
from
TrkConfig.TrkVertexToolsConfig
import
(
14
VertexCollectionSortingToolCfg)
15
kwargs.setdefault(
"VertexCollectionSortingTool"
, acc.popToolsAndMerge(
16
VertexCollectionSortingToolCfg(flags)))
17
18
if
"VertexFinderTool"
not
in
kwargs:
19
from
InDetConfig.InDetPriVxFinderToolConfig
import
(
20
VertexFinderToolCfg)
21
kwargs.setdefault(
"VertexFinderTool"
, acc.popToolsAndMerge(
22
VertexFinderToolCfg(flags)))
23
24
kwargs.setdefault(
"doVertexSorting"
,
True
)
25
acc.addEventAlgo(CompFactory.InDet.InDetPriVxFinder(name, **kwargs))
26
return
acc
27
28
29
def
primaryVertexFindingCfg
(flags,
30
name: str =
"InDetPriVxFinder"
,
31
*,
32
TracksName: str,
33
vxCandidatesOutputName: str =
None
,
34
**kwargs) -> ComponentAccumulator:
35
# Handle vertex collection name
36
if
not
vxCandidatesOutputName:
37
vxCandidatesOutputName =
"PrimaryVertices"
38
from
AthenaConfiguration.Enums
import
ProductionStep
39
if
flags.Common.ProductionStep
in
[ProductionStep.MinbiasPreprocessing]:
40
vxCandidatesOutputName = f
"{flags.Overlay.BkgPrefix}{vxCandidatesOutputName}"
41
42
# Compute the primary vertex on the track particle collection
43
# Creation of track particles is handled externally
44
acc =
ActsPriVxFinderCfg
(flags,
45
name = name,
46
VxCandidatesOutputName = vxCandidatesOutputName,
47
TracksName = TracksName,
48
**kwargs)
49
50
# Persistification to both AOD and ESD
51
from
OutputStreamAthenaPool.OutputStreamConfig
import
addToESD, addToAOD
52
53
excludedVtxAuxData =
"-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV.-TruthEventMatchingInfos.-TruthEventRawMatchingInfos.-VertexMatchType"
54
verticesContainer = [
55
f
"xAOD::VertexContainer#{vxCandidatesOutputName}"
,
56
f
"xAOD::VertexAuxContainer#{vxCandidatesOutputName}Aux."
+ excludedVtxAuxData,
57
]
58
59
acc.merge(addToAOD(flags, verticesContainer))
60
acc.merge(addToESD(flags, verticesContainer))
61
return
acc
62
python.ActsPriVxFinderConfig.ActsPriVxFinderCfg
ComponentAccumulator ActsPriVxFinderCfg(flags, str name="ActsPriVxFinder", **kwargs)
Definition
InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py:9
python.ActsPriVxFinderConfig.primaryVertexFindingCfg
ComponentAccumulator primaryVertexFindingCfg(flags, str name="InDetPriVxFinder", *, str TracksName, str vxCandidatesOutputName=None, **kwargs)
Definition
InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py:34
Generated on
for ATLAS Offline Software by
1.17.0