|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef TRIGTOOLS_TRIG_VSI_IWRKVTX
5 #define TRIGTOOLS_TRIG_VSI_IWRKVTX
20 #include <unordered_set>
39 virtual double x()
const = 0;
40 virtual double y()
const = 0;
41 virtual double z()
const = 0;
55 template<
typename WrkVrt>
116 template<
typename WrkVrt>
120 m_selTrkIndices.clear();
121 m_compIndices.clear();
122 for (
const WrkVrt* vrt : m_vtxLists) {
123 m_selTrkIndices.emplace( vrt->selectedTrackIndices().at(0) );
124 m_selTrkIndices.emplace( vrt->selectedTrackIndices().at(1) );
125 std::pair<size_t, size_t> p_tmp_ = std::minmax( vrt->selectedTrackIndices().at(0),vrt->selectedTrackIndices().at(1) );
126 m_compIndices.emplace( std::move(p_tmp_) );
130 m_incompIndices.clear();
131 for (
auto i_itr = m_selTrkIndices.begin(); i_itr != m_selTrkIndices.end(); ++i_itr ) {
132 for (
auto j_itr =
std::next(i_itr); j_itr != m_selTrkIndices.end(); ++j_itr ) {
133 std::pair<size_t, size_t> p_tmp_ = std::minmax(*i_itr,*j_itr);
134 auto tmp_itr =
std::find(m_compIndices.begin(), m_compIndices.end(), p_tmp_ );
135 if ( tmp_itr != m_compIndices.end() )
continue;
136 m_incompIndices.emplace_back( std::make_pair(*i_itr, *j_itr) );
std::unordered_set< size_t > m_selTrkIndices
std::vector< std::pair< size_t, size_t > > getIncompIndices()
Return copy of incompatible track pair list.
void emplace_back(const WrkVrt *vtx_ptr)
Emplace vertex pointer to vertex list.
std::string find(const std::string &s)
return a remapped string
Base class of local vertex container in VtxMap.
virtual double x() const =0
std::vector< std::pair< size_t, size_t > > m_incompIndices
std::unordered_set< std::pair< size_t, size_t >, PairHash< size_t, size_t > > m_compIndices
const std::vector< std::pair< size_t, size_t > > & incompIndices()
Return reference to incompatible track pair list.
std::vector< const WrkVrt * > getVtxList()
Return a copy of vertex list.
size_t nVtx()
Return the number of vertices.
double getWeight()
Return the weight of the container.
void checkUpdate()
Check if lists are up to date. If not, update them.
virtual const std::deque< size_t > & selectedTrackIndices() const =0
Return indices of tracks associated with the vertex.
const WrkVrt * getVtx(size_t ivtx)
Return a copy of i-th vertex.
virtual double z() const =0
const std::unordered_set< size_t > & selectedTrackIndices()
Return reference to selected track indices list.
VtxPack(std::vector< const WrkVrt * > &&v)
virtual ~IWrkVrt()=default
const std::vector< const WrkVrt * > & vtxList()
Return a reference to vertex list.
std::unordered_set< size_t > getSelectedTrackIndices()
virtual double y() const =0
virtual std::deque< size_t > & selectedTrackIndices()=0
Return indices of tracks associated with the vertex.
std::vector< const WrkVrt * > m_vtxLists
point classes for clustering
void updateLists()
Update set of tracks and incompatible track pair list.
Interface for vertex classes processed in VtxMap.
VtxPack(std::vector< const WrkVrt * > &v)
Constructor.