5 #include <calobase/RawTower.h>
6 #include <calobase/RawTowerContainer.h>
29 , _trutheval(topNode, caloname)
40 std::cout <<
"CaloRawTowerEval::~CaloRawTowerEval() - Error Count: " <<
_errors << std::endl;
99 return std::set<PHG4Shower*>();
109 return std::set<PHG4Shower*>();
114 std::map<RawTower*, std::set<PHG4Shower*> >::iterator iter =
122 std::set<PHG4Shower*> showers;
126 iter != shower_range.second;
141 showers.insert(shower);
172 std::map<RawTower*, PHG4Shower*>::iterator iter =
181 float max_e = FLT_MAX * -1.0;
184 for (
auto shower : showers)
241 std::map<PHG4Shower*, RawTower*>::iterator iter =
250 float best_energy = FLT_MAX * -1.0;
252 for (
auto tower : towers)
269 if (energy > best_energy)
289 return std::set<RawTower*>();
299 return std::set<RawTower*>();
304 return std::set<RawTower*>();
309 std::map<PHG4Shower*, std::set<RawTower*> >::iterator iter =
317 std::set<RawTower*> towers;
327 for (
auto candidate : showers)
339 if (candidate->get_id() == shower->
get_id())
341 towers.insert(tower);
367 else if (!tower || !shower)
380 std::map<std::pair<RawTower*, PHG4Shower*>,
float>::iterator iter =
392 if (iter != range.second)
394 energy = iter->second;
410 return std::set<PHG4Particle*>();
420 return std::set<PHG4Particle*>();
425 std::map<RawTower*, std::set<PHG4Particle*> >::iterator iter =
433 std::set<PHG4Particle*> truth_primaries;
437 for (
auto shower : showers)
451 truth_primaries.insert(primary);
459 return truth_primaries;
482 std::map<RawTower*, PHG4Particle*>::iterator iter =
511 return std::set<RawTower*>();
521 return std::set<RawTower*>();
526 return std::set<RawTower*>();
539 return std::set<RawTower*>();
544 std::map<PHG4Particle*, std::set<RawTower*> >::iterator iter =
552 std::set<RawTower*> towers;
606 std::map<PHG4Particle*, RawTower*>::iterator iter =
643 else if (!tower || !primary)
669 std::map<std::pair<RawTower*, PHG4Particle*>,
float>::iterator iter =
745 return std::set<PHG4Hit*>();
755 return std::set<PHG4Hit*>();
760 std::map<RawTower*, std::set<PHG4Hit*> >::iterator iter =
768 std::set<PHG4Hit*> truth_hits;
772 cell_iter != cell_range.second; ++cell_iter)
774 unsigned int cell_id = cell_iter->first;
805 truth_hits.insert(g4hit);
821 _towers = findNode::getClass<RawTowerContainer>(topNode, towername.c_str());
824 _g4cells = findNode::getClass<PHG4CellContainer>(topNode, cellname.c_str());
827 _g4hits = findNode::getClass<PHG4HitContainer>(topNode, hitname.c_str());
829 _truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");