Go to the source code of this file.
|
bool | willPassSimpleTree (const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult) |
|
std::size_t | max_jet (const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy) |
|
std::unique_ptr< IJetGroupProduct > | makeJetGroupProduct (const std::vector< std::size_t > &siblings, const CondInd2JetGroupsInds &satisfiedBy, const std::vector< std::size_t > &condMult, const std::vector< unsigned int > &condCap, const std::vector< int > &condClique, const JetGroupInd2ElemInds &jg2elemjgs, std::size_t parCapacity, bool simpleTree, const Collector &collector) |
|
◆ JetGroupInd2ElemInds
◆ makeJetGroupProduct()
Definition at line 73 of file JetGroupProductFactory.cxx.
100 std::unique_ptr<IJetGroupProduct> jgp (
nullptr);
102 if (siblings.empty()) {
108 for(
const auto&
s : siblings) {
109 if (satisfiedBy.at(
s).empty()) {
116 std::map<int, std::vector<std::size_t>> clique_map;
117 std::for_each(siblings.begin(),
119 [&clique_map, &condClique](std::size_t
s){
120 auto clique = condClique[s];
122 clique_map[clique].push_back(s);}});
129 [&condMult, &condCap](
const auto& sofar,
132 condMult.at(ind)*condCap.at(ind);});
136 for(
const auto&
s: siblings) {
137 if (condCap.at(
s) != 1) {
143 if (simpleTree and cap1) {
144 if (clique_map.size() == 1){
156 for (
const auto&
s : siblings) {
157 if ((satisfiedBy.at(
s)).size() < n_required) {
184 if (parentCap == 0 and siblings.size() == 1) {
◆ max_jet()
Definition at line 15 of file JetGroupProductFactory.cxx.
17 std::vector<std::size_t> inds;
18 for (
const auto&
s : siblings) {
19 inds.insert(inds.end(),
20 satisfiedBy.at(
s).cbegin(),
21 satisfiedBy.at(
s).cend());
24 auto iter = std::max_element(inds.begin(), inds.end());
25 if (iter == inds.end()) {
return 0;}
◆ willPassSimpleTree()
Definition at line 30 of file JetGroupProductFactory.cxx.
34 for (
const auto&
s : siblings) {
35 if (satisfiedBy.at(
s).empty()) {
return false;}
38 std::vector<std::vector<std::size_t>> ind_stack;
40 for (
const auto&
s : siblings) {
41 auto repeat = condMult.at(
s);
42 for (std::size_t
i = 0;
i != repeat; ++
i) {
43 auto c_inds = satisfiedBy.at(
s);
44 ind_stack.emplace_back(c_inds);
49 std::sort (ind_stack.begin(), ind_stack.end(),
50 [](
const auto&
v0,
const auto& v1) {
51 return v0.size() < v1.size();
54 auto max_ind =
max_jet(siblings, satisfiedBy);
56 std::vector<bool>
mask(max_ind+1,
false);
58 for (
const auto&
v : ind_stack){
60 for (
const auto&
e :
v) {
67 if (!
found) {
return false;}
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.