55 std::set<unsigned int> track_keep_list;
56 std::set<unsigned int> track_delete_list;
58 unsigned int good_track = 0;
59 unsigned int ok_track = 0;
62 std::set<unsigned int> seed_id_list;
64 for(
auto it = map_range.first;
it != map_range.second; ++
it)
66 seed_id_list.insert( (*it).first );
70 std::cout <<
" seed_id_list size " << seed_id_list.size() << std::endl;
74 for(
auto seed_iter = seed_id_list.begin(); seed_iter != seed_id_list.end(); ++seed_iter)
76 unsigned int tpc_id = *seed_iter;
79 std::cout <<
" TPC ID " << tpc_id << std::endl;
83 unsigned int best_id = 99999;
84 double min_chisq = 99999.0;
85 unsigned int best_ndf = 1;
86 for (
auto it = tpc_range.first;
it !=tpc_range.second; ++
it)
88 unsigned int track_id =
it->second;
95 std::cout <<
" track ID " << track_id <<
" chisq " <<
_track->
get_chisq() <<
" ndf " <<
_track->
get_ndf() <<
" min_chisq " << min_chisq << std::endl;
109 double qual = min_chisq / best_ndf;
112 std::cout <<
" best track for tpc_id " << tpc_id <<
" has track_id " << best_id <<
" chisq " << min_chisq <<
" chisq/ndf " << qual << std::endl;
116 track_keep_list.insert(best_id);
125 std::cout <<
" no track exists for tpc_id " << tpc_id << std::endl;
130 std::cout <<
" Number of good tracks with qual < 10 is " << good_track <<
" OK tracks " << ok_track << std::endl;
135 auto id = track_it->first;
137 auto set_it = track_keep_list.find(
id);
138 if(set_it == track_keep_list.end())
141 std::cout <<
" add id " <<
id <<
" to track_delete_list " << std::endl;
142 track_delete_list.insert(
id);
147 std::cout <<
" track_delete_list size " << track_delete_list.size() << std::endl;
150 for(
auto it = track_delete_list.begin();
it != track_delete_list.end(); ++
it)
153 std::cout <<
" erasing track ID " << *
it << std::endl;
158 std::cout <<
"Track map size after choosing best silicon match: " <<
_track_map->
size() << std::endl;
171 _track_map = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
174 std::cout <<
PHWHERE <<
" ERROR: Can't find SvtxTrackMap: " << std::endl;
178 _seed_track_map = findNode::getClass<TpcSeedTrackMap>(topNode,
"TpcSeedTrackMap");
181 std::cout <<
PHWHERE <<
" ERROR: Can't find node TpcSeedTrackMap: " << std::endl;