35 , _g4hits_tpc(nullptr)
36 , _g4hits_intt(nullptr)
37 , _g4hits_mvtx(nullptr)
38 , _g4hits_mms(nullptr)
44 , _cache_all_truth_hits()
45 , _cache_max_truth_hit_by_energy()
46 , _cache_all_truth_particles()
47 , _cache_max_truth_particle_by_energy()
48 , _cache_all_hits_from_particle()
49 , _cache_all_hits_from_g4hit()
50 , _cache_best_hit_from_g4hit()
51 , _cache_get_energy_contribution_g4particle()
52 , _cache_get_energy_contribution_g4hit()
63 cout <<
"SvtxHitEval::~SvtxHitEval() - Error Count: " <<
_errors << endl;
133 return std::set<PHG4Hit*>();
144 return std::set<PHG4Hit*>();
149 std::map<TrkrDefs::hitkey, std::set<PHG4Hit*> >::iterator iter =
157 std::set<PHG4Hit*> truth_hits;
209 hit = hitset->
getHit(hit_key);
214 std::multimap< TrkrDefs::hitsetkey, std::pair<TrkrDefs::hitkey, PHG4HitDefs::keytype> > temp_map;
216 for(std::multimap<
TrkrDefs::hitsetkey, std::pair<TrkrDefs::hitkey, PHG4HitDefs::keytype> >::iterator htiter = temp_map.begin();
217 htiter != temp_map.end(); ++htiter)
232 if( g4hit ) truth_hits.insert(g4hit);
264 std::map<TrkrDefs::hitkey, PHG4Hit*>::iterator iter =
275 for (std::set<PHG4Hit*>::iterator iter = hits.begin();
298 return std::set<PHG4Particle*>();
309 return std::set<PHG4Particle*>();
314 std::map<TrkrDefs::hitkey, std::set<PHG4Particle*> >::iterator iter =
322 std::set<PHG4Particle*> truth_particles;
326 for (std::set<PHG4Hit*>::iterator iter = g4hits.begin();
327 iter != g4hits.end();
342 truth_particles.insert(particle);
347 return truth_particles;
372 std::map<TrkrDefs::hitkey, PHG4Particle*>::iterator iter =
385 for (std::set<PHG4Particle*>::iterator iter = particles.begin();
386 iter != particles.end();
409 return std::set<TrkrDefs::hitkey>();
416 else if (!g4particle)
420 return std::set<TrkrDefs::hitkey>();
425 std::map<PHG4Particle*, std::set<TrkrDefs::hitkey> >::iterator iter =
433 std::set<TrkrDefs::hitkey>
hits;
438 iter != all_hitsets.second;
448 for (std::set<PHG4Hit*>::iterator jter = g4hits.begin();
449 jter != g4hits.end();
456 hits.insert(hit_key);
473 return std::set<TrkrDefs::hitkey>();
484 return std::set<TrkrDefs::hitkey>();
489 std::map<PHG4Hit*, std::set<TrkrDefs::hitkey> >::iterator iter =
497 std::set<TrkrDefs::hitkey>
hits;
499 unsigned int hit_layer = g4hit->
get_layer();
504 iter != all_hitsets.second;
516 for (std::set<PHG4Hit*>::iterator jter = g4hits.begin();
517 jter != g4hits.end();
523 hits.insert(hit_key);
556 std::map<PHG4Hit*, TrkrDefs::hitkey>::iterator iter =
565 float best_energy = 0.0;
567 for (std::set<TrkrDefs::hitkey>::iterator iter = hits.begin();
573 if (energy > best_energy)
600 else if (!hit_key || !particle)
609 std::map<std::pair<TrkrDefs::hitkey, PHG4Particle*>,
float>::iterator iter =
619 for (std::set<PHG4Hit*>::iterator iter = g4hits.begin();
620 iter != g4hits.end();
649 else if (!hit_key || !g4hit)
658 std::map<std::pair<TrkrDefs::hitkey, PHG4Hit*>,
float>::iterator iter =
671 for (std::set<PHG4Hit*>::iterator iter = g4hits.begin();
672 iter != g4hits.end();
688 _hitmap = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
690 _clustermap = findNode::getClass<TrkrClusterContainer>(topNode,
"CORRECTED_TRKR_CLUSTER");
692 _clustermap = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
694 _hit_truth_map = findNode::getClass<TrkrHitTruthAssoc>(topNode,
"TRKR_HITTRUTHASSOC");
697 _g4hits_tpc = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_TPC");
698 _g4hits_intt = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_INTT");
699 _g4hits_mvtx = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_MVTX");
700 _g4hits_mms = findNode::getClass<PHG4HitContainer>(topNode,
"G4HIT_MICROMEGAS");
702 _truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
720 cout <<
"no hits" << endl;
727 cout <<
" no truth" << endl;