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()

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

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

◆ AddDecoratorIfNeededCfg()

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

Definition at line 200 of file InDetPhysValDecorationConfig.py.

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

◆ AddGSFTrackDecoratorAlgCfg()

InDetPhysValDecorationConfig.AddGSFTrackDecoratorAlgCfg ( flags,
** kwargs )

Definition at line 188 of file InDetPhysValDecorationConfig.py.

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

◆ canAddDecorator()

InDetPhysValDecorationConfig.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()

InDetPhysValDecorationConfig.GSFTrackDecoratorsCfg ( flags,
** kwargs )

Definition at line 160 of file InDetPhysValDecorationConfig.py.

160def GSFTrackDecoratorsCfg(flags, **kwargs):
161 kwargs.setdefault("TrackParticleContainerName", "GSFTrackParticles")
162 return TrackDecoratorsCfg(flags, **kwargs)
163
164

◆ InDetPhysHitDecoratorAlgCfg()

InDetPhysValDecorationConfig.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()

InDetPhysValDecorationConfig.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('TruthParticleIndexDecoration',
131 'origTruthIndex' if flags.PhysVal.IDPVM.doTechnicalEfficiency else '')
132
133 acc.addEventAlgo(CompFactory.InDetPhysValTruthDecoratorAlg(name, **kwargs))
134 return acc
135
136

◆ ITkPhysHitDecoratorAlgCfg()

InDetPhysValDecorationConfig.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()

InDetPhysValDecorationConfig.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()

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

Definition at line 146 of file InDetPhysValDecorationConfig.py.

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

◆ TruthClassDecoratorAlgCfg()

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

Definition at line 137 of file InDetPhysValDecorationConfig.py.

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