11from D3PDMakerCoreComps.D3PDObject
import make_SGDataVector_D3PDObject
12from D3PDMakerCoreComps.SimpleAssociation
import SimpleAssociation
13from TruthD3PDMaker.TruthParticleChildAssociation
import TruthParticleChildAssociation
14from TruthD3PDMaker.TruthParticleParentAssociation
import TruthParticleParentAssociation
15from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
16from AthenaConfiguration.ComponentFactory
import CompFactory
18D3PD = CompFactory.D3PD
21TruthParticleD3PDObject = make_SGDataVector_D3PDObject \
22 (
'DataVector<xAOD::TruthParticle_v1>',
23 D3PDMakerFlags.TruthParticlesSGKey,
25 'TruthParticleD3PDObject')
27TruthParticleD3PDObject.defineBlock (0,
'TruthKin',
30TruthParticleD3PDObject.defineBlock (0,
'TruthInfo',
33ProdVertexAssoc = SimpleAssociation \
34 (TruthParticleD3PDObject,
38 blockname =
'ProdVert')
39ProdVertexAssoc.defineBlock (
42 Vars = [
'x',
'y',
'z',
'uid'])
45ChildAssoc = TruthParticleChildAssociation(
46 parent = TruthParticleD3PDObject,
52 indexer = c.BlockFillers[0]
53 indexer.Target = parent_prefix
55ChildAssoc.defineHook(_TruthParticleAssocHook)
57ParentAssoc = TruthParticleParentAssociation(
58 parent = TruthParticleD3PDObject,
62ParentAssoc.defineHook(_TruthParticleAssocHook)
Associate from a TruthParticle to its GenVertex production vertex.
_TruthParticleAssocHook(c, flags, acc, *args, parent_prefix=None, **kw)