Belle II Software development
ParticleIndexGenerator Class Reference

ParticleIndexGenerator is a generator for all the combinations of the particle indices stored in the particle lists. More...

#include <ParticleCombiner.h>

Public Member Functions

 ParticleIndexGenerator ()
 Default constructor.
 
void init (const std::vector< unsigned int > &_sizes)
 Initialises the generator to produce combinations with the given sizes of each particle list.
 
bool loadNext ()
 Loads the next combination.
 
const std::vector< unsigned int > & getCurrentIndices () const
 Returns theindices of the current loaded combination.
 

Private Attributes

unsigned int m_numberOfLists
 Number of lists which are combined.
 
unsigned int m_iCombination
 The current position of the combination.
 
unsigned int m_nCombinations
 The total amount of combinations.
 
std::vector< unsigned int > indices
 The indices of the current loaded combination.
 
std::vector< unsigned int > sizes
 The sizes of the particle lists which are combined.
 

Detailed Description

ParticleIndexGenerator is a generator for all the combinations of the particle indices stored in the particle lists.

It takes the total number of particles in each of the input lists e.g. 2,3 and returns all the possible combinations: 00, 01, 02, 10, 11, 12

Definition at line 49 of file ParticleCombiner.h.

Constructor & Destructor Documentation

◆ ParticleIndexGenerator()

Default constructor.

Definition at line 55 of file ParticleCombiner.h.

unsigned int m_iCombination
The current position of the combination.
unsigned int m_numberOfLists
Number of lists which are combined.
unsigned int m_nCombinations
The total amount of combinations.

Member Data Documentation

◆ indices

std::vector<unsigned int> indices
private

The indices of the current loaded combination.

Definition at line 79 of file ParticleCombiner.h.

◆ m_iCombination

unsigned int m_iCombination
private

The current position of the combination.

Definition at line 77 of file ParticleCombiner.h.

◆ m_nCombinations

unsigned int m_nCombinations
private

The total amount of combinations.

Definition at line 78 of file ParticleCombiner.h.

◆ m_numberOfLists

unsigned int m_numberOfLists
private

Number of lists which are combined.

Definition at line 76 of file ParticleCombiner.h.

◆ sizes

std::vector<unsigned int> sizes
private

The sizes of the particle lists which are combined.

Definition at line 80 of file ParticleCombiner.h.


The documentation for this class was generated from the following files: