KLFitter
v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
|
This class implements a likelihood for the reconstruction of a particle decaying to two (oppositely) charged particles producing tracks in the detector. More...
#include <LikelihoodTwoTracks.h>
Public Types | |
enum | Parameters { parPiPlusPhi, parPiPlusTheta, parPiPlusP, parPiMinusPhi, parPiMinusTheta, parPiMinusP, parKShortM } |
Enumerator for the parameters. More... | |
![]() | |
enum | BtaggingMethod { kNotag, kVeto, kVetoNoFit, kVetoNoFitLight, kVetoNoFitBoth, kVetoHybridNoFit, kWorkingPoint, kVetoLight, kVetoBoth } |
Enumerate for b-tagging possibilities. | |
Public Member Functions | |
double | Log3DGaus (double x0, double x1, double x2, double mean0, double mean1, double mean2, double sigma00, double sigma10, double sigma11, double sigma20, double sigma21, double sigma22) |
Calculate 3D Gaussian. More... | |
Constructors and destructors | |
LikelihoodTwoTracks () | |
The default constructor. | |
~LikelihoodTwoTracks () | |
The (defaulted) destructor. | |
Member functions (BAT) | |
void | DefineParameters () override |
Define the parameters of the fit. | |
double | LogLikelihood (const std::vector< double > ¶meters) override |
The posterior probability definition, overloaded from BCModel. More... | |
std::vector< double > | LogLikelihoodComponents (std::vector< double > parameters) override |
The posterior probability definition, overloaded from BCModel. More... | |
std::vector< double > | GetInitialParameters () override |
Get initial values for the parameters. More... | |
int | SetET_miss_XY_SumET (double, double, double) override |
Dummy reimplementation of the base class function. | |
void | RequestResolutionFunctions () override |
Dummy reimplementation from the base class. | |
int | AdjustParameterRanges () override |
Dummy reimplementation of the base class function. | |
int | SaveResolutionFunctions () override |
Dummy reimplementation of the base class function. | |
![]() | |
LikelihoodBase (Particles **particles=0) | |
The default constructor. More... | |
virtual | ~LikelihoodBase () |
The default destructor. | |
KLFitter::PhysicsConstants * | PhysicsConstants () |
Return the table of physics constants. More... | |
KLFitter::DetectorBase * | Detector () |
Return the detector. More... | |
KLFitter::Particles ** | PParticlesPermuted () |
Return the set of measured particles. More... | |
KLFitter::Particles * | ParticlesModel () |
Return the set of model particles. More... | |
int | NParticlesModel () |
Return the number of model particles. More... | |
int | NParameters () |
Return the number of parameters. More... | |
double | ParMin (int index) |
Return the lower boundary of a parameter. More... | |
double | ParMax (int index) |
Return the upper boundary of a parameter. More... | |
BtaggingMethod | GetBTagging () |
Get flag to use b-tagging or not. More... | |
bool | FlagIntegrate () |
int | SetPhysicsConstants (KLFitter::PhysicsConstants *physicsconstants) |
Set the physics constants. More... | |
virtual int | SetDetector (KLFitter::DetectorBase **detector) |
Set the detector. More... | |
int | SetParticlesPermuted (KLFitter::Particles **particles) |
Set the measured particles. More... | |
int | SetPermutations (std::unique_ptr< KLFitter::Permutations > *permutations) |
Set the permutation object. More... | |
int | SetParameterRange (int index, double parmin, double parmax) |
Set the range of a model parameter. More... | |
int | SetInitialParameters (std::vector< double > const ¶meters) |
Set the initial values for the minimization, etc. More... | |
int | SetInitialParametersNChains (std::vector< double > const ¶meters, unsigned int nchains) |
Set the initial values for the minimization, etc. More... | |
int | SetBTagging (BtaggingMethod btagmethod) |
Set which b-tagging you wish to use. More... | |
int | SetFlagBTagging (bool flag) |
THIS IS AN OUTDATED METHOD - JUST HERE FOR BACKWARD COMPATIBILITY. More... | |
int | SetFlagIsNan (bool flag) |
Set flag FlagIsNan. More... | |
bool | GetFlagIsNan (void) |
Get flag FlagIsNan. More... | |
int | SetFlagIntegrate (bool flag) |
Set flag to integrate or not. More... | |
void | SetFlagUseJetMass (bool flag) |
Set flag to use measured jet masses (true) instead of parton masses (false);. | |
void | PropagateBTaggingInformation () |
Propagate the b-tagging information from the permuted (measured) particles to the model particles. | |
virtual double | LogAPrioriProbability (const std::vector< double > &) override |
The prior probability definition, overloaded from BCModel. More... | |
virtual double | LogEventProbability () |
Return the log of the event probability fof the current combination. More... | |
virtual double | LogEventProbabilityBTag () |
Return the contribution from b tagging to the log of the event probability for the current combination. More... | |
virtual int | RemoveForbiddenParticlePermutations () |
Remove forbidden particle permutations. More... | |
virtual bool | NoTFProblem (std::vector< double > parameters) |
Check if there are TF problems. More... | |
std::vector< double > | GetBestFitParameters () |
Returns the best fit parameters, overloaded from BCModel. More... | |
std::vector< double > | GetBestFitParameterErrors () |
Returns the errors of the best fit parameters, overloaded from BCModel. More... | |
double | GetBestFitParameter (unsigned int index) |
Returns the best fit parameters, overloaded from BCModel. More... | |
double | GetBestFitParameterError (unsigned int index) |
Returns the errors of the best fit parameter i, overloaded from BCModel. More... | |
virtual int | LHInvariantPermutationPartner (int, int, int *, int *) |
Check if the permutation is LH invariant. More... | |
int | GetParametersFromCache (int iperm) |
Write parameters from fCachedParametersVector.at(iperm) to fCachedParameters. More... | |
int | SetParametersToCache (int iperm, int nperms) |
Write parameters to fCachedParametersVector.at(iperm) from GetBestFitParameter() More... | |
double | GetIntegral () |
int | ResetCache () |
Resets the values of all parameter cache vectors. More... | |
Protected Member Functions | |
int | CalculateLorentzVectors (const std::vector< double > ¶meters) override |
Update 4-vectors of model particles. More... | |
int | Initialize () override |
Initialize the likelihood for the event. | |
int | DefineModelParticles () override |
Define the model particles. More... | |
int | RemoveInvariantParticlePermutations () override |
Remove invariant particle permutations. More... | |
int | BuildModelParticles () override |
Build the model particles from the best fit parameters. More... | |
int | SavePermutedParticles () override |
Save permuted particles. | |
![]() | |
double | SetPartonMass (double jetmass, double quarkmass, double *px, double *py, double *pz, double e) |
Set model parton mass according to fFlagUseJetMass. More... | |
Protected Attributes | |
Member attributes | |
const double | m_pion_mass |
Mass of the pion. | |
const double | m_kshort_mass |
Mass of k_short. | |
const double | m_kshort_width |
Decay width of k_short. | |
Member attributes (measured parameters) | |
double | m_t1_meas_phi |
double | m_t1_meas_theta |
double | m_t1_meas_p |
double | m_t1_meas_sigma00 |
double | m_t1_meas_sigma10 |
double | m_t1_meas_sigma11 |
double | m_t1_meas_sigma20 |
double | m_t1_meas_sigma21 |
double | m_t1_meas_sigma22 |
double | m_t2_meas_phi |
double | m_t2_meas_theta |
double | m_t2_meas_p |
double | m_t2_meas_sigma00 |
double | m_t2_meas_sigma10 |
double | m_t2_meas_sigma11 |
double | m_t2_meas_sigma20 |
double | m_t2_meas_sigma21 |
double | m_t2_meas_sigma22 |
Member attributes (fitted parameters) | |
double | m_t1_fit_phi |
double | m_t1_fit_theta |
double | m_t1_fit_p |
double | m_t1_fit_m |
double | m_t2_fit_phi |
double | m_t2_fit_theta |
double | m_t2_fit_p |
double | m_t2_fit_m |
double | m_ks_fit_m |
![]() | |
KLFitter::Particles ** | fParticlesPermuted |
A pointer to the measured particles. | |
std::unique_ptr< KLFitter::Permutations > * | fPermutations |
A pointer to the permutation object. | |
std::unique_ptr< KLFitter::Particles > | fParticlesModel |
A pointer to the model particles. | |
KLFitter::PhysicsConstants | fPhysicsConstants |
A pointer to the table of physics constants. | |
KLFitter::DetectorBase ** | fDetector |
A pointer to the detector. | |
std::vector< double > | fEventProbability |
The event probabilities for the different permutations. | |
bool | fFlagIntegrate |
A flag to integrate over the likelihood or not. | |
bool | fFlagIsNan |
A flag for knowing that Minuit gave parameters with NaN values to LogLikelihood. | |
bool | fFlagUseJetMass |
A flag for using the measured jet masses (true) instead of parton masses (false);. | |
bool | fTFgood |
Global variable for TF problems. | |
BtaggingMethod | fBTagMethod |
Name of btagging enum. | |
std::vector< double > | fCachedParameters |
The cached parameters used for the current permutation. | |
std::vector< double > | fCachedParameterErrors |
The cached parameter errors used for the current permutation. | |
std::vector< std::vector< double > > | fCachedParametersVector |
A vector of cached parameters, one for each permutation. More... | |
std::vector< std::vector< double > > | fCachedParameterErrorsVector |
A vector of cached parameter errors, one for each permutation. More... | |
double | fCachedNormalization |
The cached normalization, needed for the overloaded BCIntegrate::GetIntegral. | |
std::vector< double > | fCachedNormalizationVector |
A vector of cached parameters, one for each permutation. More... | |
This class implements a likelihood for the reconstruction of a particle decaying to two (oppositely) charged particles producing tracks in the detector.
Per track, it uses the four-vector (usually constructed from phi, theta, and q/p assuming a charge of +/- 1 and pion/kaon mass) as well as the covariance matrix of the variables phi, theta, and q/p as parameters.
Enumerator for the parameters.
|
overrideprotectedvirtual |
Build the model particles from the best fit parameters.
Implements KLFitter::LikelihoodBase.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overridevirtual |
Get initial values for the parameters.
Implements KLFitter::LikelihoodBase.
double KLFitter::LikelihoodTwoTracks::Log3DGaus | ( | double | x0, |
double | x1, | ||
double | x2, | ||
double | mean0, | ||
double | mean1, | ||
double | mean2, | ||
double | sigma00, | ||
double | sigma10, | ||
double | sigma11, | ||
double | sigma20, | ||
double | sigma21, | ||
double | sigma22 | ||
) |
Calculate 3D Gaussian.
x0 | First variable point of evalulation |
x1 | Second variable point of evaluation |
x2 | Third variable point of evaluation |
mean0 | First variable mean of distribution |
mean1 | Second variable mean of distribution |
mean2 | Third variable mean of distribution |
sigma00 | First variable variance squared |
sigma10 | Covariance of first and second variable |
sigma11 | Second variable variance squared |
sigma20 | Covariance of first and third variable |
sigma21 | Covariance of second and third variable |
sigma22 | Third variable variance squared |
|
overridevirtual |
The posterior probability definition, overloaded from BCModel.
parameters | A vector of parameters (double values). |
Implements KLFitter::LikelihoodBase.
|
overridevirtual |
The posterior probability definition, overloaded from BCModel.
Split up into several subcomponents.
parameters | A vector of parameters (double values). |
Implements KLFitter::LikelihoodBase.
|
overrideprotectedvirtual |