5 #include <calobase/RawCluster.h>
6 #include <calobase/RawClusterContainer.h>
7 #include <calobase/RawTowerContainer.h>
25 , _towereval(topNode, caloname)
32 , _cache_all_truth_primary_showers()
33 , _cache_max_truth_primary_shower_by_energy()
34 , _cache_all_clusters_from_primary_shower()
35 , _cache_best_cluster_from_primary_shower()
36 , _cache_get_energy_contribution_primary_shower()
37 , _cache_all_truth_primary_particles()
38 , _cache_max_truth_primary_particle_by_energy()
39 , _cache_all_clusters_from_primary_particle()
40 , _cache_best_cluster_from_primary_particle()
41 , _cache_get_energy_contribution_primary_particle()
42 , _cache_all_truth_hits()
53 cout <<
"CaloRawClusterEval::~CaloRawClusterEval() - Error Count: " <<
_errors << endl;
101 return std::set<PHG4Shower*>();
111 return std::set<PHG4Shower*>();
116 std::map<RawCluster*, std::set<PHG4Shower*> >::iterator iter =
124 std::set<PHG4Shower*> truth_primary_showers;
129 iter != begin_end.second;
146 for (std::set<PHG4Shower*>::iterator iter = new_primary_showers.begin();
147 iter != new_primary_showers.end();
162 truth_primary_showers.insert(shower);
168 return truth_primary_showers;
191 std::map<RawCluster*, PHG4Shower*>::iterator iter =
204 for (std::set<PHG4Shower*>::iterator iter = primary_showers.begin();
205 iter != primary_showers.end();
221 if (isnan(e))
continue;
225 max_primary = primary;
239 return std::set<RawCluster*>();
249 return std::set<RawCluster*>();
263 return std::set<RawCluster*>();
268 std::map<PHG4Shower*, std::set<RawCluster*> >::iterator iter =
276 std::set<RawCluster*> clusters;
286 for (std::set<PHG4Shower*>::iterator jter = primary_showers.begin();
287 jter != primary_showers.end();
304 clusters.insert(cluster);
348 std::map<PHG4Shower*, RawCluster*>::iterator iter =
357 float best_energy =
FLT_MAX * -1.0;
359 for (std::set<RawCluster*>::iterator iter = clusters.begin();
360 iter != clusters.end();
376 if (isnan(energy))
continue;
377 if (energy > best_energy)
379 best_cluster = cluster;
402 else if (!cluster || !primary)
425 std::map<std::pair<RawCluster*, PHG4Shower*>,
float>::iterator iter =
438 iter != begin_end.second;
454 if (!isnan(edep)) energy +=
edep;
467 return std::set<PHG4Particle*>();
477 return std::set<PHG4Particle*>();
482 std::map<RawCluster*, std::set<PHG4Particle*> >::iterator iter =
490 std::set<PHG4Particle*> truth_primary_particles;
494 for (std::set<PHG4Shower*>::iterator iter = primary_showers.begin();
495 iter != primary_showers.end();
518 truth_primary_particles.insert(particle);
523 return truth_primary_particles;
546 std::map<RawCluster*, PHG4Particle*>::iterator iter =
572 return std::set<RawCluster*>();
582 return std::set<RawCluster*>();
596 return std::set<RawCluster*>();
601 std::map<PHG4Particle*, std::set<RawCluster*> >::iterator iter =
609 std::set<RawCluster*> clusters;
654 std::map<PHG4Particle*, RawCluster*>::iterator iter =
685 else if (!cluster || !primary)
708 std::map<std::pair<RawCluster*, PHG4Particle*>,
float>::iterator iter =
721 if (!isnan(edep)) energy +=
edep;
751 return std::set<PHG4Hit*>();
761 return std::set<PHG4Hit*>();
766 std::map<RawCluster*, std::set<PHG4Hit*> >::iterator iter =
774 std::set<PHG4Hit*> truth_hits;
779 iter != begin_end.second;
796 for (std::set<PHG4Hit*>::iterator iter = new_hits.begin();
797 iter != new_hits.end();
812 truth_hits.insert(g4hit);
824 std::string nodename =
"CLUSTER_" +
_caloname;
825 _clusters = findNode::getClass<RawClusterContainer>(topNode, nodename.c_str());
827 std::string towername =
"TOWER_CALIB_" +
_caloname;
828 _towers = findNode::getClass<RawTowerContainer>(topNode, towername.c_str());