|
ATLAS Offline Software
|
Go to the documentation of this file.
20 for (
unsigned int i = 0;
i < tes.size();
i++)
34 for (
unsigned int i = 0;
i < m_tes.size();
i++) {
36 if (m_tes[
i].
size() == 0) {
44 if (!
reset(
i) || !increment(
i)) {
60 if (!increment((
int)m_comb.size() - 1)) invalidate();
74 while (!ok)
if (!incrementByOne(
pos, ok))
return false;
84 if (
pos >= (
int)m_comb.size() ||
pos < 0)
return false;
89 if (m_idx[
pos] == (
int)m_tes[
pos].
size() - 1) {
92 if (
pos == 0)
return false;
95 if (!increment(
pos - 1))
return false;
101 if (!increment(
pos))
return false;
110 ok = !overlaps(m_comb[
pos], m_comb,
pos);
121 if (
pos >= (
int)m_comb.size() ||
pos < 0)
return false;
130 for (
unsigned int j =
pos; j > 0; j--) {
132 if (!m_comb[j - 1])
continue;
135 if (m_comb[j - 1]->getId() == m_tes[
pos][0]->getId()) {
136 m_idx[
pos] = m_idx[j - 1];
149 if (
idx < 0)
idx = teVec.size();
151 for (
int i = 0;
i <
idx;
i++) {
152 if (!teVec[
i])
return false;
153 if (overlaps(te1, teVec[
i]))
return true;
163 if (te1 == te2)
return true;
164 if (m_nav && m_nav->haveCommonRoI(te1, te2))
return true;
173 cout <<
"TEs:" << endl;
175 for (
unsigned int i = 0;
i < m_tes.size();
i++) {
177 for (
unsigned int j = 0; j < m_tes[
i].size(); j++) cout << m_tes[
i][j] <<
" ";
180 cout <<
"}" << endl << endl <<
"Comb = [ ";
181 for (
unsigned int i = 0;
i < m_comb.size();
i++) cout << m_comb[
i] <<
" ";
182 cout <<
"]" << endl <<
"Idxs = [ ";
183 for (
unsigned int i = 0;
i < m_idx.size();
i++) cout << m_idx[
i] <<
" ";
185 cout << (
isValid() ?
"Valid" :
"Invalid") << endl << endl;
209 for (
auto successor : successors ) {
210 if ( successor->getActiveState() ==
true and successor->getId() == m_spanId ) {
211 topos.insert(successor);
214 if ( not topos.empty() )
219 for (
auto predecessor : predecessors ) {
222 traverseUntilSeedsTopo(predecessor, topos);
223 if ( not topos.empty() )
234 std::set<const TriggerElement*> te1span;
235 traverseUntilSeedsTopo(
t1, te1span);
236 if ( te1span.empty() )
239 std::set<const TriggerElement*> te2span;
240 traverseUntilSeedsTopo(
t2, te2span);
241 if ( te2span.empty() )
ComboIterator & operator++()
Pre increment operator.
void print() const
Debug dump to std::cout.
void invalidate()
Method used to invalidate the current combination.
std::vector< ALFA_RawDataCollection_p1 > t1
bool incrementByOne(int pos, bool &ok)
Private increment method.
bool reset(int pos)
Private reset method.
ComboIteratorTopo(const std::vector< TEVec > &tes, const TrigNavStructure *nav, HLT::te_id_type topoSpan)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
static const std::vector< TriggerElement * > & getDirectSuccessors(const TriggerElement *te)
returns list of direct predecessors (nodes I seed)
bool increment(int pos)
Private increment method.
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
void traverseUntilSeedsTopo(const TriggerElement *start, std::set< const TriggerElement * > &topos) const
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
virtual bool overlaps(const TriggerElement *t1, const TriggerElement *t2) const
Method used to test overlaps between two TEs.
Iterator used to loop over multi-particle combinations.
std::vector< HLT::TriggerElement * > TEVec
virtual bool overlaps(const TriggerElement *t1, const TriggerElement *t2) const
Method used to test overlaps between two TEs.
std::vector< ALFA_RawDataContainer_p1 > t2
std::vector< TEVec > m_tes
Vector of vectors of TEs to be combined.
ComboIterator(const std::vector< TEVec > &tes, const TrigNavStructure *nav)
Constructor; gets a vector of TE vectors and a pointer to Navigation as arguments.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
bool rewind()
Rewind method, resetting the iterator to the first element.