ATLAS Offline Software
Loading...
Searching...
No Matches
VertexView.h File Reference
#include <vector>
#include <cstdint>
#include <iostream>
#include <typeinfo>
#include "VertexTraits.h"
Include dependency graph for VertexView.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VertexView
 Type-erased view on a generic vertex class - implementation won't bother with any VertexTraits at the moment, since the only functions where the xAOD::TruthVertex and xAOD::Vertex have any overlap are the x(), y() and z(), and they have the same name, so there is literally no point at the moment. More...
struct  VertexView::VTable

Functions

std::ostream & operator<< (std::ostream &s, const VertexView &v)
bool dummyVertex (const VertexView &v)
 annoying that they always include this "dummy" vertex ...
template<typename T>
std::vector< VertexView > makevertexview (const std::vector< const T * > &v)
template<typename T>
std::vector< VertexView > makevertexview (const std::vector< T * > &v)
template<typename T>
std::vector< VertexView > makevertexview (const std::vector< T > &v)
template<typename T>
std::vector< VertexView > makevertexview (typename T::const_iterator ibegin, typename T::const_iterator iend)

Detailed Description

Author
sutt
Date
Sat 20 Jun 2026 08:48:40 BST
Id
VertexView.h, v0.0 Sat 20 Jun 2026 08:48:40 BST sutt

Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration

Definition in file VertexView.h.

Function Documentation

◆ dummyVertex()

bool dummyVertex ( const VertexView & v)
inline

annoying that they always include this "dummy" vertex ...

Definition at line 177 of file VertexView.h.

177{ return v.vertexType()==0; }

◆ makevertexview() [1/4]

template<typename T>
std::vector< VertexView > makevertexview ( const std::vector< const T * > & v)

remove the "dummy" vertices

Definition at line 181 of file VertexView.h.

181 {
182 std::vector<VertexView> tv( v.begin(), v.end() );
184 tv.erase( std::remove_if(tv.begin(), tv.end(), dummyVertex ), tv.end());
185 return tv;
186}
bool dummyVertex(const VertexView &v)
annoying that they always include this "dummy" vertex ...
Definition VertexView.h:177
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.

◆ makevertexview() [2/4]

template<typename T>
std::vector< VertexView > makevertexview ( const std::vector< T * > & v)

remove the "dummy" vertices

Definition at line 189 of file VertexView.h.

189 {
190 std::vector<VertexView> tv( v.begin(), v.end() );
192 tv.erase( std::remove_if(tv.begin(), tv.end(), dummyVertex ), tv.end());
193 return tv;
194}

◆ makevertexview() [3/4]

template<typename T>
std::vector< VertexView > makevertexview ( const std::vector< T > & v)

Definition at line 197 of file VertexView.h.

197 {
198 std::vector<VertexView> tv( v.begin(), v.end() );
199 tv.erase( std::remove_if(tv.begin(), tv.end(), dummyVertex ), tv.end());
200 return tv;
201}

◆ makevertexview() [4/4]

template<typename T>
std::vector< VertexView > makevertexview ( typename T::const_iterator ibegin,
typename T::const_iterator iend )

Definition at line 205 of file VertexView.h.

205 {
206 std::vector<VertexView> tv( ibegin, iend );
207 tv.erase( std::remove_if(tv.begin(), tv.end(), dummyVertex), tv.end());
208 return tv;
209}

◆ operator<<()

std::ostream & operator<< ( std::ostream & s,
const VertexView & v )
inline

Definition at line 164 of file VertexView.h.

164 {
165 s << "[ x=" << v.x()
166 << "\ty=" << v.y()
167 << "\tz=" << v.z()
168 << "\tntracks= " << v.nTrackParticles()
169 << "\ttype=" << v.vertexType()
170 << "\t : ptr=" << v.ptr()
171 << " ]";
172 return s;
173}