ATLAS Offline Software
Loading...
Searching...
No Matches
ActsPersistificationConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
6 *,
7 pixelClusterCollections: list[str] = None,
8 stripClusterCollections: list[str] = None,
9 hgtdClusterCollections: list[str] = None) -> ComponentAccumulator:
10 toAOD = []
11 if pixelClusterCollections is not None:
12 pixel_cluster_shortlist = ['-pixelClusterLink',
13 '-validationMeasurementLink']
14 pixel_cluster_variables = '.'.join(pixel_cluster_shortlist)
15 for pixelClusterCollection in pixelClusterCollections:
16 toAOD += [f'xAOD::PixelClusterContainer#{pixelClusterCollection}',
17 f'xAOD::PixelClusterAuxContainer#{pixelClusterCollection}Aux.{pixel_cluster_variables}']
18
19 if stripClusterCollections is not None:
20 strip_cluster_shortlist = ['-sctClusterLink',
21 '-validationMeasurementLink']
22 strip_cluster_variables = '.'.join(strip_cluster_shortlist)
23 for stripClusterCollection in stripClusterCollections:
24 toAOD += [f"xAOD::StripClusterContainer#{stripClusterCollection}",
25 f"xAOD::StripClusterAuxContainer#{stripClusterCollection}Aux.{strip_cluster_variables}"]
26
27 if hgtdClusterCollections is not None:
28 hgtd_cluster_shortlist = ['-hgtdClusterLink']
29 hgtd_cluster_variables = '.'.join(hgtd_cluster_shortlist)
30 for hgtdClusterCollection in hgtdClusterCollections:
31 toAOD += [f"xAOD::HGTDClusterContainer#{hgtdClusterCollection}",
32 f"xAOD::HGTDClusterAuxContainer#{hgtdClusterCollection}Aux.{hgtd_cluster_variables}"]
33
34 acc = ComponentAccumulator()
35 if len(toAOD) == 0:
36 return acc
37
38 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
39 acc.merge(addToAOD(flags, toAOD))
40 return acc
41
42
44 *,
45 pixelSpacePointCollections: list[str] = None,
46 stripSpacePointCollections: list[str] = None) -> ComponentAccumulator:
47 toAOD = []
48 aux_container_type = "xAOD::SpacePointAuxContainer"
49 if flags.Acts.EDM.SlimContent:
50 aux_container_type = "xAOD::AuxContainerBase!"
51
52 if pixelSpacePointCollections is not None:
53 pixel_spacepoint_shortlist = ['-measurements',
54 '-pixelSpacePointLink']
55 if flags.Acts.EDM.SlimContent:
56 pixel_spacepoint_shortlist = ['globalPosition']
57 pixel_spacepoint_variables = '.'.join(pixel_spacepoint_shortlist)
58 for pixelSpacePointCollection in pixelSpacePointCollections:
59 toAOD += [f'xAOD::SpacePointContainer#{pixelSpacePointCollection}',
60 f"{aux_container_type}#{pixelSpacePointCollection}Aux.{pixel_spacepoint_variables}"]
61
62 if stripSpacePointCollections is not None:
63 strip_spacepoint_shortlist = ['topHalfStripLength',
64 'bottomHalfStripLength',
65 'topStripDirection',
66 'bottomStripDirection',
67 'stripCenterDistance',
68 'topStripCenter',
69 'measurementLink']
70 if flags.Acts.EDM.SlimContent:
71 strip_spacepoint_shortlist = ['globalPosition']
72 strip_spacepoint_variables = '.'.join(strip_spacepoint_shortlist)
73 for stripSpacePointCollection in stripSpacePointCollections:
74 toAOD += [f'xAOD::SpacePointContainer#{stripSpacePointCollection}',
75 f"{aux_container_type}#{stripSpacePointCollection}Aux.{strip_spacepoint_variables}"]
76
77 acc = ComponentAccumulator()
78 if len(toAOD) == 0:
79 return acc
80
81 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
82 acc.merge(addToAOD(flags, toAOD))
83 return acc
84
85
87 *,
88 extensions: list[str] = None) -> ComponentAccumulator:
89 toAOD = []
90 if extensions is not None:
91 for prefix in extensions:
92 toAOD += [f"xAOD::TrackSummaryContainer#{prefix}TrackSummary",
93 f"xAOD::TrackSummaryAuxContainer#{prefix}TrackSummaryAux.",
94 f"xAOD::TrackStateContainer#{prefix}TrackStates",
95 f"xAOD::TrackStateAuxContainer#{prefix}TrackStatesAux.-uncalibratedMeasurement",
96 f"xAOD::TrackParametersContainer#{prefix}TrackParameters",
97 f"xAOD::TrackParametersAuxContainer#{prefix}TrackParametersAux.",
98 f"xAOD::TrackJacobianContainer#{prefix}TrackJacobians",
99 f"xAOD::TrackJacobianAuxContainer#{prefix}TrackJacobiansAux.",
100 f"xAOD::TrackMeasurementContainer#{prefix}TrackMeasurements",
101 f"xAOD::TrackMeasurementAuxContainer#{prefix}TrackMeasurementsAux.",
102 f"xAOD::TrackSurfaceContainer#{prefix}TrackStateSurfaces",
103 f"xAOD::TrackSurfaceAuxContainer#{prefix}TrackStateSurfacesAux.",
104 f"xAOD::TrackSurfaceContainer#{prefix}TrackSurfaces",
105 f"xAOD::TrackSurfaceAuxContainer#{prefix}TrackSurfacesAux."]
106
107 acc = ComponentAccumulator()
108 if len(toAOD) == 0:
109 return acc
110
111 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
112 acc.merge(addToAOD(flags, toAOD))
113 return acc
114
115
117 *,
118 trackParticleCollections: list[str] = None) -> ComponentAccumulator:
119 toAOD = []
120 if trackParticleCollections is not None:
121 trackparticles_shortlist = ['-clusterAssociation',
122 '-TTVA_AMVFVertices_forReco',
123 '-AssoClustersUFO',
124 '-TTVA_AMVFWeights_forReco']
125 # exclude TTVA decorations
126 trackparticles_shortlist += ['-TTVA_AMVFVertices',
127 '-TTVA_AMVFWeights']
128 # acts track link
129 if not flags.Acts.EDM.PersistifyTracks:
130 trackparticles_shortlist.append('-actsTrack')
131
132 trackparticles_variables = ".".join(trackparticles_shortlist)
133 # remove track decorations used internally by FTAG software
134 from InDetConfig.InDetTrackOutputConfig import FTAG_AUXDATA
135 trackparticles_variables += '.-'.join([''] + FTAG_AUXDATA)
136 # exclude IDTIDE decorations
137 from DerivationFrameworkInDet.IDTIDE import IDTIDE_AOD_EXCLUDED_AUXDATA
138 trackparticles_variables += '.-'.join([''] + IDTIDE_AOD_EXCLUDED_AUXDATA)
139 from DerivationFrameworkInDet.IDTRKVALID import IDTRKVALID_AOD_EXCLUDED_AUXDATA
140 trackparticles_variables += '.-'.join([''] + IDTRKVALID_AOD_EXCLUDED_AUXDATA)
141
142 for trackParticleCollection in trackParticleCollections:
143 toAOD += [f"xAOD::TrackParticleContainer#{trackParticleCollection}",
144 f"xAOD::TrackParticleAuxContainer#{trackParticleCollection}Aux." + trackparticles_variables]
145
146 acc = ComponentAccumulator()
147 if len(toAOD) == 0:
148 return acc
149
150 from OutputStreamAthenaPool.OutputStreamConfig import addToAOD
151 acc.merge(addToAOD(flags, toAOD))
152 return acc
ComponentAccumulator PersistifySpacePoints(flags, *, list[str] pixelSpacePointCollections=None, list[str] stripSpacePointCollections=None)
ComponentAccumulator PersistifyTracks(flags, *, list[str] extensions=None)
ComponentAccumulator PersistifyClusters(flags, *, list[str] pixelClusterCollections=None, list[str] stripClusterCollections=None, list[str] hgtdClusterCollections=None)
ComponentAccumulator PersistifyTrackParticles(flags, *, list[str] trackParticleCollections=None)