ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CombinationsGrouper Class Reference

#include <CombinationsGrouper.h>

Inheritance diagram for CombinationsGrouper:
Collaboration diagram for CombinationsGrouper:

Public Member Functions

 CombinationsGrouper ()
 
 CombinationsGrouper (unsigned int)
 
 CombinationsGrouper (unsigned int, const HypoJetVector &)
 
 CombinationsGrouper (unsigned int, const HypoJetCIter &b, const HypoJetCIter &e)
 
virtual HypoJetVector next () override
 
virtual std::string getName () const override
 
virtual std::string toString () const override
 

Private Attributes

unsigned int m_groupSize {0u}
 
HypoJetVector m_jets
 

Detailed Description

Definition at line 10 of file CombinationsGrouper.h.

Constructor & Destructor Documentation

◆ CombinationsGrouper() [1/4]

CombinationsGrouper::CombinationsGrouper ( )

Definition at line 10 of file CombinationsGrouper.cxx.

10 {}

◆ CombinationsGrouper() [2/4]

CombinationsGrouper::CombinationsGrouper ( unsigned int  groupSize)

Definition at line 12 of file CombinationsGrouper.cxx.

12  :
13  m_groupSize{groupSize}{}

◆ CombinationsGrouper() [3/4]

CombinationsGrouper::CombinationsGrouper ( unsigned int  groupSize,
const HypoJetVector jets 
)

Definition at line 16 of file CombinationsGrouper.cxx.

17  :
18  m_groupSize(groupSize), m_jets{jets}{
19 }

◆ CombinationsGrouper() [4/4]

CombinationsGrouper::CombinationsGrouper ( unsigned int  groupSize,
const HypoJetCIter b,
const HypoJetCIter e 
)

Definition at line 22 of file CombinationsGrouper.cxx.

24  :
25  m_groupSize(groupSize), m_jets{b, e}{
26 }

Member Function Documentation

◆ getName()

std::string CombinationsGrouper::getName ( ) const
overridevirtual

Implements IJetGrouper.

Definition at line 47 of file CombinationsGrouper.cxx.

47  {
48  return "CombinationsGrouper";
49 }

◆ next()

HypoJetVector CombinationsGrouper::next ( )
overridevirtual

Implements IJetGrouper.

Definition at line 29 of file CombinationsGrouper.cxx.

29  {
30  HypoJetGroupVector hjgv;
31 
32  // create a combinations generator. Used to select the jets
33  // to be tested by the condition objects
34  CombinationsGen combgen(m_jets.size(), m_groupSize);
35 
36  auto combs = combgen.next();
37  if (combs.second == false){
38  return HypoJetVector{};
39  }
40 
42  for(auto i : combs.first){ v.push_back(*(m_jets.begin() + i));}
43 
44  return HypoJetVector(v);
45 }

◆ toString()

std::string CombinationsGrouper::toString ( ) const
overridevirtual

Implements IJetGrouper.

Definition at line 51 of file CombinationsGrouper.cxx.

51  {
52 
53  std::stringstream ss;
54 
55  ss << "CombinationsGrouper - create all combinations of ";
56  ss << "jets of length " ;
57  ss << m_groupSize << '\n';
58 
59  return ss.str();
60 }

Member Data Documentation

◆ m_groupSize

unsigned int CombinationsGrouper::m_groupSize {0u}
private

Definition at line 25 of file CombinationsGrouper.h.

◆ m_jets

HypoJetVector CombinationsGrouper::m_jets
private

Definition at line 26 of file CombinationsGrouper.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
HypoJetGroupVector
std::vector< HypoJetVector > HypoJetGroupVector
Definition: HypoJetDefs.h:35
CombinationsGen
Definition: CombinationsGen.h:20
lumiFormat.i
int i
Definition: lumiFormat.py:85
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
CombinationsGrouper::m_jets
HypoJetVector m_jets
Definition: CombinationsGrouper.h:26
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.PyAthena.v
v
Definition: PyAthena.py:154
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
CombinationsGrouper::m_groupSize
unsigned int m_groupSize
Definition: CombinationsGrouper.h:25