template<class T>
class MtvClusterizer1D< T >
Hsm clusterizer in one dimension, originally designed for ApexPoint Finding
Definition at line 17 of file MtvClusterizer1D.h.
Implements Clusterizer1D< T >.
Definition at line 54 of file MtvClusterizer1D.h.
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);
References Clusterizer1DCommons::add(), end, runTheMatrix::err, mps_fire::i, position, runTheMatrix::ret, mathSSE::sqrt(), Clusterizer1DCommons::square(), findQualityFiles::v, and mps_merge::weight.