28 #include <TObjString.h>
36 std::set<unsigned int> ids_matched{};
39 ids_matched.insert(trkid);
42 std::set<int> ids_unmatched;
43 for (
auto& reco : *m_SvtxTrackMap)
45 auto trkid = reco.first;
46 if (ids_matched.count(trkid) == 0)
48 ids_unmatched.insert(trkid);
51 std::vector<int> ids_vec;
52 ids_vec.reserve(ids_unmatched.size());
53 for (
auto id : ids_unmatched)
55 ids_vec.push_back((
int)
id);
57 std::sort(ids_vec.begin(), ids_vec.end());
68 TFile* s_current = gDirectory->GetFile();
69 if (s_current ==
nullptr)
71 std::cout <<
PHWHERE <<
" Error no TFile open to which to wrote the "
73 <<
" TObjString mesaged." << std::endl;
76 TObjString obj(msg.c_str());
77 s_current->WriteObject(&obj, msg_name.c_str());
102 : m_nphi_widths{_nphi_widths}
110 PHG4CylinderGeomContainer* geom_container_mvtx = findNode::getClass<PHG4CylinderGeomContainer>(topNode,
"CYLINDERGEOM_MVTX");
111 if (!geom_container_mvtx)
113 std::cout <<
PHWHERE <<
" Could not locate CYLINDERGEOM_MVTX " << std::endl;
116 for (
int this_layer = 0; this_layer < 3; ++this_layer)
120 const double length = layergeom->get_pixel_z();
129 PHG4CylinderGeomContainer* geom_container_intt = findNode::getClass<PHG4CylinderGeomContainer>(topNode,
"CYLINDERGEOM_INTT");
130 if (!geom_container_intt)
132 std::cout <<
PHWHERE <<
" Could not locate CYLINDERGEOM_INTT " << std::endl;
136 for (
int this_layer = 3; this_layer < 7; ++this_layer)
146 findNode::getClass<PHG4TpcCylinderGeomContainer>(topNode,
"CYLINDERCELLGEOM_SVTX");
149 std::cout <<
PHWHERE <<
" Could not locate CYLINDERCELLGEOM_SVTX node " << std::endl;
152 for (
int this_layer = 7; this_layer < 55; ++this_layer)
163 findNode::getClass<TrkrClusterContainer>(topNode, name_phg4_clusters.c_str());
166 std::cout <<
PHWHERE <<
" Could not locate " << name_phg4_clusters <<
" node" << std::endl;
171 findNode::getClass<TrkrClusterContainer>(topNode, name_reco_clusters.c_str());
174 std::cout <<
PHWHERE <<
" Could not locate " << name_reco_clusters <<
" node" << std::endl;
178 m_ActsGeometry = findNode::getClass<ActsGeometry>(topNode,
"ActsGeometry");
181 std::cout <<
PHWHERE <<
" Could not locate ActsGeometry node" << std::endl;
200 std::cout <<
" Error! Trying to compar cluster in layer > 55, "
201 <<
"which is not programmed yet!" << std::endl;
241 float fit_statistic = (
phi_delta / phi_stat);
250 fit_statistic +=
z_delta / z_stat;
256 std::pair<TrkrDefs::hitsetkey, TrkrDefs::cluskey>
input)
261 (int) cluster->getPhiSize(), (int) cluster->getZSize()};
265 std::pair<TrkrDefs::hitsetkey, TrkrDefs::cluskey>
input)
270 (int) cluster->getPhiSize(), (int) cluster->getZSize()};
293 if (iter0.in_silicon)
377 std::array<int, 5> cnt{0, 0, 0, 0, 0};
378 for (
auto&
it : keys)
382 for (
int i = 0;
i < 4; ++
i)
391 std::array<int, 5> cnt{0, 0, 0, 0, 0};
392 if (keys.size() != matches.size())
394 std::cout <<
PHWHERE <<
" matching and key vector not the same size. "
396 <<
" run find_matches() first." << std::endl;
399 for (
unsigned int i = 0;
i < keys.size(); ++
i)
406 for (
int i = 0;
i < 4; ++
i)
448 <<
" Won't compare tracks because of missing TrkrClusterComparer" << std::endl;
466 matchesA = std::vector<bool>(vA.size(),
false);
467 matchesB = std::vector<bool>(vB.size(),
false);
470 auto iA0 = vA.begin();
473 auto iB0 = vB.begin();
481 while (iA != iA1 && iB != iB1)
483 if (iA->first == iB->first)
485 auto hitset = iA->first;
489 while (sAend != iA1 && sAend->first == hitset)
495 while (sBend != iB1 && sBend->first == hitset)
500 for (
auto A = iA;
A != sAend; ++
A)
502 for (
auto B = iB; B != sBend; ++B)
504 auto comp_val =
comp->operator()(
A->second, B->second);
507 matchesA[
A - iA0] =
true;
508 matchesB[B - iB0] =
true;
517 else if (iA->first < iB->first)
548 std::vector<ClusLoc>
vec{};
558 std::vector<ClusLoc>
vec{};
559 auto cnt = phg4_keys.size();
560 for (
unsigned int i = 0;
i < cnt; ++
i)
572 std::vector<ClusLoc>
vec{};
582 std::vector<ClusLoc>
vec{};
583 auto cnt = svtx_keys.size();
584 for (
unsigned int i = 0;
i < cnt; ++
i)
596 std::vector<ClusLoc>
vec{};
597 auto cnt = phg4_keys.size();
598 for (
unsigned int i = 0;
i < cnt; ++
i)