23 : _clustereval(topNode)
29 , _cache_track_from_cluster_exists(
false)
30 , m_TrackNodeName(
"SvtxTrackMap")
41 cout <<
"SvtxTrackEval::~SvtxTrackEval() - Error Count: " <<
_errors << endl;
75 return std::set<PHG4Hit*>();
80 std::map<SvtxTrack*, std::set<PHG4Hit*> >::iterator iter =
88 std::set<PHG4Hit*> truth_hits;
109 for (std::set<PHG4Hit*>::iterator jter = new_hits.begin();
110 jter != new_hits.end();
113 truth_hits.insert(*jter);
133 return std::set<PHG4Particle*>();
137 std::map<SvtxTrack*, std::set<PHG4Particle*> >::iterator iter =
144 std::set<PHG4Particle*> truth_particles;
150 unsigned int track_id = fastsim_track -> get_truth_track_id();
173 for (std::set<PHG4Particle*>::iterator jter = new_particles.begin();
174 jter != new_particles.end();
177 truth_particles.insert(*jter);
184 return truth_particles;
203 std::map<SvtxTrack*, PHG4Particle*>::iterator iter =
218 unsigned int track_id = fastsim_track -> get_truth_track_id();
223 unsigned int max_nclusters = 0;
225 for (std::set<PHG4Particle*>::iterator iter = particles.begin();
226 iter != particles.end();
231 if (nclusters > max_nclusters)
233 max_nclusters = nclusters;
234 max_particle = candidate;
250 assert(truthparticle);
252 else if (!truthparticle)
255 return std::set<SvtxTrack*>();
260 std::map<PHG4Particle*, std::set<SvtxTrack*> >::iterator iter =
268 std::set<SvtxTrack*> tracks;
296 for (std::set<PHG4Particle*>::iterator jter = particles.begin();
297 jter != particles.end();
303 tracks.insert(track);
319 return std::set<SvtxTrack*>();
329 return std::set<SvtxTrack*>();
334 std::map<PHG4Hit*, std::set<SvtxTrack*> >::iterator iter =
342 std::set<SvtxTrack*> tracks;
370 for (std::set<PHG4Hit*>::iterator jter = hits.begin();
378 tracks.insert(track);
399 assert(truthparticle);
401 else if (!truthparticle)
409 std::map<PHG4Particle*, SvtxTrack*>::iterator iter =
418 unsigned int best_count = 0;
420 for (std::set<SvtxTrack*>::iterator iter = tracks.begin();
421 iter != tracks.end();
426 if (count > best_count)
470 std::map<TrkrDefs::cluskey, std::set<SvtxTrack*> >::iterator cliter =
474 cliter->second.insert(track);
478 std::set<SvtxTrack*> tracks;
479 tracks.insert(track);
494 return std::set<SvtxTrack*>();
507 std::set<SvtxTrack*> tracks;
512 std::map<TrkrDefs::cluskey, std::set<SvtxTrack*> >::iterator iter =
548 if (cluster_key == candidate)
550 tracks.insert(track);
580 std::map<TrkrDefs::cluskey, SvtxTrack*>::iterator iter =
593 for (std::set<SvtxTrack*>::iterator iter = tracks.begin();
594 iter != tracks.end();
601 best_track = candidate;
623 else if (!track || !particle)
631 std::map<std::pair<SvtxTrack*, PHG4Particle*>,
unsigned int>::iterator iter =
653 else if (!track || !particle)
661 std::map<std::pair<SvtxTrack*, PHG4Particle*>,
unsigned int>::iterator iter =
685 else if (!track || !particle)
691 std::map<std::pair<SvtxTrack*, PHG4Particle*>,
unsigned int>::iterator iter =
693 std::map<std::pair<SvtxTrack*, PHG4Particle*>,
unsigned int>::iterator witer =
702 unsigned int nclusters = 0;
703 unsigned int nwrong = 0;
723 for (std::set<PHG4Particle*>::iterator jter = particles.begin();
724 jter != particles.end();
734 if (matched == 0) nwrong++;
756 else if (!track || !particle)
764 std::map<std::pair<SvtxTrack*, PHG4Particle*>,
unsigned int>::iterator iter =
772 unsigned int nclusters_by_layer = 0;
773 int layer_occupied[100];
774 for (
int i = 0; i < 100; i++) layer_occupied[i] = 0;
797 for (std::set<PHG4Particle*>::iterator jter = particles.begin();
798 jter != particles.end();
804 layer_occupied[cluster_layer]++;
808 for (
int i = 0; i < 100; i++)
810 if (layer_occupied[i] > 0) nclusters_by_layer++;
814 return nclusters_by_layer;
830 else if (!track || !particle)
836 unsigned int nmatches = 0;
837 unsigned int nlayers = end_layer - start_layer;
840 for (
unsigned int i = 0; i < nlayers; i++)
851 if (cluster_layer >= end_layer)
continue;
852 if (cluster_layer < start_layer)
continue;
866 for (std::set<PHG4Particle*>::iterator jter = particles.begin();
867 jter != particles.end();
874 layers[cluster_layer - start_layer] = 1;
878 for (
unsigned int i = 0; i < nlayers; i++)
880 if (layers[i] == 1) nmatches++;