The Vertex Collection
Contents
The Vertex Collection¶
The PrimaryVertex
collection contains a list of all the primary vertices in the event. The first one is the Tracking group’s pick for the primary vertex.
import matplotlib.pyplot as plt
from config import ds_zee as ds
Here we fetch all the primary vertices’s in an event, their location and how many tracks are attached to them. Just as in the previous chapter, we need to specify the bank name:
vertices = (ds
.SelectMany(lambda e: e.Vertices("PrimaryVertices"))
.Select(lambda v:
{
"x": v.x(),
"y": v.y(),
"z": v.z(),
"n": v.nTrackParticles()
})
.AsAwkwardArray()
.value())
plt.hist(vertices.n, bins=50, range=(0, 100))
plt.xlabel('Number of tracks in each vertex')
plt.ylabel('Number of Vertices')
_ = plt.title('Number of tracks in each vertex for $Z\\rightarrow ee$ events')
plt.scatter(vertices.x, vertices.y)
plt.xlabel('$v_x$ [mm]')
plt.ylabel("$v_y$ [mm]")
_ = plt.title('Vertex position for $Z\\rightarrow ee$ events')
At the Tevatron you could see the beam tilt. No so much here at the LHC!
plt.scatter(vertices.z, vertices.y)
plt.xlabel('$v_z$ [mm]')
plt.ylabel("$v_y$ [mm]")
_ = plt.title('Vertex position for $Z\\rightarrow ee$ events')
Normally one wants only the primary vertex - which in ATLAS is the first vertex in the collection.
pvs = (ds
.Select(lambda e: e.Vertices("PrimaryVertices").First())
.Select(lambda v:
{
"x": v.x(),
"y": v.y(),
"z": v.z(),
"n": v.nTrackParticles(),
})
.AsAwkwardArray()
.value())
plt.hist(pvs.n, bins=50, range=(0, 100))
plt.xlabel('Number of tracks in each primary vertex')
plt.ylabel('Number of Vertices')
_ = plt.title('Number of tracks in each PV for $Z\\rightarrow ee$ events')
plt.scatter(pvs.x, pvs.y)
plt.xlabel('$v_x$ [mm]')
plt.ylabel("$v_y$ [mm]")
_ = plt.title('Primary Vertex position for $Z\\rightarrow ee$ events')
Note that the wings are gone now in the tilt plot, and the hight is more compressed. The wings were likely beam-gas interactions or similar.
plt.scatter(pvs.z, pvs.y)
plt.xlabel('$v_z$ [mm]')
plt.ylabel("$v_y$ [mm]")
_ = plt.title('Vertex position for $Z\\rightarrow ee$ events')
The Datamodel¶
The data model when this documentation was last built was:
from func_adl_servicex_xaodr21.xAOD.trackparticle_v1 import TrackParticle_v1
help(TrackParticle_v1)
Help on class TrackParticle_v1 in module func_adl_servicex_xaodr21.xAOD.trackparticle_v1:
class TrackParticle_v1(builtins.object)
| A class
|
| Methods defined here:
|
| beamlineTiltX(self) -> 'float'
| A method
|
| beamlineTiltY(self) -> 'float'
| A method
|
| charge(self) -> 'float'
| A method
|
| chiSquared(self) -> 'float'
| A method
|
| clearDecorations(self) -> 'bool'
| A method
|
| d0(self) -> 'float'
| A method
|
| definingParametersCovMatrixVec(self) -> 'func_adl_servicex_xaodr21.vector_float_.vector_float_'
| A method
|
| e(self) -> 'float'
| A method
|
| eta(self) -> 'float'
| A method
|
| hasNonConstStore(self) -> 'bool'
| A method
|
| hasStore(self) -> 'bool'
| A method
|
| hitPattern(self) -> 'int'
| A method
|
| index(self) -> 'int'
| A method
|
| m(self) -> 'float'
| A method
|
| numberDoF(self) -> 'float'
| A method
|
| numberOfParameters(self) -> 'int'
| A method
|
| p4(self) -> 'func_adl_servicex_xaodr21.tlorentzvector.TLorentzVector'
| A method
|
| parameterPX(self, index: 'int') -> 'float'
| A method
|
| parameterPY(self, index: 'int') -> 'float'
| A method
|
| parameterPZ(self, index: 'int') -> 'float'
| A method
|
| parameterX(self, index: 'int') -> 'float'
| A method
|
| parameterY(self, index: 'int') -> 'float'
| A method
|
| parameterZ(self, index: 'int') -> 'float'
| A method
|
| phi(self) -> 'float'
| A method
|
| phi0(self) -> 'float'
| A method
|
| pt(self) -> 'float'
| A method
|
| qOverP(self) -> 'float'
| A method
|
| radiusOfFirstHit(self) -> 'float'
| A method
|
| rapidity(self) -> 'float'
| A method
|
| theta(self) -> 'float'
| A method
|
| usingPrivateStore(self) -> 'bool'
| A method
|
| usingStandaloneStore(self) -> 'bool'
| A method
|
| vertex(self) -> 'func_adl_servicex_xaodr21.xAOD.vertex_v1.Vertex_v1'
| A method
|
| vertexLink(self) -> 'func_adl_servicex_xaodr21.elementlink_datavector_xaod_vertex_v1__.ElementLink_DataVector_xAOD_Vertex_v1__'
| A method
|
| vx(self) -> 'float'
| A method
|
| vy(self) -> 'float'
| A method
|
| vz(self) -> 'float'
| A method
|
| z0(self) -> 'float'
| A method
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| auxdataConst
| A method
|
| isAvailable
| A method
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
Further Information¶
The
xAOD::TrackParticle_v1
C++ header file with all the inline documentation.The Tracking CP group R21 recommendation pages on the ATLAS TWiki