1 #ifndef _MultiClusterizer1D_H_ 2 #define _MultiClusterizer1D_H_ 29 std::pair < std::vector < Cluster1D<T> >, std::vector < const T * > >
74 std::pair < std::vector< Cluster1D<T> >, std::vector< const T * > >
80 std::vector < const T * > unusedtracks;
86 std::pair < std::vector < Cluster1D >, std::vector < const T * > > ret ( ov, unusedtracks );
90 std::pair < std::vector< Cluster1D >, std::vector< const T * > >
res;
93 std::map < const T *, Cluster1D > ass;
94 std::vector < Cluster1D > cur;
96 for (
typename std::vector< Cluster1D >::const_iterator
i=ov.begin();
99 if (
i->tracks().size()==1 )
101 ass[
i->tracks()[0] ]=*
i;
103 cur.push_back ( *
i );
110 std::pair < std::vector< Cluster1D >, std::vector< const T * > >
tmp = (*theSingle)( cur );
112 for (
typename std::vector< Cluster1D >::const_iterator
i=tmp.first.begin();
113 i!=tmp.first.end() ; ++
i )
115 res.first.push_back ( *
i );
117 res.second=tmp.second;
121 for (
typename std::vector< const T * >::const_iterator
122 i=res.second.begin();
i!=res.second.end() ; ++
i )
124 cur.push_back ( ass[*
i] );
126 if ( ctr++ > 5 )
break;
127 if ( cur.size() < 2 )
break;
virtual MultiClusterizer1D * clone() const
WeightEstimator< T > * theEstimator
MultiClusterizer1D(const Clusterizer1D< T > &single, const WeightEstimator< T > &est=TrivialWeightEstimator< T >())
std::vector< std::vector< double > > tmp
Clusterizer1D< T > * theSingle
std::pair< std::vector< Cluster1D< T > >, std::vector< const T * > > operator()(const std::vector< Cluster1D< T > > &) const