KLFitter
v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
|
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. | |
Permutations & | operator= (const Permutations &obj) |
The (defaulted) assignment operator. | |
Member functions (Get) | |
KLFitter::Particles * | Particles () |
Return the original particles. More... | |
KLFitter::Particles * | ParticlesPermuted () |
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. | |
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.
KLFitter::Permutations::Permutations | ( | KLFitter::Particles ** | p, |
KLFitter::Particles ** | pp | ||
) |
The default constructor.
p | A pointer to the pointer to the original set of particles. |
pp | A pointer to the pointer to the permutated set of particles. |
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.
ptype | The type of the particle. |
indexVectorPosition1 | Vector of indices of first set of particle. |
indexVectorPosition2 | Vector of corresponding indices for second set of particle. |
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).
ptype | The type of the particle. |
indexVector | Vector of indices. |
|
inline |
Return the original particles.
|
inline |
Return the current permutation of jets and leptons.
|
inline |
Return the current permutation index.
std::vector< std::vector< int > > * KLFitter::Permutations::PermutationTable | ( | ) |
Return 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.
ptype | The type of the particle. |
index | The index of the particle. |
position | The position in which it is forbidden. |
int KLFitter::Permutations::Reset | ( | ) |
Reset Permutations.
int KLFitter::Permutations::SetParticles | ( | KLFitter::Particles * | particles | ) |
Set the original particles.
particles | A set of particles. |
int KLFitter::Permutations::SetPermutation | ( | int | index | ) |
Set the permutation.
index | The permutation index. |