KLFitter
v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
|
A class describing particles. More...
#include <Particles.h>
Public Types | |
enum | ParticleType { kParton, kElectron, kMuon, kTau, kNeutrino, kBoson, kPhoton, kTrack } |
Enumerator for particle types. More... | |
enum | TrueFlavorType { kLight, kB, kLightUp, kLightDown, kNone } |
An enumerator for the true jet flavor. More... | |
Public Member Functions | |
Constructors and destructors | |
Particles () | |
The default constructor. | |
Particles (const Particles &o) | |
The (defaulted) copy constructor. | |
~Particles () | |
The (defaulted) destructor. | |
Particles & | operator= (const Particles &o) |
The (defaulted) assignment operator. | |
Member functions (Get) | |
int | NPartons () const |
Return the number of partons. More... | |
int | NElectrons () const |
Return the number of electrons. More... | |
int | NMuons () const |
Return the number of muons. More... | |
int | NTaus () const |
Return the number of taus. More... | |
int | NNeutrinos () const |
Return the number of neutrinos. More... | |
int | NBosons () const |
Return the number of bosons. More... | |
int | NPhotons () const |
Return the number of photons. More... | |
int | NTracks () const |
Return the number of tracks. More... | |
TLorentzVector * | Particle (const std::string &name) |
Return the particle with a certain name. More... | |
TLorentzVector * | Particle (int index, KLFitter::Particles::ParticleType ptype) |
Return a particle with some index and type. More... | |
int | FindParticle (const std::string &name, TLorentzVector *&particle, int *index, KLFitter::Particles::ParticleType *ptype) |
Find a particle by name. More... | |
TLorentzVector * | Parton (int index) |
Return the parton at some index. More... | |
TLorentzVector * | Electron (int index) |
Return the electron at some index. More... | |
TLorentzVector * | Muon (int index) |
Return the muon at some index. More... | |
TLorentzVector * | Tau (int index) |
Return the tau at some index. More... | |
TLorentzVector * | Boson (int index) |
Return the boson at some index. More... | |
TLorentzVector * | Neutrino (int index) |
Return the neutrino at some index. More... | |
TLorentzVector * | Photon (int index) |
Return the photon at some index. More... | |
TLorentzVector * | Track (int index) |
Return the track at some index. More... | |
int | NParticles () const |
Return the number of particles. More... | |
int | NParticles (KLFitter::Particles::ParticleType ptype) const |
Return the number of particles of a certain type. More... | |
std::string | NameParticle (int index, KLFitter::Particles::ParticleType ptype) const |
Return the name of a particle. More... | |
std::string | NameElectron (int index) const |
Return the name of a electron. More... | |
std::string | NameMuon (int index) const |
Return the name of a muon. More... | |
std::string | NameTau (int index) const |
Return the name of a tau. More... | |
std::string | NameBoson (int index) const |
Return the name of a boson. More... | |
std::string | NameNeutrino (int index) const |
Return the name of a neutrino. More... | |
std::string | NamePhoton (int index) const |
Return the name of a photon. More... | |
int | JetIndex (int index) const |
Return the index of the measured particle. More... | |
int | ElectronIndex (int index) const |
Return the index of the measured particle. More... | |
int | MuonIndex (int index) const |
Return the index of the measured particle. More... | |
int | PhotonIndex (int index) const |
Return the index of the measured particle. More... | |
int | TrackIndex (int index) const |
Return the index of the measured particle. More... | |
TrueFlavorType | TrueFlavor (int index) const |
Return the true flavor of a parton. More... | |
bool | IsBTagged (int index) const |
Return has the jet been b-tagged? More... | |
double | BTaggingEfficiency (int index) const |
Return the jet b-tagging efficiency. More... | |
double | BTaggingRejection (int index) const |
Return the jet b-tagging rejection. More... | |
double | BTagWeight (int index) const |
Return the jet b-tagging weight. More... | |
bool | BTagWeightSet (int index) const |
Return the bool of a set tagging weight. More... | |
const std::vector< double > * | Uncertainties (int index, KLFitter::Particles::ParticleType ptype) const |
Return the uncertainty of a particle with some index and type. More... | |
double | DetEta (int index, KLFitter::Particles::ParticleType ptype) const |
Return the detector eta of a particle with some index and type. More... | |
float | LeptonCharge (int index, KLFitter::Particles::ParticleType ptype) const |
Return the charge of the lepton with some index and type. More... | |
int | NBTags () const |
Return the number of b-tags. | |
Member functions (Set) | |
int | SetIsBTagged (int index, bool isBTagged) |
Set has the jet been b-tagged? More... | |
int | SetBTaggingEfficiency (int index, double btagEff) |
Set the jet b-tagging efficiency. More... | |
int | SetBTaggingRejection (int index, double btagRej) |
Set the jet b-tagging rejection. More... | |
int | SetBTagWeight (int index, double btagweight) |
Set the jet b-tagging weight. More... | |
int | SetBTagWeightSet (int index, bool btagweightset) |
Set bool for set jet b-tagging weight. More... | |
Member functions (misc) | |
int | AddParticle (const TLorentzVector &particle, double DetEta, float LepCharge, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1) |
Add a particle to a list of particles. More... | |
int | AddParticle (const TLorentzVector *const particle, double DetEta, float LepCharge, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1) |
DEPRECATED FUNCTION. More... | |
int | AddParticle (const TLorentzVector &particle, double DetEta, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1, bool isBtagged=false, double bTagEff=-1., double bTagRej=-1., TrueFlavorType trueflav=kNone, double btagweight=999) |
Add a particle to a list of particles. More... | |
int | AddParticle (const TLorentzVector *const particle, double DetEta, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1, bool isBtagged=false, double bTagEff=-1., double bTagRej=-1., TrueFlavorType trueflav=kNone, double btagweight=999) |
DEPRECATED FUNCTION. More... | |
int | AddParticle (const TLorentzVector &particle, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1, bool isBtagged=false, double bTagEff=-1., double bTagRej=-1., TrueFlavorType trueflav=kNone, double btagweight=999) |
Add a particle to a list of particles. More... | |
int | AddParticle (const TLorentzVector *const particle, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1, bool isBtagged=false, double bTagEff=-1., double bTagRej=-1., TrueFlavorType trueflav=kNone, double btagweight=999) |
DEPRECATED FUNCTION. More... | |
int | AddParticle (const TLorentzVector &particle, KLFitter::Particles::ParticleType ptype, std::string name, int measuredindex, TrueFlavorType trueflav, double btagweight=999) |
Add a particle to a list of particles (especially for model particles). More... | |
int | AddParticle (const TLorentzVector *const particle, KLFitter::Particles::ParticleType ptype, std::string name, int measuredindex, TrueFlavorType trueflav, double btagweight=999) |
DEPRECATED FUNCTION. More... | |
int | AddParticle (const TLorentzVector &particle, KLFitter::Particles::ParticleType ptype, std::string name="", int measuredindex=-1, const std::vector< double > &uncertainies=std::vector< double >()) |
Add a particle to a list of particles. More... | |
int | RemoveParticle (int index, KLFitter::Particles::ParticleType ptype) |
Removes a particle from a list of particles. More... | |
int | RemoveParticle (const std::string &name) |
Removes a particle from a list of particles. More... | |
const std::vector< TLorentzVector > * | ParticleContainer (KLFitter::Particles::ParticleType ptype) const |
Return the const particle container of a type of particles. More... | |
std::vector< TLorentzVector > * | ParticleContainer (KLFitter::Particles::ParticleType ptype) |
Return the particle container of a type of particles. More... | |
const std::vector< std::string > * | ParticleNameContainer (KLFitter::Particles::ParticleType ptype) const |
Return the (const) particle name container of a type of particles. More... | |
std::vector< std::string > * | ParticleNameContainer (KLFitter::Particles::ParticleType ptype) |
Return the particle name container of a type of particles. More... | |
int | CheckIndex (const std::vector< TLorentzVector > &container, int index) const |
Checks if the index is within range. More... | |
A class describing particles.
This class contains sets of TLorentzVectors for quarks, leptons, etc.
int KLFitter::Particles::AddParticle | ( | const TLorentzVector & | particle, |
double | DetEta, | ||
float | LepCharge, | ||
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 |
||
) |
Add a particle to a list of particles.
particle | A pointer to the particle. |
DetEta | The Detector Eta of the particle. |
LepCharge | The Charge of the particle. |
ptype | The type of particle. |
name | The name of the particle. |
measuredindex | The index of the associated measured particle. |
int KLFitter::Particles::AddParticle | ( | const TLorentzVector *const | particle, |
double | DetEta, | ||
float | LepCharge, | ||
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 |
||
) |
DEPRECATED FUNCTION.
This is an overloaded implementation of the previous function using TLorentzVector pointers instead of const ref. The usage of this function is deprecated and it will be removed in the next major release. Please switch to the above implementation.
int KLFitter::Particles::AddParticle | ( | const TLorentzVector & | particle, |
double | DetEta, | ||
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 , |
||
bool | isBtagged = false , |
||
double | bTagEff = -1. , |
||
double | bTagRej = -1. , |
||
TrueFlavorType | trueflav = kNone , |
||
double | btagweight = 999 |
||
) |
Add a particle to a list of particles.
particle | A pointer to the particle. |
DetEta | The Detector Eta of the particle. |
ptype | The type of particle. |
name | The name of the particle. |
measuredindex | The index of the associated measured particle. |
isBtagged | Has the particle been b-tagged? |
bTagEff | B-tagging efficiency of the particle. |
bTagRej | B-tagging rejection of the particle. |
trueflav | The true flavor (only for model particles). |
btagweight | The b tagger weight). |
int KLFitter::Particles::AddParticle | ( | const TLorentzVector *const | particle, |
double | DetEta, | ||
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 , |
||
bool | isBtagged = false , |
||
double | bTagEff = -1. , |
||
double | bTagRej = -1. , |
||
TrueFlavorType | trueflav = kNone , |
||
double | btagweight = 999 |
||
) |
DEPRECATED FUNCTION.
This is an overloaded implementation of the previous function using TLorentzVector pointers instead of const ref. The usage of this function is deprecated and it will be removed in the next major release. Please switch to the above implementation.
int KLFitter::Particles::AddParticle | ( | const TLorentzVector & | particle, |
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 , |
||
bool | isBtagged = false , |
||
double | bTagEff = -1. , |
||
double | bTagRej = -1. , |
||
TrueFlavorType | trueflav = kNone , |
||
double | btagweight = 999 |
||
) |
Add a particle to a list of particles.
particle | A pointer to the particle. |
ptype | The type of particle. |
name | The name of the particle. |
isBtagged | Has the particle been b-tagged? |
bTagEff | B-tagging efficiency of the particle. |
bTagRej | B-tagging rejection of the particle. |
measuredindex | The index of the associated measured particle. |
trueflav | The true flavor (only for model particles). |
btagweight | The b tagger weight). |
int KLFitter::Particles::AddParticle | ( | const TLorentzVector *const | particle, |
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 , |
||
bool | isBtagged = false , |
||
double | bTagEff = -1. , |
||
double | bTagRej = -1. , |
||
TrueFlavorType | trueflav = kNone , |
||
double | btagweight = 999 |
||
) |
DEPRECATED FUNCTION.
This is an overloaded implementation of the previous function using TLorentzVector pointers instead of const ref. The usage of this function is deprecated and it will be removed in the next major release. Please switch to the above implementation.
int KLFitter::Particles::AddParticle | ( | const TLorentzVector & | particle, |
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name, | ||
int | measuredindex, | ||
TrueFlavorType | trueflav, | ||
double | btagweight = 999 |
||
) |
Add a particle to a list of particles (especially for model particles).
particle | A pointer to the particle. |
ptype | The type of particle. |
name | The name of the particle. |
measuredindex | The index of the associated measured particle. |
trueflav | The true flavor (only for model particles). |
btagweight | The b tagger weight). |
int KLFitter::Particles::AddParticle | ( | const TLorentzVector *const | particle, |
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name, | ||
int | measuredindex, | ||
TrueFlavorType | trueflav, | ||
double | btagweight = 999 |
||
) |
DEPRECATED FUNCTION.
This is an overloaded implementation of the previous function using TLorentzVector pointers instead of const ref. The usage of this function is deprecated and it will be removed in the next major release. Please switch to the above implementation.
int KLFitter::Particles::AddParticle | ( | const TLorentzVector & | particle, |
KLFitter::Particles::ParticleType | ptype, | ||
std::string | name = "" , |
||
int | measuredindex = -1 , |
||
const std::vector< double > & | uncertainies = std::vector<double>() |
||
) |
Add a particle to a list of particles.
particle | A pointer to the particle. |
ptype | The type of particle. |
name | The name of the particle. |
uncertainies | The associated uncertainties. |
TLorentzVector * KLFitter::Particles::Boson | ( | int | index | ) |
Return the boson at some index.
index | The boson index |
|
inline |
Return the jet b-tagging efficiency.
index | The parton index |
|
inline |
Return the jet b-tagging rejection.
index | The parton index |
|
inline |
Return the jet b-tagging weight.
index | The parton index |
|
inline |
Return the bool of a set tagging weight.
index | The parton index |
int KLFitter::Particles::CheckIndex | ( | const std::vector< TLorentzVector > & | container, |
int | index | ||
) | const |
Checks if the index is within range.
container | The particle container. |
index | The index of particle. |
double KLFitter::Particles::DetEta | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) | const |
Return the detector eta of a particle with some index and type.
index | The index of the particle |
ptype | The particle type. |
TLorentzVector * KLFitter::Particles::Electron | ( | int | index | ) |
Return the electron at some index.
index | The electron index |
int KLFitter::Particles::ElectronIndex | ( | int | index | ) | const |
Return the index of the measured particle.
index | The index of the model particle. |
int KLFitter::Particles::FindParticle | ( | const std::string & | name, |
TLorentzVector *& | particle, | ||
int * | index, | ||
KLFitter::Particles::ParticleType * | ptype | ||
) |
Find a particle by name.
name | The name of the particle. |
particle | A reference to the pointer to the 4-vector. |
index | The pointer to the index. |
ptype | The pointer to the particle type. |
|
inline |
Return has the jet been b-tagged?
index | The parton index |
int KLFitter::Particles::JetIndex | ( | int | index | ) | const |
Return the index of the measured particle.
index | The index of the model particle. |
float KLFitter::Particles::LeptonCharge | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) | const |
Return the charge of the lepton with some index and type.
index | The index of the particle |
ptype | The particle type. |
TLorentzVector * KLFitter::Particles::Muon | ( | int | index | ) |
Return the muon at some index.
index | The muon index |
int KLFitter::Particles::MuonIndex | ( | int | index | ) | const |
Return the index of the measured particle.
index | The index of the model particle. |
std::string KLFitter::Particles::NameBoson | ( | int | index | ) | const |
Return the name of a boson.
index | The index of the boson. |
std::string KLFitter::Particles::NameElectron | ( | int | index | ) | const |
Return the name of a electron.
index | The index of the electron. |
std::string KLFitter::Particles::NameMuon | ( | int | index | ) | const |
Return the name of a muon.
index | The index of the muon. |
std::string KLFitter::Particles::NameNeutrino | ( | int | index | ) | const |
Return the name of a neutrino.
index | The index of the neutrino. |
std::string KLFitter::Particles::NameParticle | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) | const |
Return the name of a particle.
index | The index of the particle. |
ptype | The type of the particle. |
std::string KLFitter::Particles::NamePhoton | ( | int | index | ) | const |
Return the name of a photon.
index | The index of the photon. |
std::string KLFitter::Particles::NameTau | ( | int | index | ) | const |
Return the name of a tau.
index | The index of the tau. |
|
inline |
Return the number of bosons.
|
inline |
Return the number of electrons.
TLorentzVector * KLFitter::Particles::Neutrino | ( | int | index | ) |
Return the neutrino at some index.
index | The neutrino index |
|
inline |
Return the number of muons.
|
inline |
Return the number of neutrinos.
|
inline |
Return the number of particles.
int KLFitter::Particles::NParticles | ( | KLFitter::Particles::ParticleType | ptype | ) | const |
Return the number of particles of a certain type.
ptype | The particle type. |
|
inline |
Return the number of partons.
|
inline |
Return the number of photons.
|
inline |
Return the number of taus.
|
inline |
Return the number of tracks.
TLorentzVector * KLFitter::Particles::Particle | ( | const std::string & | name | ) |
Return the particle with a certain name.
name | The name of the particle. |
TLorentzVector * KLFitter::Particles::Particle | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) |
Return a particle with some index and type.
index | The index of the particle. |
ptype | The type of the particle. |
const std::vector< TLorentzVector > * KLFitter::Particles::ParticleContainer | ( | KLFitter::Particles::ParticleType | ptype | ) | const |
Return the const particle container of a type of particles.
ptype | The type of the particle. |
std::vector< TLorentzVector > * KLFitter::Particles::ParticleContainer | ( | KLFitter::Particles::ParticleType | ptype | ) |
Return the particle container of a type of particles.
ptype | The type of the particle. |
const std::vector< std::string > * KLFitter::Particles::ParticleNameContainer | ( | KLFitter::Particles::ParticleType | ptype | ) | const |
Return the (const) particle name container of a type of particles.
ptype | The type of the particle. |
std::vector< std::string > * KLFitter::Particles::ParticleNameContainer | ( | KLFitter::Particles::ParticleType | ptype | ) |
Return the particle name container of a type of particles.
ptype | The type of the particle. |
TLorentzVector * KLFitter::Particles::Parton | ( | int | index | ) |
Return the parton at some index.
index | The parton index |
TLorentzVector * KLFitter::Particles::Photon | ( | int | index | ) |
Return the photon at some index.
index | The photon index |
int KLFitter::Particles::PhotonIndex | ( | int | index | ) | const |
Return the index of the measured particle.
index | The index of the model particle. |
int KLFitter::Particles::RemoveParticle | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) |
Removes a particle from a list of particles.
index | The index of the particle. |
ptype | The type of the particle. |
int KLFitter::Particles::RemoveParticle | ( | const std::string & | name | ) |
Removes a particle from a list of particles.
name | The name of the particle. |
int KLFitter::Particles::SetBTaggingEfficiency | ( | int | index, |
double | btagEff | ||
) |
Set the jet b-tagging efficiency.
index | The parton index |
btagEff | The b-tagging efficiency. |
int KLFitter::Particles::SetBTaggingRejection | ( | int | index, |
double | btagRej | ||
) |
Set the jet b-tagging rejection.
index | The parton index |
btagRej | The b-tagging probability. |
int KLFitter::Particles::SetBTagWeight | ( | int | index, |
double | btagweight | ||
) |
Set the jet b-tagging weight.
index | The parton index |
btagweight | The b-tagging weight. |
int KLFitter::Particles::SetBTagWeightSet | ( | int | index, |
bool | btagweightset | ||
) |
Set bool for set jet b-tagging weight.
index | The parton index |
btagweightset | The b-tagging probability. |
int KLFitter::Particles::SetIsBTagged | ( | int | index, |
bool | isBTagged | ||
) |
Set has the jet been b-tagged?
index | The parton index |
isBTagged | The parton b-tagging boolean. |
TLorentzVector * KLFitter::Particles::Tau | ( | int | index | ) |
Return the tau at some index.
index | The tau index |
TLorentzVector * KLFitter::Particles::Track | ( | int | index | ) |
Return the track at some index.
index | The track index |
int KLFitter::Particles::TrackIndex | ( | int | index | ) | const |
Return the index of the measured particle.
index | The index of the model particle. |
|
inline |
Return the true flavor of a parton.
index | The parton index |
const std::vector< double > * KLFitter::Particles::Uncertainties | ( | int | index, |
KLFitter::Particles::ParticleType | ptype | ||
) | const |
Return the uncertainty of a particle with some index and type.
index | The index of the particle |
ptype | The particle type. |