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 9 of file CombinationsGrouper.cxx.

9 {}

◆ CombinationsGrouper() [2/4]

CombinationsGrouper::CombinationsGrouper ( unsigned int  groupSize)

Definition at line 11 of file CombinationsGrouper.cxx.

11  :
12  m_groupSize{groupSize}{}

◆ CombinationsGrouper() [3/4]

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

Definition at line 15 of file CombinationsGrouper.cxx.

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

◆ CombinationsGrouper() [4/4]

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

Definition at line 21 of file CombinationsGrouper.cxx.

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

Member Function Documentation

◆ getName()

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

Implements IJetGrouper.

Definition at line 46 of file CombinationsGrouper.cxx.

46  {
47  return "CombinationsGrouper";
48 }

◆ next()

HypoJetVector CombinationsGrouper::next ( )
overridevirtual

Implements IJetGrouper.

Definition at line 28 of file CombinationsGrouper.cxx.

28  {
29  HypoJetGroupVector hjgv;
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 }

◆ toString()

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

Implements IJetGrouper.

Definition at line 50 of file CombinationsGrouper.cxx.

50  {
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 }

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
HypoJetGroupVector
std::vector< HypoJetVector > HypoJetGroupVector
Definition: HypoJetDefs.h:35
CombinationsGen
Definition: CombinationsGen.h:20
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:66
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:76
python.PyAthena.v
v
Definition: PyAthena.py:154
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
CombinationsGrouper::m_groupSize
unsigned int m_groupSize
Definition: CombinationsGrouper.h:25