23 const std::string& truthjetname)
24 : _truthjetname(truthjetname)
25 , _svtxevalstack(topNode)
26 , _cemcevalstack(topNode,
"CEMC")
27 , _hcalinevalstack(topNode,
"HCALIN")
28 , _hcaloutevalstack(topNode,
"HCALOUT")
29 , _femcevalstack(topNode,
"FEMC")
30 , _fhcalevalstack(topNode,
"FHCAL")
31 , _eemcevalstack(topNode,
"EEMC")
38 , _cache_all_truth_particles()
39 , _cache_all_truth_showers()
40 , _cache_all_truth_hits()
41 , _cache_get_truth_jet()
52 cout <<
"JetTruthEval::~JetTruthEval() - Error Count: " <<
_errors << endl;
83 return std::set<PHG4Particle*>();
88 std::map<Jet*, std::set<PHG4Particle*> >::iterator iter =
96 std::set<PHG4Particle*> truth_particles;
104 unsigned int index = iter->second;
107 cout <<
PHWHERE <<
" truth jet contains something other than particles!" << endl;
115 assert(truth_particle);
117 else if (!truth_particle)
123 truth_particles.insert(truth_particle);
128 return truth_particles;
140 return std::set<PHG4Shower*>();
145 std::map<Jet*, std::set<PHG4Shower*> >::iterator iter =
153 std::set<PHG4Shower*> truth_showers;
158 for (std::set<PHG4Particle*>::iterator iter = truth_particles.begin();
159 iter != truth_particles.end();
179 truth_showers.insert(shower);
185 return truth_showers;
197 return std::set<PHG4Hit*>();
202 std::map<Jet*, std::set<PHG4Hit*> >::iterator iter =
210 std::set<PHG4Hit*> truth_hits;
215 for (std::set<PHG4Particle*>::iterator iter = truth_particles.begin();
216 iter != truth_particles.end();
233 std::set<PHG4Hit*> svtx_g4hits = svtx_truth_eval->
all_truth_hits(particle);
235 for (std::set<PHG4Hit*>::iterator jter = svtx_g4hits.begin();
236 jter != svtx_g4hits.end();
251 truth_hits.insert(g4hit);
274 std::map<PHG4Particle*, Jet*>::iterator iter =
282 Jet* truth_jet =
nullptr;
289 Jet* candidate = iter->second;
296 unsigned int index = jter->second;
303 else if (!constituent)
311 truth_jet = candidate;
316 if (truth_jet)
break;
326 _truthinfo = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
329 cerr <<
PHWHERE <<
" ERROR: Can't find G4TruthInfo" << endl;