Juggler
Juggling algorithms and event processing using gaudi framework
FW Namespace Reference

Namespaces

 Options
 

Typedefs

template<typename Value , typename Key = std::size_t>
using IndexMultimap = boost::container::flat_multimap< Key, Value >
 
using ProtoTrack = std::vector< size_t >
 A proto track is a collection of hits identified by their indices. More...
 
using ProtoTrackContainer = std::vector< ProtoTrack >
 Container of proto tracks. Each proto track is identified by its index. More...
 

Functions

template<typename Value , typename Key >
IndexMultimap< Key, Value > invertIndexMultimap (const IndexMultimap< Value, Key > &multimap)
 

Typedef Documentation

◆ IndexMultimap

template<typename Value , typename Key = std::size_t>
using FW::IndexMultimap = typedef boost::container::flat_multimap<Key, Value>

Store elements that are identified by an index, e.g. in another container.

Each index can have zero or more associated elements. A typical case could be to store all generating particles for a hit where the hit is identified by its index in the hit container.

◆ ProtoTrack

using FW::ProtoTrack = typedef std::vector<size_t>

A proto track is a collection of hits identified by their indices.

◆ ProtoTrackContainer

using FW::ProtoTrackContainer = typedef std::vector<ProtoTrack>

Container of proto tracks. Each proto track is identified by its index.

Function Documentation

◆ invertIndexMultimap()

template<typename Value , typename Key >
IndexMultimap< Key, Value > FW::invertIndexMultimap ( const IndexMultimap< Value, Key > &  multimap)
inline

Invert the multimap, i.e. from a -> {b...} to b -> {a...}.

Note
This assumes that the value in the initial multimap is itself a sortable index-like object, as would be the case when mapping e.g. hit ids to particle ids/ barcodes.