ATLAS Offline Software
Loading...
Searching...
No Matches
CombinationsGrouper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8
10
12 m_groupSize{groupSize}{}
13
14
16 const HypoJetVector& jets):
17 m_groupSize(groupSize), m_jets{jets}{
18}
19
20
22 const HypoJetCIter& b,
23 const HypoJetCIter& e):
24 m_groupSize(groupSize), m_jets{b, e}{
25}
26
27
30
31 // create a combinations generator. Used to select the jets
32 // to be tested by the condition objects
33 CombinationsGen combgen(m_jets.size(), m_groupSize);
34
35 auto combs = combgen.next();
36 if (combs.second == false){
37 return HypoJetVector{};
38 }
39
41 for(auto i : combs.first){ v.push_back(*(m_jets.begin() + i));}
42
43 return HypoJetVector(std::move(v));
44}
45
46std::string CombinationsGrouper::getName() const {
47 return "CombinationsGrouper";
48}
49
50std::string CombinationsGrouper::toString() const {
51
52 std::string s= "CombinationsGrouper - create all combinations of jets of length ";
53 s+= std::to_string(m_groupSize) + '\n';
54
55 return s;
56}
57
58
HypoJetVector::const_iterator HypoJetCIter
Definition HypoJetDefs.h:29
std::vector< HypoJetVector > HypoJetGroupVector
Definition HypoJetDefs.h:35
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::pair< std::vector< unsigned int >, bool > next()
virtual HypoJetVector next() override
virtual std::string getName() const override
virtual std::string toString() const override