1 #ifndef _MtvClusterizer1D_H_
2 #define _MtvClusterizer1D_H_
57 using namespace Clusterizer1DCommons;
58 std::vector<const T*> unusedtracks;
63 std::pair<std::vector<Cluster1D>, std::vector<const T*> >
ret(ov, unusedtracks);
66 std::vector<Cluster1D>
v = ov;
68 std::vector<Cluster1D> sols;
69 std::vector<const T*> trks;
71 typename std::vector<Cluster1D>::iterator cur =
v.begin();
72 typename std::vector<Cluster1D>::iterator
end = (
v.end() - 1);
73 double cur_min = cur->weight() + (cur + 1)->
weight();
75 for (
typename std::vector<Cluster1D>::iterator
i =
v.begin();
i !=
end; ++
i) {
76 double cur_val =
i->weight() + (
i + 1)->
weight();
77 if (cur_val > cur_min) {
84 double est = (cur->weight() * cur->position().value() + (cur + 1)->
weight() * (cur + 1)->
position().value()) /
weight;
85 double sigma =
sqrt(
square(cur->position().value() - est) +
square((cur + 1)->position().value() - est));
89 for (
typename std::vector<Cluster1D>::iterator
i =
v.begin();
i !=
v.end(); ++
i) {
90 if (fabs(
i->position().value() - est) < 3 * sigma) {
92 add(
i->tracks(), trks);
96 add(
i->tracks(), unusedtracks);
103 std::pair<std::vector<Cluster1D>, std::vector<const T*> >
ret(sols, unusedtracks);
tuple ret
prodAgent to be discontinued
MtvClusterizer1D(const WeightEstimator< T > &est=TrivialWeightEstimator< T >())
virtual MtvClusterizer1D * clone() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
std::pair< std::vector< Cluster1D< T > >, std::vector< const T * > > operator()(const std::vector< Cluster1D< T > > &) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
static int position[264][3]
double square(const double a)
WeightEstimator< T > * theEstimator
float theErrorStretchFactor