ATLAS Offline Software
Loading...
Searching...
No Matches
JetGroupSingleClique.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include <set>
7#include <string>
8#include <sstream>
9
10
11JetGroupSingleClique::JetGroupSingleClique(const std::vector<std::size_t>& satisfyingJets,
12 std::size_t n_required){
13
14 // Make a jet group for the special case of a simple mono-clique tree.
15 // Only check needed is that there are enough jets. As the three is mono-clique
16 // all Conditions pass the same jets. Only the first condition need be checked.
17 // No unions need be made.
18
19 if (satisfyingJets.empty()) {
20 m_done = true;
21 } else if (satisfyingJets.size() < n_required) {
22 m_done = true;
23 } else {
24 m_jetGroupIndices = satisfyingJets;
26 m_jetGroupIndices.end());
27 m_done = false;
28 }
29
30}
31
32
33std::vector<std::size_t> JetGroupSingleClique::next(const Collector& collector){
34 if(collector){
35 std::stringstream sstr;
36 sstr << "no of indices " << m_jetGroupIndices.size()
37 << " done " << std::boolalpha << m_done;
38 collector->collect("JetGroupSingleClique::next()", sstr.str());
39 }
40
41 if (m_done) {
42 return std::vector<std::size_t>();
43 }
44
45 m_done = true;
46 return m_jetGroupIndices;
47}
48
49bool JetGroupSingleClique::valid() const {return true;}
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
virtual void collect(const std::string &, const std::string &)=0
JetGroupSingleClique(const std::vector< std::size_t > &satisfyingJets, std::size_t n_required)
virtual bool valid() const override
virtual std::vector< std::size_t > next(const Collector &) override
std::vector< std::size_t > m_jetGroupIndices
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.