KLFitter  v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
Public Types | List of all members
KLFitter::Particles Class Referencefinal

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.
 
Particlesoperator= (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...
 

Detailed Description

A class describing particles.

This class contains sets of TLorentzVectors for quarks, leptons, etc.

Member Enumeration Documentation

Enumerator for particle types.

Enumerator
kParton 

Particle type parton.

kElectron 

Particle type electron.

kMuon 

Particle type muon.

kTau 

Particle type tau.

kNeutrino 

Particle type neutrino.

kBoson 

Particle type boson.

kPhoton 

Particle type photon.

kTrack 

Particle type track.

An enumerator for the true jet flavor.

Enumerator
kLight 

Light quark.

kB 

B-quark.

kLightUp 

Up-type light quark.

kLightDown 

Down-type light quark.

kNone 

Not specified.

Member Function Documentation

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.

Parameters
particleA pointer to the particle.
DetEtaThe Detector Eta of the particle.
LepChargeThe Charge of the particle.
ptypeThe type of particle.
nameThe name of the particle.
measuredindexThe index of the associated measured particle.
Returns
An error code.
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.

Parameters
particleA pointer to the particle.
DetEtaThe Detector Eta of the particle.
ptypeThe type of particle.
nameThe name of the particle.
measuredindexThe index of the associated measured particle.
isBtaggedHas the particle been b-tagged?
bTagEffB-tagging efficiency of the particle.
bTagRejB-tagging rejection of the particle.
trueflavThe true flavor (only for model particles).
btagweightThe b tagger weight).
Returns
An error code.
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.

Parameters
particleA pointer to the particle.
ptypeThe type of particle.
nameThe name of the particle.
isBtaggedHas the particle been b-tagged?
bTagEffB-tagging efficiency of the particle.
bTagRejB-tagging rejection of the particle.
measuredindexThe index of the associated measured particle.
trueflavThe true flavor (only for model particles).
btagweightThe b tagger weight).
Returns
An error code.
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).

Parameters
particleA pointer to the particle.
ptypeThe type of particle.
nameThe name of the particle.
measuredindexThe index of the associated measured particle.
trueflavThe true flavor (only for model particles).
btagweightThe b tagger weight).
Returns
An error code.
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.

Parameters
particleA pointer to the particle.
ptypeThe type of particle.
nameThe name of the particle.
uncertainiesThe associated uncertainties.
TLorentzVector * KLFitter::Particles::Boson ( int  index)

Return the boson at some index.

Parameters
indexThe boson index
Returns
A pointer to the TLorentzVector of the boson.
double KLFitter::Particles::BTaggingEfficiency ( int  index) const
inline

Return the jet b-tagging efficiency.

Parameters
indexThe parton index
Returns
The jet b-tagging efficiency.
double KLFitter::Particles::BTaggingRejection ( int  index) const
inline

Return the jet b-tagging rejection.

Parameters
indexThe parton index
Returns
The jet b-tagging rejection.
double KLFitter::Particles::BTagWeight ( int  index) const
inline

Return the jet b-tagging weight.

Parameters
indexThe parton index
Returns
The jet b-tagging weight.
bool KLFitter::Particles::BTagWeightSet ( int  index) const
inline

Return the bool of a set tagging weight.

Parameters
indexThe parton index
Returns
The bool of a set tagging weight
int KLFitter::Particles::CheckIndex ( const std::vector< TLorentzVector > &  container,
int  index 
) const

Checks if the index is within range.

Parameters
containerThe particle container.
indexThe index of particle.
Returns
An error flag.
double KLFitter::Particles::DetEta ( int  index,
KLFitter::Particles::ParticleType  ptype 
) const

Return the detector eta of a particle with some index and type.

Parameters
indexThe index of the particle
ptypeThe particle type.
Returns
The detector eta of the particle
TLorentzVector * KLFitter::Particles::Electron ( int  index)

Return the electron at some index.

Parameters
indexThe electron index
Returns
A pointer to the TLorentzVector of the electron.
int KLFitter::Particles::ElectronIndex ( int  index) const

Return the index of the measured particle.

Parameters
indexThe index of the model particle.
Returns
The index of the measured particle.
int KLFitter::Particles::FindParticle ( const std::string &  name,
TLorentzVector *&  particle,
int *  index,
KLFitter::Particles::ParticleType ptype 
)

Find a particle by name.

Parameters
nameThe name of the particle.
particleA reference to the pointer to the 4-vector.
indexThe pointer to the index.
ptypeThe pointer to the particle type.
Returns
A flag (1: found, 0: not found).
bool KLFitter::Particles::IsBTagged ( int  index) const
inline

Return has the jet been b-tagged?

Parameters
indexThe parton index
Returns
The parton b-tagging boolean.
int KLFitter::Particles::JetIndex ( int  index) const

Return the index of the measured particle.

Parameters
indexThe index of the model particle.
Returns
The index of the measured particle.
float KLFitter::Particles::LeptonCharge ( int  index,
KLFitter::Particles::ParticleType  ptype 
) const

Return the charge of the lepton with some index and type.

Parameters
indexThe index of the particle
ptypeThe particle type.
Returns
The charge of the lepton.
TLorentzVector * KLFitter::Particles::Muon ( int  index)

Return the muon at some index.

Parameters
indexThe muon index
Returns
A pointer to the TLorentzVector of the muon.
int KLFitter::Particles::MuonIndex ( int  index) const

Return the index of the measured particle.

Parameters
indexThe index of the model particle.
Returns
The index of the measured particle.
std::string KLFitter::Particles::NameBoson ( int  index) const

Return the name of a boson.

Parameters
indexThe index of the boson.
Returns
The name of the boson.
std::string KLFitter::Particles::NameElectron ( int  index) const

Return the name of a electron.

Parameters
indexThe index of the electron.
Returns
The name of the electron.
std::string KLFitter::Particles::NameMuon ( int  index) const

Return the name of a muon.

Parameters
indexThe index of the muon.
Returns
The name of the muon.
std::string KLFitter::Particles::NameNeutrino ( int  index) const

Return the name of a neutrino.

Parameters
indexThe index of the neutrino.
Returns
The name of the neutrino.
std::string KLFitter::Particles::NameParticle ( int  index,
KLFitter::Particles::ParticleType  ptype 
) const

Return the name of a particle.

Parameters
indexThe index of the particle.
ptypeThe type of the particle.
Returns
The name of the particle.
std::string KLFitter::Particles::NamePhoton ( int  index) const

Return the name of a photon.

Parameters
indexThe index of the photon.
Returns
The name of the photon.
std::string KLFitter::Particles::NameTau ( int  index) const

Return the name of a tau.

Parameters
indexThe index of the tau.
Returns
The name of the tau.
int KLFitter::Particles::NBosons ( ) const
inline

Return the number of bosons.

Returns
The number of bosons.
int KLFitter::Particles::NElectrons ( ) const
inline

Return the number of electrons.

Returns
The number of electrons.
TLorentzVector * KLFitter::Particles::Neutrino ( int  index)

Return the neutrino at some index.

Parameters
indexThe neutrino index
Returns
A pointer to the TLorentzVector of the neutrino.
int KLFitter::Particles::NMuons ( ) const
inline

Return the number of muons.

Returns
The number of muons.
int KLFitter::Particles::NNeutrinos ( ) const
inline

Return the number of neutrinos.

Returns
The number of neutrinos.
int KLFitter::Particles::NParticles ( ) const
inline

Return the number of particles.

Returns
The number of particles.
int KLFitter::Particles::NParticles ( KLFitter::Particles::ParticleType  ptype) const

Return the number of particles of a certain type.

Parameters
ptypeThe particle type.
Returns
The number of particles.
int KLFitter::Particles::NPartons ( ) const
inline

Return the number of partons.

Returns
The number of partons.
int KLFitter::Particles::NPhotons ( ) const
inline

Return the number of photons.

Returns
The number of photons.
int KLFitter::Particles::NTaus ( ) const
inline

Return the number of taus.

Returns
The number of taus.
int KLFitter::Particles::NTracks ( ) const
inline

Return the number of tracks.

Returns
The number of tracks.
TLorentzVector * KLFitter::Particles::Particle ( const std::string &  name)

Return the particle with a certain name.

Parameters
nameThe name of the particle.
Returns
A pointer to the TLorentzVector of the particle.
TLorentzVector * KLFitter::Particles::Particle ( int  index,
KLFitter::Particles::ParticleType  ptype 
)

Return a particle with some index and type.

Parameters
indexThe index of the particle.
ptypeThe type of the particle.
Returns
A pointer to the TLorentzVector 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.

Parameters
ptypeThe type of the particle.
Returns
The particle container.
std::vector< TLorentzVector > * KLFitter::Particles::ParticleContainer ( KLFitter::Particles::ParticleType  ptype)

Return the particle container of a type of particles.

Parameters
ptypeThe type of the particle.
Returns
The particle container.
const std::vector< std::string > * KLFitter::Particles::ParticleNameContainer ( KLFitter::Particles::ParticleType  ptype) const

Return the (const) particle name container of a type of particles.

Parameters
ptypeThe type of the particle.
Returns
The particle name container.
std::vector< std::string > * KLFitter::Particles::ParticleNameContainer ( KLFitter::Particles::ParticleType  ptype)

Return the particle name container of a type of particles.

Parameters
ptypeThe type of the particle.
Returns
The particle name container.
TLorentzVector * KLFitter::Particles::Parton ( int  index)

Return the parton at some index.

Parameters
indexThe parton index
Returns
A pointer to the TLorentzVector of the parton.
TLorentzVector * KLFitter::Particles::Photon ( int  index)

Return the photon at some index.

Parameters
indexThe photon index
Returns
A pointer to the TLorentzVector of the photon.
int KLFitter::Particles::PhotonIndex ( int  index) const

Return the index of the measured particle.

Parameters
indexThe index of the model particle.
Returns
The index of the measured particle.
int KLFitter::Particles::RemoveParticle ( int  index,
KLFitter::Particles::ParticleType  ptype 
)

Removes a particle from a list of particles.

Parameters
indexThe index of the particle.
ptypeThe type of the particle.
Returns
An error code.
int KLFitter::Particles::RemoveParticle ( const std::string &  name)

Removes a particle from a list of particles.

Parameters
nameThe name of the particle.
Returns
An error code.
int KLFitter::Particles::SetBTaggingEfficiency ( int  index,
double  btagEff 
)

Set the jet b-tagging efficiency.

Parameters
indexThe parton index
btagEffThe b-tagging efficiency.
Returns
An error flag.
int KLFitter::Particles::SetBTaggingRejection ( int  index,
double  btagRej 
)

Set the jet b-tagging rejection.

Parameters
indexThe parton index
btagRejThe b-tagging probability.
Returns
The jet b-tagging rejection.
int KLFitter::Particles::SetBTagWeight ( int  index,
double  btagweight 
)

Set the jet b-tagging weight.

Parameters
indexThe parton index
btagweightThe b-tagging weight.
Returns
An error flag.
int KLFitter::Particles::SetBTagWeightSet ( int  index,
bool  btagweightset 
)

Set bool for set jet b-tagging weight.

Parameters
indexThe parton index
btagweightsetThe b-tagging probability.
Returns
An error flag.
int KLFitter::Particles::SetIsBTagged ( int  index,
bool  isBTagged 
)

Set has the jet been b-tagged?

Parameters
indexThe parton index
isBTaggedThe parton b-tagging boolean.
Returns
An error flag.
TLorentzVector * KLFitter::Particles::Tau ( int  index)

Return the tau at some index.

Parameters
indexThe tau index
Returns
A pointer to the TLorentzVector of the tau.
TLorentzVector * KLFitter::Particles::Track ( int  index)

Return the track at some index.

Parameters
indexThe track index
Returns
A pointer to the TLorentzVector of the track.
int KLFitter::Particles::TrackIndex ( int  index) const

Return the index of the measured particle.

Parameters
indexThe index of the model particle.
Returns
The index of the measured particle.
TrueFlavorType KLFitter::Particles::TrueFlavor ( int  index) const
inline

Return the true flavor of a parton.

Parameters
indexThe parton index
Returns
The parton true flavor.
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.

Parameters
indexThe index of the particle
ptypeThe particle type.
Returns
The uncertaintie of the particle

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