29 unsigned short nSpacePointTrackCandidates) :
38 std::vector <std::vector<unsigned short> >
getOverlapMatrix(
unsigned allowedOverlaps = 0)
43 for (
unsigned short ii = 0; ii < tracks.size(); ii++) {
44 for (
unsigned short jj = ii + 1; jj < tracks.size(); jj++) {
55 if (allowedOverlaps) {
56 std::vector <unsigned short> overlapChache;
59 std::sort(overlapTracks.begin(), overlapTracks.end());
61 auto endIter = overlapTracks.end();
62 auto cacheIter = overlapTracks.begin();
63 for (
auto iter = overlapTracks.begin(); iter != endIter; iter++) {
64 if (*iter != *cacheIter) {
66 }
else if (iter - cacheIter == allowedOverlaps) {
67 overlapChache.push_back(*iter);
70 overlapTracks = overlapChache;
71 overlapChache.clear();
80 std::sort(overlapTracks.begin(), overlapTracks.end());
81 overlapTracks.erase(std::unique(overlapTracks.begin(), overlapTracks.end()), overlapTracks.end());
Creates a vector of vectors, that knows which track is conflicting with which other.
std::vector< std::vector< unsigned short > > const & m_hitRelatedTracks
Input information, see constructor.
std::vector< std::vector< unsigned short > > getOverlapMatrix(unsigned allowedOverlaps=0)
Fills and returns the overlap matrix.
OverlapMatrixCreator(std::vector< std::vector< unsigned short > > const &hitRelatedTracks, unsigned short nSpacePointTrackCandidates)
Constructor taking information necessary to perform algorithm.
std::vector< std::vector< unsigned short > > m_overlapMatrix
Output information, see getOverlapMatrix.
Abstract base class for different kinds of events.