4 from D3PDMakerCoreComps.D3PDObject
import make_SGDataVector_D3PDObject
5 from D3PDMakerCoreComps.SimpleAssociation
import SimpleAssociation
6 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
7 from AthenaConfiguration.ComponentFactory
import CompFactory
9 D3PD = CompFactory.D3PD
13 make_SGDataVector_D3PDObject (
'DataVector<xAOD::Muon_v1>',
14 D3PDMakerFlags.MuonSGKey,
15 'mu_',
'MuonD3PDObject')
17 MuonD3PDObject.defineBlock (0,
'Kinematics',
22 MuonD3PDObject.defineBlock (
25 Vars = [
'allauthor = allAuthors'])
27 MuonD3PDObject.defineBlock (
31 MuonD3PDObject.defineBlock (1,
'NumberOfSegments',
34 MuonD3PDObject.defineBlock (
37 Vars = [
'etcone20 < float: 0',
38 'etcone30 < float: 0',
39 'etcone40 < float: 0',
40 'ptcone20 < float: 0',
41 'ptcone30 < float: 0',
42 'ptcone40 < float: 0',
43 'scatteringCurvatureSignificance < float: 0',
44 'scatteringNeighbourSignificance < float: 0',
45 'momentumBalanceSignificance < float: 0'])
47 MuonD3PDObject.defineBlock (
50 Vars = [
'energyLossType'])
51 MuonD3PDObject.defineBlock (
56 MuonD3PDObject.defineBlock (2,
'MuonHitSummary',
59 MuonD3PDObject.defineBlock (
60 2,
'MuonSpectrometerHitSummary',
62 Vars = [
'primarySector',
98 MuonD3PDObject.defineBlock (
99 4,
'MuonSpectrometerFieldIntegral',
101 Vars = [
'MSFieldIntegral = spectrometerFieldIntegral < float: 0'])
109 MuonTPAssoc = SimpleAssociation \
112 matched =
'hastrack',
113 blockname =
'TrkInfo')
114 MuonTPAssoc.defineBlock (
118 TrackParticlePerigeeAssoc = SimpleAssociation \
123 blockname =
'TrackParticlePerigeeAssoc')
124 TrackParticlePerigeeAssoc.defineBlock (1,
'TrkParameters',
128 TrackParticleCovarAssoc = SimpleAssociation (TrackParticlePerigeeAssoc,
131 blockname =
'TrackParticleCovarAssoc')
132 TrackParticleCovarAssoc.defineBlock (1,
'TrkCovDiag',
135 IsTrackPerigee =
True,
137 DiagCovariance =
True)
138 TrackParticleCovarAssoc.defineBlock (2,
'TrkCovOffDiag',
141 IsTrackPerigee =
True,
143 OffDiagCovariance =
True)
145 MuonTPAssoc.defineBlock (
148 Vars = [
'chi2 = chiSquared',
153 MuonIDTPAssoc = SimpleAssociation \
156 blockname =
'TrkInfoInDet',
159 if not D3PDMakerFlags.Muons.doSingleMuons:
164 from TrackD3PDMaker.TrackParticleImpactParameters \
165 import TrackParticleImpactParameters
166 TrackParticleImpactParameters (MuonIDTPAssoc)
169 MuonPVPerigeeAssoc = SimpleAssociation (
174 blockname =
'MuonPVPerigeeAssoc')
176 from TrackToVertex.TrackToVertexConfig
import InDetTrackToVertexCfg
177 c.Associator.TrackToVertexTool = acc.popToolsAndMerge (InDetTrackToVertexCfg (flags))
179 MuonPVPerigeeAssoc.defineHook (_trackToVertexHook)
180 MuonPVPerigeeAssoc.defineBlock (
184 MuonPVCovarAssoc = SimpleAssociation (
188 blockname =
'MuonPVCovarAssoc')
189 MuonPVCovarAssoc.defineBlock (
190 1,
'PrimaryTrackDiagonalCovarianceAtPV',
193 IsTrackPerigee =
True,
195 MuonPVCovarAssoc.defineBlock (
196 1,
'PrimaryTrackOffDiagonalCovarianceAtPV',
199 IsTrackPerigee =
True,
201 OffDiagCovariance =
True)
203 MuonCBTPAssoc = SimpleAssociation \
208 blockname =
'CBTrkInfo')
209 MuonCBPVPerigeeAssoc = SimpleAssociation (
214 blockname =
'MuonCBPVPerigeeAssoc')
215 MuonCBPVPerigeeAssoc.defineHook (_trackToVertexHook)
216 MuonCBPVPerigeeAssoc.defineBlock (
217 1,
'CBParametersAtPV',
221 MuonIDTPAssoc = SimpleAssociation \
226 blockname =
'IDTrkInfo')
227 MuonIDPerigeeAssoc = SimpleAssociation (
231 blockname =
'MuonIDPerigeeAssoc')
232 MuonIDPerigeeAssoc.defineBlock (
236 MuonIDPVPerigeeAssoc = SimpleAssociation (
241 blockname =
'MuonIDPVPerigeeAssoc')
242 MuonIDPVPerigeeAssoc.defineHook (_trackToVertexHook)
243 MuonIDPVPerigeeAssoc.defineBlock (
244 1,
'IDParametersAtPV',
248 MuonIDPVCovarAssoc = SimpleAssociation (
249 MuonIDPVPerigeeAssoc,
252 blockname =
'MuonIDPVCovarAssoc')
253 MuonIDPVCovarAssoc.defineBlock (
254 2,
'IDTrackDiagonalCovarianceAtPV',
257 IsTrackPerigee =
True,
259 MuonIDPVCovarAssoc.defineBlock (
260 3,
'IDTrackOffDiagonalCovarianceAtPV',
263 IsTrackPerigee =
True,
265 OffDiagCovariance =
True)
268 MuonMETPAssoc = SimpleAssociation \
271 Type =
'MuonSpectrometer',
273 blockname =
'METrkInfo')
274 MuonMEPerigeeAssoc = SimpleAssociation (
278 MuonMEPerigeeAssoc.defineBlock (
282 MuonMEPVPerigeeAssoc = SimpleAssociation (
287 blockname =
'MuonMEPVPerigeeAssoc')
288 MuonMEPVPerigeeAssoc.defineHook (_trackToVertexHook)
289 MuonMEPVPerigeeAssoc.defineBlock (
290 1,
'MEParametersAtPV',
294 MuonMEPVCovarAssoc = SimpleAssociation (
295 MuonMEPVPerigeeAssoc,
298 blockname =
'MuonMEPVCovarAssoc')
299 MuonMEPVCovarAssoc.defineBlock (
300 2,
'METrackDiagonalCovarianceAtPV',
303 IsTrackPerigee =
True,
305 MuonMEPVCovarAssoc.defineBlock (
306 3,
'METrackOffDiagonalCovarianceAtPV',
309 IsTrackPerigee =
True,
311 OffDiagCovariance =
True)
317 if D3PDMakerFlags.DoTruth:
318 truthClassification = \
319 MuonD3PDObject.defineBlock (1,
'TruthClassification',
322 from TruthD3PDMaker.MCTruthClassifierConfig \
323 import D3PDMCTruthClassifierCfg
324 acc.merge (D3PDMCTruthClassifierCfg (flags))
325 c.Classifier = acc.getPublicTool (
'D3PDMCTruthClassifier')
327 truthClassification.defineHook (_truthClassificationHook)
329 MuonTruthPartAssoc = SimpleAssociation \
332 blockname =
'TruthAssoc',
335 from TruthD3PDMaker.MCTruthClassifierConfig \
336 import D3PDMCTruthClassifierCfg
337 acc.merge (D3PDMCTruthClassifierCfg (flags))
338 c.Associator.Classifier = acc.getPublicTool (
'D3PDMCTruthClassifier')
340 MuonTruthPartAssoc.defineHook (_truthClassificationAssocHook)
341 MuonTruthPartAssoc.defineBlock (0,
'TruthKin',
346 MuonTruthPartAssoc.defineBlock (0,
'Truth',
348 PDGIDVariable =
'type',
350 MuonTruthPartMotherAssoc = SimpleAssociation \
355 (
'MuonTruthPartMotherAssoc2'),
356 blockname =
'MuonTruthPartMotherAssoc',
357 prefix =
'truth_mother')
358 MuonTruthPartMotherAssoc.defineBlock (0,
'MotherTruth',
361 PDGIDVariable =
'type')
362 MuonTruthPartAssoc.defineBlock (0,
'TruthAssocIndex',