ATLAS Offline Software
Loading...
Searching...
No Matches
PrimaryVertexSelector.h File Reference
Include dependency graph for PrimaryVertexSelector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const Trk::VxCandidatePrimaryVertexSelector (const VxContainer &vxContainer)
 Simple Global Function to wrap around the VxCandidate container.

Function Documentation

◆ PrimaryVertexSelector()

const Trk::VxCandidate * PrimaryVertexSelector ( const VxContainer & vxContainer)
inline

Simple Global Function to wrap around the VxCandidate container.

Author
Andreas.Salzburger -at- cern.ch

Definition at line 20 of file PrimaryVertexSelector.h.

20 {
21 // the return vertex
22 const Trk::VxCandidate* primaryVxCandidate = 0;
23 // simple loop through and get the primary vertex
24 for (const Trk::VxCandidate* vtx : vxContainer) {
25 // the first and only primary vertex candidate is picked
26 if ( vtx->vertexType() == Trk::PriVtx){
27 primaryVxCandidate = vtx;
28 break;
29 }
30 }
31 // return what you have - users need to check
32 return primaryVxCandidate;
33}
@ PriVtx
Primary Vertex.
Definition VertexType.h:27