ATLAS Offline Software
Loading...
Searching...
No Matches
python.ActsPriVxFinderConfig Namespace Reference

Functions

ComponentAccumulator ActsPriVxFinderCfg (flags, str name="ActsPriVxFinder", **kwargs)
ComponentAccumulator primaryVertexFindingCfg (flags, str name="InDetPriVxFinder", *, str TracksName, str vxCandidatesOutputName=None, **kwargs)

Function Documentation

◆ ActsPriVxFinderCfg()

ComponentAccumulator python.ActsPriVxFinderConfig.ActsPriVxFinderCfg ( flags,
str name = "ActsPriVxFinder",
** kwargs )

Definition at line 7 of file InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py.

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

◆ primaryVertexFindingCfg()

ComponentAccumulator python.ActsPriVxFinderConfig.primaryVertexFindingCfg ( flags,
str name = "InDetPriVxFinder",
* ,
str TracksName,
str vxCandidatesOutputName = None,
** kwargs )

Definition at line 29 of file InnerDetector/InDetConfig/python/ActsPriVxFinderConfig.py.

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