ATLAS Offline Software
Loading...
Searching...
No Matches
elementalJetGroups.h File Reference
#include <map>
#include <vector>
Include dependency graph for elementalJetGroups.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>

Functions

std::vector< std::size_t > elementalJetGroups (const std::vector< std::size_t > &non_elemental, const JetGroupInd2ElemInds &jg2elemjgs)

Typedef Documentation

◆ JetGroupInd2ElemInds

using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>

Definition at line 11 of file elementalJetGroups.h.

Function Documentation

◆ elementalJetGroups()

std::vector< std::size_t > elementalJetGroups ( const std::vector< std::size_t > & non_elemental,
const JetGroupInd2ElemInds & jg2elemjgs )

Definition at line 9 of file elementalJetGroups.cxx.

10 {
11
12 std::vector<std::size_t> elem_indices;
13
14 for(auto i : non_elemental){
15 elem_indices.insert(elem_indices.end(),
16 jg2elemjg.at(i).begin(),
17 jg2elemjg.at(i).end());
18 }
19
20 // if any of the elemental jet group indices are repeated,
21 // stop processing the new jet group. (do not allow sharing for
22 // among Conditions. Sharing is handled by having the use of
23 // multiple FastReducer instances).
24
25 std::sort(elem_indices.begin(), elem_indices.end());
26 if (std::unique(elem_indices.begin(),
27 elem_indices.end()) != elem_indices.end()){
28 elem_indices.clear();
29 }
30 return elem_indices;
31}
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.