|
ATLAS Offline Software
|
Go to the documentation of this file.
28 template<
typename T,
typename S=T>
42 double d()
const {
return m_d; }
68 virtual void match(
const std::vector<T*>&
ref,
const std::vector<S*>&
test )
90 template<
typename Tp,
typename Tq>
91 std::map<int, int>
matcher(
const std::vector<Tp*>&
ref,
const std::vector<Tq*>&
test) {
99 std::multiset<matched_>
m;
101 for (
unsigned int i=0 ;
i<
ref.size() ;
i++ ) {
103 for (
unsigned int j=0 ; j<
test.size() ; j++ ) {
106 m.insert( matched_(
d,
i, j) );
115 std::vector<bool> refused(
ref.size(),
false );
116 std::vector<bool> testused(
test.size(),
false );
122 std::multiset<matched_> unique;
128 for ( ; mitr!=
m.end() ; ++mitr ) {
130 int rind = mitr->first();
131 int tind = mitr->second();
133 if ( refused[rind] )
continue;
134 if ( testused[tind] )
continue;
136 refused[rind] =
true;
137 testused[tind] =
true;
139 unique.insert( *mitr );
141 chi2 += (mitr->d()*mitr->d());
154 std::map<int, int> matches;
157 mitr = unique.begin();
158 while ( mitr!=unique.end() ) {
159 matches.insert( std::map<int, int>::value_type( mitr->first(), mitr->second() ) );
JetConstituentVector::iterator iterator
std::pair< int, int > m_match
const map_type & matched() const
bool operator<(const matched_ &a) const
std::vector< ALFA_RawData_p1 > t0
std::vector< ALFA_RawDataCollection_p1 > t1
virtual void match(const std::vector< T * > &ref, const std::vector< S * > &test)
internal class to store the matching paramter for a pair, and in the indices of the pair
std::map< int, int > matcher(const std::vector< Tp * > &ref, const std::vector< Tq * > &test)
virtual double distance(const T *t0, const S *t1) const =0
BestMatcher(const std::string &name, double d)
std::pair< int, int > pair() const
matched_(double d, int i, int j)
double chi2(TH1 *h0, TH1 *h1)
bool operator>(const matched_ &a) const
bool operator==(const matched_ &a) const
const boost::regex ref(r_ef)
Associator(const std::string &name)
bool operator!=(const matched_ &a) const