25 #include <trackbase_historic/SvtxVertex.h>
26 #include <trackbase_historic/SvtxVertexMap.h>
88 std::cout <<
"Analyzing truth " << std::endl;
96 std::cout <<
"Analyzing reco " << std::endl;
113 auto surfmaps = findNode::getClass<ActsSurfaceMaps>(topNode,
"ActsSurfaceMaps");
114 auto tgeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
"ActsTrackingGeometry");
128 iter != range.second; ++iter)
135 if (trutheval->
get_embed(g4particle) <= 0)
145 std::set<TrkrDefs::cluskey> g4clusters = clustereval->
all_clusters_from(g4particle);
151 for (
const auto &g4cluster : g4clusters)
157 auto global = actsTransformer.getGlobalPosition(cluster, surfmaps, tgeometry);
175 gclusterzerr.push_back(cluster->getActsLocalError(1, 1));
200 TVector3 gv(
gpx, gpy,
gpz);
218 px = track->get_px();
219 py = track->get_py();
220 pz = track->get_pz();
221 quality = track->get_quality();
226 charge = track->get_charge();
227 dca3dxy = track->get_dca3d_xy();
228 dca3dz = track->get_dca3d_z();
235 iter != track->end_cluster_keys();
260 auto glob = actsTransformer.getGlobalPosition(tcluster, surfmaps, tgeometry);
264 tclusterx.push_back(truthCluster->getX());
265 tclustery.push_back(truthCluster->getY());
266 tclusterz.push_back(truthCluster->getZ());
278 clusterzerr.push_back(tcluster->getActsLocalError(1, 1));
281 pcax = track->get_x();
282 pcay = track->get_y();
283 pcaz = track->get_z();
288 for(
const auto& track : matchedTracks)
292 dpx = track->get_px();
293 dpy = track->get_py();
294 dpz = track->get_pz();
295 dpt = track->get_pt();
296 dpcax = track->get_x();
297 dpcay = track->get_y();
298 dpcaz = track->get_z();
300 ddca3dz = track->get_dca3d_z();
308 int nmmaps = 0, nmintt=0, nmtpc=0, nmmms=0;
310 iter != track->end_cluster_keys();
318 auto glob = actsTransformer.getGlobalPosition(tcluster, surfmaps, tgeometry);
358 auto surfmaps = findNode::getClass<ActsSurfaceMaps>(topNode,
"ActsSurfaceMaps");
359 auto tgeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
"ActsTrackingGeometry");
371 px = track->get_px();
372 py = track->get_py();
373 pz = track->get_pz();
374 quality = track->get_quality();
379 charge = track->get_charge();
380 dca3dxy = track->get_dca3d_xy();
381 dca3dz = track->get_dca3d_z();
388 iter != track->end_cluster_keys();
413 auto glob = actsTransformer.getGlobalPosition(tcluster, surfmaps, tgeometry);
419 tclusterx.push_back(truthCluster->getX());
420 tclustery.push_back(truthCluster->getY());
421 tclusterz.push_back(truthCluster->getZ());
430 clusterzerr.push_back(tcluster->getActsLocalError(1, 1));
433 pcax = track->get_x();
434 pcay = track->get_y();
435 pcaz = track->get_z();
453 for(
const auto ttrack : matchedtracks)
457 if(matchedtracks.size() > 1)
462 if (trutheval->
get_embed(g4particle) <= 0)
continue;
468 std::set<TrkrDefs::cluskey> g4clusters = clustereval->
all_clusters_from(g4particle);
474 for (
const auto &g4cluster : g4clusters)
479 auto global = actsTransformer.getGlobalPosition(cluster, surfmaps, tgeometry);
496 gclusterzerr.push_back(cluster->getActsLocalError(1, 1));
600 m_truthContainer = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
603 std::cout <<
"No truth info available, can't continue." << std::endl;
608 std::cout <<
"Accessing map name " <<
m_trackMapName << std::endl;
611 std::cout <<
"No track map available, can't continue. " << std::endl;
615 m_clusterContainer = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
618 std::cout <<
"No cluster container available, can't continue." << std::endl;
628 std::cout <<
"TrackClusterEvaluator::Print(const std::string &what) const Printing info for " << what << std::endl;
633 m_recotree =
new TTree(
"recotracks",
"a tree with reconstructed tracks");
634 m_truthtree =
new TTree(
"truthtracks",
"a tree with truth tracks");
635 m_duplicatetree =
new TTree(
"duplicatetracks",
"a tree with truth->reco-duplicates");