23 std::array<int,5> cnt { 0, 0, 0, 0, 0 };
24 for (
auto&
it : keys) {
27 for (
int i=0;
i<4;++
i) cnt[4] += cnt[
i];
41 (
Vector& keys, std::vector<bool>& matches)
43 std::array<int,5> cnt { 0, 0, 0, 0, 0 };
44 if (keys.size() != matches.size()) {
45 std::cout <<
PHWHERE <<
" matching and key vector not the same size. "
46 << std::endl <<
" run find_matches() first." << std::endl;
49 for (
unsigned int i=0;
i<keys.size(); ++
i) {
54 for (
int i=0;
i<4;++
i) cnt[4] += cnt[
i];
77 <<
" Won't compare tracks because of missing TrkrClusterIsMatcher" << std::endl;
95 matchesA = std::vector<bool>(vA.size(),
false);
96 matchesB = std::vector<bool>(vB.size(),
false);
99 auto iA0 = vA.begin();
102 auto iB0 = vB.begin();
110 while (iA != iA1 && iB != iB1) {
111 if (iA->first == iB->first) {
112 auto hitset = iA->first;
116 while (sAend != iA1 && sAend->first == hitset) ++sAend;
119 while (sBend != iB1 && sBend->first == hitset) ++sBend;
121 for (
auto _A = iA; _A!=sAend; ++_A) {
122 for (
auto _B = iB; _B!=sBend; ++_B) {
123 auto is_match =
ismatcher->operator()(_A->second,_B->second);
125 matchesA[_A-iA0] =
true;
126 matchesB[_B-iB0] =
true;
133 }
else if (iA->first < iB->first) {
155 std::vector<TrkrClusLoc>
vec{};
161 std::vector<TrkrClusLoc>
vec{};
163 for (
unsigned int i = 0;
i<cnt; ++
i) {
170 std::vector<TrkrClusLoc>
vec{};
176 std::vector<TrkrClusLoc>
vec{};
178 for (
unsigned int i = 0;
i<cnt; ++
i) {
185 std::vector<TrkrClusLoc>
vec{};
187 for (
unsigned int i = 0;
i<cnt; ++
i) {