7 #include <boost/tuple/tuple.hpp>
17 , particle_embed_flags()
18 , vertex_embed_flags()
52 os <<
"---particlemap--------------------------" << endl;
55 os <<
"particle id " << iter.first << endl;
59 os <<
"---vtxmap-------------------------------" << endl;
62 os <<
"vtx id: " << vter.first << endl;
66 os <<
"---showermap-------------------------------" << endl;
69 os <<
"shower id: " << ster.first << endl;
73 os <<
"---list of embeded track flags-------------------" << endl;
76 os <<
"embeded track id: " << particle_embed_flag.first
77 <<
" flag: " << particle_embed_flag.second << endl;
80 os <<
"---list of embeded vtx flags-------------------" << endl;
83 os <<
"embeded vertex id: " << vertex_embed_flag.first
84 <<
" flag: " << vertex_embed_flag.second << endl;
87 os <<
"---primary vertex-------------------" << endl;
99 boost::tie(it, added) =
particlemap.insert(std::make_pair(key, newparticle));
105 cerr <<
"PHG4TruthInfoContainer::AddParticle"
106 <<
" - Attempt to add particle with existing trackid "
107 << trackid <<
": " << newparticle->
get_name() <<
" id "
109 <<
", p = [" << newparticle->
get_px()
110 <<
", " << newparticle->
get_py()
111 <<
", " << newparticle->
get_pz() <<
"], "
201 cout <<
"trying to add existing vtx " <<
id
202 <<
" vtx pos: " << endl;
207 boost::tie(it, added) =
vtxmap.insert(std::make_pair(key, newvtx));
214 cerr <<
"PHG4TruthInfoContainer::AddVertex"
215 <<
" - Attempt to add vertex with existing id " <<
id << std::endl;
228 cout <<
"trying to add existing shower " <<
id
229 <<
" shower pos: " << endl;
234 boost::tie(it, added) =
showermap.insert(std::make_pair(key, newshower));
241 cerr <<
"PHG4TruthInfoContainer::AddShower"
242 <<
" - Attempt to add shower with existing id " <<
id << std::endl;
279 key =
vtxmap.rbegin()->first;
293 key =
vtxmap.begin()->first;
332 delete piter->second;
348 delete viter->second;
364 delete siter->second;
406 int vtx_id_for_highest_embedding_ID = 0;
407 for (
auto iter = vrange.first; iter != vrange.second; ++iter)
413 if (embedding_ID >= highest_embedding_ID)
415 highest_embedding_ID = embedding_ID;
416 vtx_id_for_highest_embedding_ID = iter->first;
422 cout <<
"PHG4TruthInfoContainer::GetPrimaryVertexIndex - "
423 <<
"WARNING: no valid primary vertex. Return an invalid ID of 0"
428 return vtx_id_for_highest_embedding_ID;
433 return *lhs.second == *rhs.second;
438 return *lhs.second == *rhs.second;
443 return *lhs.second == *rhs.second;