34 #include <TMatrixFfwd.h>
36 #include <TMatrixTUtils.h>
39 #pragma GCC diagnostic push
40 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
41 #include <boost/graph/adjacency_list.hpp>
42 #pragma GCC diagnostic pop
44 #include <boost/graph/connected_components.hpp>
55 using namespace boost;
76 cout <<
"====================== MvtxHitPruner::InitRun() =====================" << endl;
85 m_hits = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
88 cout <<
PHWHERE <<
"ERROR: Can't find node TRKR_HITSET" << endl;
95 std::multimap<TrkrDefs::hitsetkey, TrkrDefs::hitsetkey> hitset_multimap;
96 std::set<TrkrDefs::hitsetkey> bare_hitset_set;
101 hitsetitr != hitsetrange.second;
112 hitset_multimap.insert(std::make_pair(bare_hitsetkey,
hitsetkey));
113 bare_hitset_set.insert(bare_hitsetkey);
115 if(
Verbosity() > 0) cout <<
" found hitsetkey " <<
hitsetkey <<
" for bare_hitsetkey " << bare_hitsetkey << endl;
120 for(
auto bare_it = bare_hitset_set.begin(); bare_it != bare_hitset_set.end(); ++bare_it)
122 auto bare_hitsetkey = *bare_it;
124 if(
Verbosity() > 0) std::cout <<
" bare_hitset " << bare_hitsetkey <<
" initially has " << bare_hitset->
size() <<
" hits " << std::endl;
126 auto bare_hitsetrange= hitset_multimap.equal_range(bare_hitsetkey);
127 for(
auto it = bare_hitsetrange.first;
it != bare_hitsetrange.second; ++
it)
134 if(
Verbosity() > 0) cout <<
" process hitsetkey " <<
hitsetkey <<
" for bare_hitsetkey " << bare_hitsetkey << endl;
140 std::cout <<
" hitsetkey " <<
hitsetkey <<
" has strobe " << strobe <<
" and has " << hitset->
size() <<
" hits, so copy it" << std::endl;
144 hitr != hitrangei.second;
147 auto hitkey = hitr->first;
148 if(
Verbosity() > 0) std::cout <<
" found hitkey " <<
hitkey << std::endl;
153 if(
Verbosity() > 0) std::cout <<
" hitkey " <<
hitkey <<
" is already in bare hitsest, do not copy" << std::endl;
158 if(
Verbosity() > 0) std::cout <<
" copying over hitkey " <<
hitkey << std::endl;
159 auto old_hit = hitr->second;
161 new_hit->
setAdc(old_hit->getAdc());