KLFitter  v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
List of all members
KLFitter::Permutations Class Referencefinal

A class permuting jets, electrons, muons and photons. More...

#include <Permutations.h>

Public Member Functions

Constructors and destructors
 Permutations (KLFitter::Particles **p, KLFitter::Particles **pp)
 The default constructor. More...
 
 Permutations (const Permutations &o)
 The (defaulted) copy constructor.
 
 ~Permutations ()
 The (defaulted) destructor.
 
Permutationsoperator= (const Permutations &obj)
 The (defaulted) assignment operator.
 
Member functions (Get)
KLFitter::ParticlesParticles ()
 Return the original particles. More...
 
KLFitter::ParticlesParticlesPermuted ()
 Return the current permutation of jets and leptons. More...
 
std::vector< std::vector< int > > * PermutationTable ()
 Return the permutation table. More...
 
int NPermutations ()
 Return the number of permutations.
 
int PermutationIndex ()
 Return the current permutation index. More...
 
std::vector< std::vector< int > > * TablePartons ()
 
std::vector< std::vector< int > > * TableElectrons ()
 
std::vector< std::vector< int > > * TableMuons ()
 
std::vector< std::vector< int > > * TablePhotons ()
 
std::vector< std::vector< int > > * TableTracks ()
 
Member functions (Set)
int SetParticles (KLFitter::Particles *particles)
 Set the original particles. More...
 
int SetPermutation (int index)
 Set the permutation. More...
 
Member functions (misc)
int CreatePermutations (int nPartonsInPermutations=-1)
 Create all possible permutations of jets and leptons. More...
 
int InvariantParticlePermutations (KLFitter::Particles::ParticleType ptype, std::vector< int > indexVector)
 Remove permutations in which all indices in the vector indexVector are exchanged for the given particle type. More...
 
int InvariantParticleGroupPermutations (KLFitter::Particles::ParticleType ptype, std::vector< int > indexVectorPosition1, std::vector< int > indexVectorPosition2)
 Remove permutations in which all indices in the vector indexVectorPosition1 are exchanged with the corresponding indices in indexVectorPosition2 for the given particle type. More...
 
int RemoveParticlePermutations (KLFitter::Particles::ParticleType ptype, int index, int position)
 Remove permutations in which a certain particles is in a certain position. More...
 
int Reset ()
 Reset Permutations. More...
 
int CreateSubTable (int Nobj, std::vector< std::vector< int > > *table, int Nmax=-1)
 Creates table of permutations.
 

Detailed Description

A class permuting jets, electrons, muons and photons.

The class gets a pointer to the orignal set of particles and a pointer to the currently used permutations. It can calculate all permutations and created a table. The pointer of the current permutation is set to the entry in the table.

Constructor & Destructor Documentation

KLFitter::Permutations::Permutations ( KLFitter::Particles **  p,
KLFitter::Particles **  pp 
)

The default constructor.

Parameters
pA pointer to the pointer to the original set of particles.
ppA pointer to the pointer to the permutated set of particles.

Member Function Documentation

int KLFitter::Permutations::CreatePermutations ( int  nPartonsInPermutations = -1)

Create all possible permutations of jets and leptons.

However, make permutations with exactly nPartonsInPermutations.

int KLFitter::Permutations::InvariantParticleGroupPermutations ( KLFitter::Particles::ParticleType  ptype,
std::vector< int >  indexVectorPosition1,
std::vector< int >  indexVectorPosition2 
)

Remove permutations in which all indices in the vector indexVectorPosition1 are exchanged with the corresponding indices in indexVectorPosition2 for the given particle type.

This is useful to reduce the number of permutations if interchanging a whole set of particles doesn't have any effect, e.g., the particles coming from the two hadronic top quarks in the fully hadronic channel.

Parameters
ptypeThe type of the particle.
indexVectorPosition1Vector of indices of first set of particle.
indexVectorPosition2Vector of corresponding indices for second set of particle.
Returns
An error code.
int KLFitter::Permutations::InvariantParticlePermutations ( KLFitter::Particles::ParticleType  ptype,
std::vector< int >  indexVector 
)

Remove permutations in which all indices in the vector indexVector are exchanged for the given particle type.

This is useful to reduce the number of permutations if interchanging for example jets doesn't have any effect, e.g., if two jets come from a W (top).

Parameters
ptypeThe type of the particle.
indexVectorVector of indices.
Returns
An error code.
KLFitter::Particles* KLFitter::Permutations::Particles ( )
inline

Return the original particles.

Returns
A pointer to the particles.
KLFitter::Particles* KLFitter::Permutations::ParticlesPermuted ( )
inline

Return the current permutation of jets and leptons.

Returns
A pointer to the permuted particles.
int KLFitter::Permutations::PermutationIndex ( )
inline

Return the current permutation index.

Returns
The current permutation index.
std::vector< std::vector< int > > * KLFitter::Permutations::PermutationTable ( )

Return the permutation table.

Returns
A pointer to the permutation table.
int KLFitter::Permutations::RemoveParticlePermutations ( KLFitter::Particles::ParticleType  ptype,
int  index,
int  position 
)

Remove permutations in which a certain particles is in a certain position.

This is useful to reduce the number of permutations if for example a b-tagged jet is forbidden in the position of a light jet.

Parameters
ptypeThe type of the particle.
indexThe index of the particle.
positionThe position in which it is forbidden.
Returns
An error code.
int KLFitter::Permutations::Reset ( )

Reset Permutations.

Returns
An error code.
int KLFitter::Permutations::SetParticles ( KLFitter::Particles particles)

Set the original particles.

Parameters
particlesA set of particles.
Returns
An error code.
int KLFitter::Permutations::SetPermutation ( int  index)

Set the permutation.

Parameters
indexThe permutation index.
Returns
An error code.

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