ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
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
5
#include "
./JetGroupSingleClique.h
"
6
#include <set>
7
#include <string>
8
#include <sstream>
9
10
11
JetGroupSingleClique::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;
25
std::sort
(
m_jetGroupIndices
.begin(),
26
m_jetGroupIndices
.end());
27
m_done
=
false
;
28
}
29
30
}
31
32
33
std::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
49
bool
JetGroupSingleClique::valid
()
const
{
return
true
;}
JetGroupSingleClique.h
Collector
std::unique_ptr< ITrigJetHypoInfoCollector > Collector
Definition
JetGroupSingleClique.h:18
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
JetGroupSingleClique::JetGroupSingleClique
JetGroupSingleClique(const std::vector< std::size_t > &satisfyingJets, std::size_t n_required)
Definition
JetGroupSingleClique.cxx:11
JetGroupSingleClique::valid
virtual bool valid() const override
Definition
JetGroupSingleClique.cxx:49
JetGroupSingleClique::next
virtual std::vector< std::size_t > next(const Collector &) override
Definition
JetGroupSingleClique.cxx:33
JetGroupSingleClique::m_done
bool m_done
Definition
JetGroupSingleClique.h:34
JetGroupSingleClique::m_jetGroupIndices
std::vector< std::size_t > m_jetGroupIndices
Definition
JetGroupSingleClique.h:33
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition
DVL_algorithms.h:554
Generated on
for ATLAS Offline Software by
1.17.0