ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking
TrkEvent
VxVertex
VxVertex
PrimaryVertexSelector.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// PrimaryVertexSelector, (c) ATLAS Detector software
8
9
#ifndef TRKEVENTUTILS_PRIMARYVERTEXSELECTOR_H
10
#define TRKEVENTUTILS_PRIMARYVERTEXSELECTOR_H
11
12
//Trk
13
#include "
VxVertex/VxContainer.h
"
14
#include "
VxVertex/VxCandidate.h
"
15
19
20
inline
const
Trk::VxCandidate
*
PrimaryVertexSelector
(
const
VxContainer
& vxContainer){
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
}
34
35
#endif
36
37
PrimaryVertexSelector
const Trk::VxCandidate * PrimaryVertexSelector(const VxContainer &vxContainer)
Simple Global Function to wrap around the VxCandidate container.
Definition
PrimaryVertexSelector.h:20
VxCandidate.h
VxContainer.h
Trk::VxCandidate
Definition
VxCandidate.h:27
VxContainer
Definition
VxContainer.h:28
Trk::PriVtx
@ PriVtx
Primary Vertex.
Definition
VertexType.h:27
Generated on
for ATLAS Offline Software by
1.14.0