ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPhysValDecorationConfig Namespace Reference

Functions

 canAddDecorator (flags)
 InDetPhysHitDecoratorAlgCfg (flags, name="InDetPhysHitDecoratorAlg", **kwargs)
 ITkPhysHitDecoratorAlgCfg (flags, name="ITkPhysHitDecoratorAlg", **kwargs)
 ParameterErrDecoratorAlgCfg (flags, name="ParameterErrDecoratorAlg", **kwargs)
 InDetPhysValTruthDecoratorAlgCfg (flags, name="InDetPhysValTruthDecoratorAlg", **kwargs)
 TruthClassDecoratorAlgCfg (flags, name="TruthClassDecoratorAlg", **kwargs)
 TrackDecoratorsCfg (flags, **kwargs)
 GSFTrackDecoratorsCfg (flags, **kwargs)
 AddDecoratorCfg (flags, **kwargs)
 AddGSFTrackDecoratorAlgCfg (flags, **kwargs)
 AddDecoratorIfNeededCfg (flags, **kwargs)

Function Documentation

◆ AddDecoratorCfg()

AddDecoratorCfg ( flags,
** kwargs )
Add the track particle decoration algorithm to the top sequence.
The algorithm is to be run on RAW/RDO since it depends on full hit information
which is generally not available at later stages. The decorations added by this
algorithm are used by InDetPhysValMonitoring tool.

Definition at line 169 of file InDetPhysValDecorationConfig.py.

169def AddDecoratorCfg(flags, **kwargs):
170 '''
171 Add the track particle decoration algorithm to the top sequence.
172 The algorithm is to be run on RAW/RDO since it depends on full hit information
173 which is generally not available at later stages. The decorations added by this
174 algorithm are used by InDetPhysValMonitoring tool.
175 '''
176 acc = ComponentAccumulator()
177
178 acc.merge(TrackDecoratorsCfg(flags, **kwargs))
179
180 if flags.Tracking.doTruth:
181 from BeamSpotConditions.BeamSpotConditionsConfig import (
182 BeamSpotCondAlgCfg)
183 acc.merge(BeamSpotCondAlgCfg(flags))
184 acc.merge(InDetPhysValTruthDecoratorAlgCfg(flags))
185
186 if flags.PhysVal.IDPVM.doValidateGSFTracks:
187 acc.merge(AddGSFTrackDecoratorAlgCfg(flags))
188
189 return acc
190
191

◆ AddDecoratorIfNeededCfg()

AddDecoratorIfNeededCfg ( flags,
** kwargs )
 Add the InDet decoration algorithm if it has not been ran yet.

Definition at line 204 of file InDetPhysValDecorationConfig.py.

204def AddDecoratorIfNeededCfg(flags, **kwargs):
205 '''
206 Add the InDet decoration algorithm if it has not been ran yet.
207 '''
208
209 acc = ComponentAccumulator()
210
211 if not canAddDecorator(flags):
212 print('DEBUG addDecoratorIfNeeded ? Stage is too early or too late for running the decoration. Needs reconstructed tracks. Try again during next stage ?')
213 return acc
214
215 acc.merge(AddDecoratorCfg(flags, **kwargs))
216
217 return acc
void print(char *figname, TCanvas *c1)

◆ AddGSFTrackDecoratorAlgCfg()

AddGSFTrackDecoratorAlgCfg ( flags,
** kwargs )

Definition at line 192 of file InDetPhysValDecorationConfig.py.

192def AddGSFTrackDecoratorAlgCfg(flags, **kwargs):
193 # Search egamma algorithm and add the GSF TrackParticle decorator
194 acc = ComponentAccumulator()
195
196 if flags.PhysVal.IDPVM.doValidateGSFTracks:
197 acc.merge(GSFTrackDecoratorsCfg(flags))
198
199 for col in flags.PhysVal.IDPVM.validateExtraTrackCollections:
200 acc.merge(TrackDecoratorsCfg(
201 flags, TrackParticleContainerName=col))
202
203

◆ canAddDecorator()

canAddDecorator ( flags)
check whether the decorator can be added.

A decorator can be added if a track particle converter alg is in the sequence or
if ESDs or AODs are read.

Definition at line 9 of file InDetPhysValDecorationConfig.py.

9def canAddDecorator(flags):
10 '''
11 check whether the decorator can be added.
12
13 A decorator can be added if a track particle converter alg is in the sequence or
14 if ESDs or AODs are read.
15 '''
16
17 if not (flags.Detector.GeometryID or flags.Detector.GeometryITk):
18 return False
19
20 return (flags.PhysVal.IDPVM.runDecoration and
21 ("StreamESD" in flags.Input.ProcessingTags or
22 "StreamAOD" in flags.Input.ProcessingTags or
23 (len(flags.Input.ProcessingTags) > 0 and
24 # Look for substring StreamDAOD in first processing tag to cover
25 # all DAOD flavors
26 "StreamDAOD" in flags.Input.ProcessingTags[0])))
27
28

◆ GSFTrackDecoratorsCfg()

GSFTrackDecoratorsCfg ( flags,
** kwargs )

Definition at line 164 of file InDetPhysValDecorationConfig.py.

164def GSFTrackDecoratorsCfg(flags, **kwargs):
165 kwargs.setdefault("TrackParticleContainerName", "GSFTrackParticles")
166 return TrackDecoratorsCfg(flags, **kwargs)
167
168

◆ InDetPhysHitDecoratorAlgCfg()

InDetPhysHitDecoratorAlgCfg ( flags,
name = "InDetPhysHitDecoratorAlg",
** kwargs )

Definition at line 29 of file InDetPhysValDecorationConfig.py.

30 flags, name="InDetPhysHitDecoratorAlg", **kwargs):
31 if flags.Detector.GeometryITk:
32 return ITkPhysHitDecoratorAlgCfg(flags, name, **kwargs)
33
34 '''
35 create decoration algorithm which decorates track particles with the unbiased hit residuals and pulls.
36 '''
37 acc = ComponentAccumulator()
38
39 if 'InDetTrackHoleSearchTool' not in kwargs:
40 from InDetConfig.InDetTrackHoleSearchConfig import (
41 InDetTrackHoleSearchToolCfg)
42 kwargs.setdefault("InDetTrackHoleSearchTool",
43 acc.popToolsAndMerge(InDetTrackHoleSearchToolCfg(flags)))
44
45 if 'Updator' not in kwargs:
46 from TrkConfig.TrkMeasurementUpdatorConfig import InDetUpdatorCfg
47 kwargs.setdefault("Updator", acc.popToolsAndMerge(InDetUpdatorCfg(flags)))
48
49 if 'LorentzAngleTool' not in kwargs:
50 from SiLorentzAngleTool.PixelLorentzAngleConfig import (
51 PixelLorentzAngleToolCfg)
52 kwargs.setdefault("LorentzAngleTool", acc.popToolsAndMerge(
53 PixelLorentzAngleToolCfg(flags)))
54
55 if 'ResidualPullCalculator' not in kwargs:
56 from TrkConfig.TrkResidualPullCalculatorConfig import (
57 ResidualPullCalculatorCfg)
58 kwargs.setdefault("ResidualPullCalculator", acc.addPublicTool(
59 acc.popToolsAndMerge(ResidualPullCalculatorCfg(flags))))
60
61 kwargs.setdefault("useTRT", flags.Detector.EnableTRT)
62
63 acc.addEventAlgo(CompFactory.InDetPhysHitDecoratorAlg(name, **kwargs))
64 return acc
65
66

◆ InDetPhysValTruthDecoratorAlgCfg()

InDetPhysValTruthDecoratorAlgCfg ( flags,
name = "InDetPhysValTruthDecoratorAlg",
** kwargs )
create decoration algorithm which decorates truth particles with track parameters at the perigee.

Definition at line 111 of file InDetPhysValDecorationConfig.py.

112 flags, name="InDetPhysValTruthDecoratorAlg", **kwargs):
113 '''
114 create decoration algorithm which decorates truth particles with track parameters at the perigee.
115 '''
116 acc = ComponentAccumulator()
117
118 from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
119 extrapolator = acc.popToolsAndMerge(AtlasExtrapolatorCfg(flags))
120 acc.addPublicTool(extrapolator) # TODO: migrate to private?
121 kwargs.setdefault("Extrapolator", extrapolator)
122
123 if flags.Detector.GeometryITk:
124 kwargs.setdefault("PixelClusterContainerName", "ITkPixelMeasurements")
125 kwargs.setdefault("SCTClusterContainerName", "ITkStripMeasurements")
126 else: # A temporary solution until we have ACTS Run 3 dedeicated one
127 kwargs.setdefault("PixelClusterContainerName", "PixelMeasurements")
128 kwargs.setdefault("SCTClusterContainerName", "SCT_Measurements")
129
130 kwargs.setdefault("decorateTime", flags.Reco.EnableHGTDExtension)
131
132 kwargs.setdefault('TruthParticleIndexDecoration',
133 'origTruthIndex' if flags.PhysVal.IDPVM.doTechnicalEfficiency else '')
134 kwargs.setdefault('UseTruthPVAsPerigee',
135 flags.Tracking.perigeeExpression is PerigeeExpression.Vertex)
136
137 acc.addEventAlgo(CompFactory.InDetPhysValTruthDecoratorAlg(name, **kwargs))
138 return acc
139
140

◆ ITkPhysHitDecoratorAlgCfg()

ITkPhysHitDecoratorAlgCfg ( flags,
name = "ITkPhysHitDecoratorAlg",
** kwargs )
create decoration algorithm which decorates track particles with the unbiased hit residuals and pulls.

Definition at line 67 of file InDetPhysValDecorationConfig.py.

67def ITkPhysHitDecoratorAlgCfg(flags, name="ITkPhysHitDecoratorAlg", **kwargs):
68 '''
69 create decoration algorithm which decorates track particles with the unbiased hit residuals and pulls.
70
71 '''
72 acc = ComponentAccumulator()
73
74 if 'InDetTrackHoleSearchTool' not in kwargs:
75 from InDetConfig.InDetTrackHoleSearchConfig import (
76 ITkTrackHoleSearchToolCfg)
77 kwargs.setdefault("InDetTrackHoleSearchTool", acc.popToolsAndMerge(
78 ITkTrackHoleSearchToolCfg(flags)))
79
80 if 'Updator' not in kwargs:
81 from TrkConfig.TrkMeasurementUpdatorConfig import ITkUpdatorCfg
82 kwargs.setdefault("Updator", acc.popToolsAndMerge(ITkUpdatorCfg(flags)))
83
84 if 'LorentzAngleTool' not in kwargs:
85 from SiLorentzAngleTool.ITkPixelLorentzAngleConfig import (
86 ITkPixelLorentzAngleToolCfg)
87 kwargs.setdefault("LorentzAngleTool", acc.popToolsAndMerge(
88 ITkPixelLorentzAngleToolCfg(flags)))
89
90 if 'ResidualPullCalculator' not in kwargs:
91 from TrkConfig.TrkResidualPullCalculatorConfig import (
92 ResidualPullCalculatorCfg)
93 kwargs.setdefault("ResidualPullCalculator", acc.addPublicTool(
94 acc.popToolsAndMerge(ResidualPullCalculatorCfg(flags))))
95
96 acc.addEventAlgo(CompFactory.InDetPhysHitDecoratorAlg(name, **kwargs))
97 return acc
98
99

◆ ParameterErrDecoratorAlgCfg()

ParameterErrDecoratorAlgCfg ( flags,
name = "ParameterErrDecoratorAlg",
** kwargs )
create decoration algorithm which decorates track particles with the uncertainties of the track parameters.

Definition at line 100 of file InDetPhysValDecorationConfig.py.

101 flags, name="ParameterErrDecoratorAlg", **kwargs):
102 '''
103 create decoration algorithm which decorates track particles with the uncertainties of the track parameters.
104 '''
105 kwargs.setdefault("TrackParticleContainerName", "InDetTrackParticles")
106 acc = ComponentAccumulator()
107 acc.addEventAlgo(CompFactory.ParameterErrDecoratorAlg(name, **kwargs))
108 return acc
109
110

◆ TrackDecoratorsCfg()

TrackDecoratorsCfg ( flags,
** kwargs )
Get track particle decorators needed for the InDetPhysValMonitoring tool

Definition at line 150 of file InDetPhysValDecorationConfig.py.

150def TrackDecoratorsCfg(flags, **kwargs):
151 '''
152 Get track particle decorators needed for the InDetPhysValMonitoring tool
153 '''
154 acc = ComponentAccumulator()
155
156 if "CombinedInDetTracks" in flags.Input.Collections:
157 acc.merge(InDetPhysHitDecoratorAlgCfg(flags, **kwargs))
158
159 acc.merge(ParameterErrDecoratorAlgCfg(flags, **kwargs))
160
161 return acc
162
163

◆ TruthClassDecoratorAlgCfg()

TruthClassDecoratorAlgCfg ( flags,
name = "TruthClassDecoratorAlg",
** kwargs )
create decoration algorithm which decorates truth particles with origin and type from truth classifier.

Definition at line 141 of file InDetPhysValDecorationConfig.py.

141def TruthClassDecoratorAlgCfg(flags, name="TruthClassDecoratorAlg", **kwargs):
142 '''
143 create decoration algorithm which decorates truth particles with origin and type from truth classifier.
144 '''
145 acc = ComponentAccumulator()
146 acc.addEventAlgo(CompFactory.TruthClassDecoratorAlg(name, **kwargs))
147 return acc
148
149