21 pvunbiased_suffix = 'pvunbiased'):
22 """Add to a D3PD object blocks filling in impact parameter information.
23
24TPD3PDObject should be a D3PD object for a TrackParticle
25(could be an association). This will add information for impact
26parameters with respect to the beam spot and the primary vertex,
27and the unbiased impact parameter with respect to the primary vertex.
28The variable names are constructed using the prefix and *_suffix
29arguments."""
30
31
32
33
34
35 BSPerigeeAssoc = SimpleAssociation \
36 (TPD3PDObject,
38 blockname = prefix + 'BSPerigeeAssoc',
39 prefix = prefix)
40 def _trackToVertexHook (c, flags, acc, prefix, *args, **kw):
41 from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
42 acc.merge(BeamSpotCondAlgCfg(flags))
43 from TrackToVertex.TrackToVertexConfig import InDetTrackToVertexCfg
44 c.Associator.TrackToVertexTool = acc.popToolsAndMerge (InDetTrackToVertexCfg (flags))
45 return
46 BSPerigeeAssoc.defineHook (_trackToVertexHook)
47 BSPerigeeAssoc.defineBlock (1, prefix + 'Impact' + beam_suffix,
49 FillThetaAndQoverP = False,
50 FillPhi = False,
51 Suffix = beam_suffix,
52 DefaultValue = -9999)
53 BSCovarAssoc = SimpleAssociation \
54 (BSPerigeeAssoc,
56 blockname = prefix + 'BSPerigeeCovarAssoc')
57 BSCovarAssoc.defineBlock (1, prefix + 'ImpactSig' + beam_suffix,
59 Suffix = beam_suffix)
60
61
62
63
64 PVPerigeeAssoc = SimpleAssociation \
65 (TPD3PDObject,
67 blockname = prefix + 'PVPerigeeAssoc',
68 prefix = prefix)
69 PVPerigeeAssoc.defineHook (_trackToVertexHook)
70 PVPerigeeAssoc.defineBlock (1, prefix + 'Impact' + pv_suffix,
72 FillThetaAndQoverP = False,
73 FillPhi = False,
74 Suffix = pv_suffix,
75 DefaultValue = -9999)
76 PVCovarAssoc = SimpleAssociation \
77 (PVPerigeeAssoc,
79 blockname = prefix + 'PVPerigeeCovarAssoc')
80 PVCovarAssoc.defineBlock (1, prefix + 'ImpactSig' + pv_suffix,
82 Suffix = pv_suffix)
83
Associate from a VxCandidate to its perigee at the beam spot.
Associate from a VxCandidate to its perigee at primary vertex.