23 os <<
"-----TrkrHitTruthAssocv1-----" << std::endl;
24 os <<
"Number of associations: " <<
m_map.size() << std::endl;
29 os <<
" hitset key: " <<
entry.first <<
" layer " << layer
30 <<
" hit key: " <<
entry.second.first
31 <<
" g4hit key: " <<
entry.second.second
35 os <<
"------------------------------" << std::endl;
44 m_map.insert (std::make_pair(hitsetkey, std::make_pair(hitkey, g4hitkey)));
53 const auto hitsetrange =
m_map.equal_range(hitsetkey);
57 [&hitkey, &g4hitkey](
const MMap::value_type& pair ) {
return pair.second.first == hitkey && pair.second.second == g4hitkey; } ) )
61 const auto assoc = std::make_pair(
hitkey, g4hitkey);
71 const auto hitsetrange =
m_map.equal_range(hitsetkey);
72 for(
auto mapiter = hitsetrange.first; mapiter != hitsetrange.second; ++mapiter)
74 if(mapiter->second.first == hitkey)
76 m_map.erase (mapiter);
86 const auto hitsetrange =
m_map.equal_range(hitsetkey);
87 std::copy_if( hitsetrange.first, hitsetrange.second, std::inserter( temp_map, temp_map.end() ),
88 [hidx]( MMap::const_reference pair ) {
return pair.second.first == hidx; } );