5 #include <calobase/RawTower.h>
6 #include <calobase/RawTowerContainer.h>
29 , _trutheval(topNode, caloname)
38 , _cache_all_truth_primary_showers()
39 , _cache_max_truth_primary_shower_by_energy()
40 , _cache_all_towers_from_primary_shower()
41 , _cache_best_tower_from_primary_shower()
42 , _cache_get_energy_contribution_primary_shower()
43 , _cache_all_truth_primary_particles()
44 , _cache_max_truth_primary_particle_by_energy()
45 , _cache_all_towers_from_primary_particle()
46 , _cache_best_tower_from_primary_particle()
47 , _cache_get_energy_contribution_primary_particle()
48 , _cache_all_truth_hits()
59 cout <<
"CaloRawTowerEval::~CaloRawTowerEval() - Error Count: " <<
_errors << endl;
107 return std::set<PHG4Shower*>();
117 return std::set<PHG4Shower*>();
122 std::map<RawTower*, std::set<PHG4Shower*> >::iterator iter =
130 std::set<PHG4Shower*> showers;
134 iter != shower_range.second;
149 showers.insert(shower);
177 std::map<RawTower*, PHG4Shower*>::iterator iter =
189 for (std::set<PHG4Shower*>::iterator iter = showers.begin();
190 iter != showers.end();
206 if (isnan(e))
continue;
241 std::map<PHG4Shower*, RawTower*>::iterator iter =
250 float best_energy =
FLT_MAX * -1.0;
252 for (std::set<RawTower*>::iterator iter = towers.begin();
253 iter != towers.end();
269 if (isnan(energy))
continue;
270 if (energy > best_energy)
287 return std::set<RawTower*>();
297 return std::set<RawTower*>();
304 std::map<PHG4Shower*, std::set<RawTower*> >::iterator iter =
312 std::set<RawTower*> towers;
322 for (std::set<PHG4Shower*>::iterator jter = showers.begin();
323 jter != showers.end();
340 towers.insert(tower);
363 else if (!tower || !shower)
373 std::map<std::pair<RawTower*, PHG4Shower*>,
float>::iterator iter =
385 if (iter != range.second)
387 energy = iter->second;
400 return std::set<PHG4Particle*>();
410 return std::set<PHG4Particle*>();
415 std::map<RawTower*, std::set<PHG4Particle*> >::iterator iter =
423 std::set<PHG4Particle*> truth_primaries;
427 for (std::set<PHG4Shower*>::iterator iter = showers.begin();
428 iter != showers.end();
444 truth_primaries.insert(primary);
449 return truth_primaries;
472 std::map<RawTower*, PHG4Particle*>::iterator iter =
498 return std::set<RawTower*>();
508 return std::set<RawTower*>();
523 return std::set<RawTower*>();
528 std::map<PHG4Particle*, std::set<RawTower*> >::iterator iter =
536 std::set<RawTower*> towers;
584 std::map<PHG4Particle*, RawTower*>::iterator iter =
618 else if (!tower || !primary)
641 std::map<std::pair<RawTower*, PHG4Particle*>,
float>::iterator iter =
695 return std::set<PHG4Hit*>();
705 return std::set<PHG4Hit*>();
710 std::map<RawTower*, std::set<PHG4Hit*> >::iterator iter =
718 std::set<PHG4Hit*> truth_hits;
722 cell_iter != cell_range.second; ++cell_iter)
724 unsigned int cell_id = cell_iter->first;
755 truth_hits.insert(g4hit);
767 std::string towername =
"TOWER_CALIB_" +
_caloname;
768 _towers = findNode::getClass<RawTowerContainer>(topNode, towername.c_str());
770 std::string cellname =
"G4CELL_" +
_caloname;
771 _g4cells = findNode::getClass<PHG4CellContainer>(topNode, cellname.c_str());
773 std::string hitname =
"G4HIT_" +
_caloname;
774 _g4hits = findNode::getClass<PHG4HitContainer>(topNode, hitname.c_str());
776 _truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");