39 std::cout <<
"SvtxHitEval::~SvtxHitEval() - Error Count: " <<
_errors << std::endl;
112 return std::set<PHG4Hit*>();
126 return std::set<PHG4Hit*>();
131 std::map<TrkrDefs::hitkey, std::set<PHG4Hit*> >::iterator iter =
139 std::set<PHG4Hit*> truth_hits;
191 hit = hitset->
getHit(hit_key);
196 std::multimap<TrkrDefs::hitsetkey, std::pair<TrkrDefs::hitkey, PHG4HitDefs::keytype> > temp_map;
198 for (
auto& htiter : temp_map)
224 truth_hits.insert(g4hit);
247 return std::set<PHG4Hit*>();
261 return std::set<PHG4Hit*>();
266 std::map<TrkrDefs::hitkey, std::set<PHG4Hit*> >::iterator iter =
274 std::set<PHG4Hit*> truth_hits;
284 hit = hitset->
getHit(hit_key);
289 std::multimap<TrkrDefs::hitsetkey, std::pair<TrkrDefs::hitkey, PHG4HitDefs::keytype> > temp_map;
291 for (
auto& htiter : temp_map)
317 truth_hits.insert(g4hit);
359 std::map<TrkrDefs::hitkey, PHG4Hit*>::iterator iter =
369 float max_e = FLT_MAX * -1.0;
370 for (
auto hit : hits)
372 if (hit->get_edep() > max_e)
415 std::map<TrkrDefs::hitkey, PHG4Hit*>::iterator iter =
425 float max_e = FLT_MAX * -1.0;
426 for (
auto hit : hits)
428 if (hit->get_edep() > max_e)
452 return std::set<PHG4Particle*>();
466 return std::set<PHG4Particle*>();
471 std::map<TrkrDefs::hitkey, std::set<PHG4Particle*> >::iterator iter =
479 std::set<PHG4Particle*> truth_particles;
483 for (
auto g4hit : g4hits)
501 truth_particles.insert(particle);
509 return truth_particles;
521 return std::set<PHG4Particle*>();
535 return std::set<PHG4Particle*>();
540 std::map<TrkrDefs::hitkey, std::set<PHG4Particle*> >::iterator iter =
548 std::set<PHG4Particle*> truth_particles;
552 for (
auto g4hit : g4hits)
570 truth_particles.insert(particle);
578 return truth_particles;
609 std::map<TrkrDefs::hitkey, PHG4Particle*>::iterator iter =
620 float max_e = FLT_MAX * -1.0;
668 std::map<TrkrDefs::hitkey, PHG4Particle*>::iterator iter =
679 float max_e = FLT_MAX * -1.0;
708 return std::set<TrkrDefs::hitkey>();
715 else if (!g4particle)
722 return std::set<TrkrDefs::hitkey>();
727 std::map<PHG4Particle*, std::set<TrkrDefs::hitkey> >::iterator iter =
735 std::set<TrkrDefs::hitkey> hits;
740 iter != all_hitsets.second;
750 for (
auto candidate : g4hits)
755 hits.insert(hit_key);
778 return std::set<TrkrDefs::hitkey>();
792 return std::set<TrkrDefs::hitkey>();
797 std::map<PHG4Hit*, std::set<TrkrDefs::hitkey> >::iterator iter =
805 std::set<TrkrDefs::hitkey> hits;
807 unsigned int hit_layer = g4hit->
get_layer();
812 iter != all_hitsets.second;
827 for (
auto candidate : g4hits)
829 if (candidate->get_hit_id() == g4hit->
get_hit_id())
831 hits.insert(hit_key);
873 std::map<PHG4Hit*, TrkrDefs::hitkey>::iterator iter =
882 float best_energy = 0.0;
884 for (
unsigned int hit_key : hits)
887 if (energy > best_energy)
920 else if (!hit_key || !particle)
932 std::map<std::pair<TrkrDefs::hitkey, PHG4Particle*>,
float>::iterator iter =
942 for (
auto g4hit : g4hits)
946 energy += g4hit->get_edep();
975 else if (!hit_key || !g4hit)
987 std::map<std::pair<TrkrDefs::hitkey, PHG4Hit*>,
float>::iterator iter =
1000 for (
auto candidate : g4hits)
1002 if (candidate->get_hit_id() != g4hit->
get_hit_id())
1006 energy += candidate->get_edep();
1020 _hitmap = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
1022 _clustermap = findNode::getClass<TrkrClusterContainer>(topNode,
"CORRECTED_TRKR_CLUSTER");
1025 _clustermap = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
1028 _hit_truth_map = findNode::getClass<TrkrHitTruthAssoc>(topNode,
"TRKR_HITTRUTHASSOC");
1031 _g4hits_tpc = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_TPC");
1032 _g4hits_intt = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_INTT");
1033 _g4hits_mvtx = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_MVTX");
1034 _g4hits_mms = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_MICROMEGAS");
1036 _truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
1058 std::cout <<
"no hits" << std::endl;
1067 std::cout <<
" no truth" << std::endl;