#include <VertexNewMatcher.h>
|
| std::map< int, int > | matcher (const std::vector< Tp * > &ref, const std::vector< Tq * > &test) |
Definition at line 22 of file VertexNewMatcher.h.
◆ map_type
◆ rmap_type
◆ VertexNewMatcher()
| VertexNewMatcher::VertexNewMatcher |
( |
const std::string & | s, |
|
|
double | d = 0.5 ) |
|
inline |
◆ ~VertexNewMatcher()
| VertexNewMatcher::~VertexNewMatcher |
( |
| ) |
|
|
inline |
◆ clear()
◆ clone()
◆ distance()
Implements BestMatcher< TIDA::Vertex >.
Definition at line 32 of file VertexNewMatcher.h.
32 {
33
34
35 const std::vector<TIDA::Track*>& refTracks=
v0->tracks();
36 const std::vector<TIDA::Track*>& testTracks = v1->
tracks();
37
38
39 Associator_DeltaRMatcher track_matcher( "track_matcher", 0.05 );
40 track_matcher.match( refTracks, testTracks );
41
42 double n_matches = (
double)track_matcher.size();
43 double eff = n_matches/refTracks.size();
44
45
46 return (1-eff)*(1-
eff);
47 };
const std::vector< TIDA::Track * > & tracks() const
◆ match() [1/2]
◆ match() [2/2]
◆ matched()
◆ matcher()
inserting into a multimatch sorts them into order as they are added so you get the list of best matches imediately NB: probably quicker to add them to a vector and then sort them afterward
now go through from best to worst, adding to another sorted set only the matches that do not use tracks already used by a better matching pair already found
set of unique track pairings NB: for some reason, using the multiset is faster than using a vector, even though we are only iterating through it later
hooray!! now print out the answer, make a map etc this isn't technically needed, could just use the set of "matched" objects, but hey ho
Definition at line 91 of file BestMatcher.h.
91 {
92
98
100
101 for (
unsigned int i=0 ;
i<
ref.
size() ;
i++ ) {
102
106 m.insert( matched_(
d,
i,
j) );
107 }
108 }
109 }
110
114
117
123
125
127
129
132
135
138
140
142
143 }
144
145
146
147
151
152
153
155
156
160
162 }
163
165
166 }
virtual double distance(const TIDA::Vertex *t0, const TIDA::Vertex *t1) const=0
◆ revmatched()
◆ size()
◆ m_d
◆ mmatched
◆ mname
◆ mrevmatched
The documentation for this class was generated from the following file: