17 {
18
19 std::vector<TIDA::Vertex> vertices;
20
22
23 for ( ; vtxitr != xAODVertices->
end(); ++vtxitr ) {
24
25 if ( require_tracks && (*vtxitr)->nTrackParticles()==0 ) continue;
26
27 if ( (*vtxitr)->vertexType()!=0 || useType0 ) {
29
30 if ( trackCollection ) {
31 std::vector< unsigned long > trackIds;
32
33 const std::vector< ElementLink< xAOD::TrackParticleContainer > >& xAODtracks = (*vtxitr)->trackParticleLinks();
34
35 for ( const auto& track : xAODtracks ) {
36 unsigned long id = 0;
38 trackIds.push_back( id );
39 }
40
41 vertex.selectTracks( *trackCollection, trackIds );
42 }
43
44 vertices.push_back( vertex );
45 }
46 }
47
48 return vertices;
49}
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
static TIDA::Vertex selectVertex(const xAOD::Vertex *v)
static unsigned long getTrackId(const xAOD::TrackParticle *track)