47 std::multimap<unsigned int, std::set<TrkrDefs::cluskey>> matches;
48 std::set<unsigned int> seedsToDelete;
55 for(
unsigned int track1ID = 0;
61 if(seedsToDelete.find(track1ID) != seedsToDelete.end())
64 std::set<TrkrDefs::cluskey> mvtx1Keys;
76 mvtx1Keys.insert(ckey);
84 for(
unsigned int track2ID = track1ID;
88 if(track1ID == track2ID)
92 std::set<TrkrDefs::cluskey> mvtx2Keys;
103 mvtx2Keys.insert(ckey);
106 std::vector<TrkrDefs::cluskey> intersection;
107 std::set_intersection(mvtx1Keys.begin(),
111 std::back_inserter(intersection));
119 std::cout <<
"Track " << track1ID <<
" keys " << std::endl;
120 for(
auto& key : mvtx1Keys)
121 { std::cout <<
" ckey: " << key << std::endl; }
122 std::cout <<
"Track " << track2ID <<
" keys " << std::endl;
123 for(
auto& key : mvtx2Keys)
124 { std::cout <<
" ckey: " << key << std::endl; }
125 std::cout <<
"Intersection keys " << std::endl;
126 for(
auto& key : intersection)
127 { std::cout <<
" ckey: " << key << std::endl; }
130 for(
auto& key : mvtx2Keys)
132 mvtx1Keys.insert(key);
137 std::cout <<
"Match IDed"<<std::endl;
138 for(
auto& key : mvtx1Keys)
139 { std::cout <<
" total track keys " << key << std::endl; }
142 matches.insert(std::make_pair(track1ID, mvtx1Keys));
143 seedsToDelete.insert(track2ID);
149 for(
const auto& [trackKey, mvtxKeys] : matches)
153 { std::cout <<
"original track: " << std::endl; track->
identify(); }
155 for(
auto& key : mvtxKeys)
157 if(track->find_cluster_key(key) == track->end_cluster_keys())
159 track->insert_cluster_key(key);
161 std::cout <<
"adding " << key << std::endl;
167 for(
const auto& key : seedsToDelete)
170 { std::cout <<
"Erasing track " << key << std::endl; }
207 std::cout <<
PHWHERE <<
"No silicon track container, can't merge seeds"