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 168 of file InDetPhysValDecorationConfig.py.

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

◆ AddDecoratorIfNeededCfg()

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

Definition at line 203 of file InDetPhysValDecorationConfig.py.

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

◆ AddGSFTrackDecoratorAlgCfg()

AddGSFTrackDecoratorAlgCfg ( flags,
** kwargs )

Definition at line 191 of file InDetPhysValDecorationConfig.py.

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

◆ 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 163 of file InDetPhysValDecorationConfig.py.

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

◆ 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', flags.Tracking.perigeeExpression=="Vertex")
135
136 acc.addEventAlgo(CompFactory.InDetPhysValTruthDecoratorAlg(name, **kwargs))
137 return acc
138
139

◆ 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 149 of file InDetPhysValDecorationConfig.py.

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

◆ TruthClassDecoratorAlgCfg()

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

Definition at line 140 of file InDetPhysValDecorationConfig.py.

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