|
KLFitter
v1.3.2
Documentation of the KLFitter library -- The Kinematic Likelihood Fitter
|
This class offers a simple parameterisation of a resolution. More...
#include <ResCrystalBallBase.h>
Public Member Functions | |
| ResCrystalBallBase (const char *filename) | |
| The default constructor. | |
| ResCrystalBallBase (std::vector< double > const ¶meters) | |
| A constructor that takes parameters directly, unlike the default constructor that takes a path to the file with TFs. More... | |
| virtual | ~ResCrystalBallBase () |
| The (defaulted) destructor. | |
| virtual double | GetAlpha (double x)=0 |
| Calculate the alpha parameter from the TF parameters and the value of x. More... | |
| virtual double | GetN (double x)=0 |
| Calculate the n parameter from the TF parameters and the value of x. More... | |
| virtual double | GetMean (double x)=0 |
| Calculate the mean from the TF parameters and the value of x. More... | |
| double | logp (double x, double xmeas, bool *good, double=0) override |
| Return the probability of the true value of x given the measured value, xmeas. More... | |
| double | LogCrystalBallFunction (double x, double alpha, double n, double sigma, double mean) |
| A function that calculates CrystalBall See twiki: https://en.wikipedia.org/wiki/Crystal_Ball_function. More... | |
| double | ApproxError (double x) |
| An approximation of the error function needed to calculate crystal ball normalization with precision < 1e-4. More... | |
Public Member Functions inherited from KLFitter::ResolutionBase | |
| ResolutionBase (int npar) | |
| The default constructor. More... | |
| ResolutionBase (std::vector< double > parameters) | |
| A constructor. More... | |
| virtual | ~ResolutionBase () |
| The (defaulted) destructor. | |
| virtual double | GetSigma (double par)=0 |
| Return the (approximate) width of the TF depending on the relevant parameter (mostly xmeas, but sumET in case of ResGauss_MET). More... | |
| int | Par (int index, double *par) |
| Return a parameter of the parameterization. More... | |
| int | SetPar (int index, double value) |
| Set a parameter value. More... | |
| int | SetPar (std::vector< double > parameters) |
| Set all parameter values. More... | |
| int | ReadParameters (const char *filename, std::size_t nparameters) |
| Read parameter values from ASCII file. More... | |
| int | Status () |
| Return a status code. More... | |
Static Public Member Functions | |
| static bool | CheckCrystalBallSanity (double *sigma, double *n) |
| Sanity check for the crystal ball parameters sigma, and n (1st sigma, scale and 2nd sigma). More... | |
Additional Inherited Members | |
Protected Attributes inherited from KLFitter::ResolutionBase | |
| int | fNParameters |
| The number of parameters. | |
| std::vector< double > | fParameters |
| The parameter values. | |
| int | fStatus |
| The status of this class (1: ok, 0: error). | |
This class offers a simple parameterisation of a resolution.
The parametrisation is a CrystalBall function with energy dependent parameters.
|
explicit |
A constructor that takes parameters directly, unlike the default constructor that takes a path to the file with TFs.
| parameters | The parameters of the parameterization. |
| double KLFitter::ResCrystalBallBase::ApproxError | ( | double | x | ) |
An approximation of the error function needed to calculate crystal ball normalization with precision < 1e-4.
Decreases computation time by about 10%.
| x |
|
inlinestatic |
Sanity check for the crystal ball parameters sigma, and n (1st sigma, scale and 2nd sigma).
| sigma. | |
| n. |
|
pure virtual |
Calculate the alpha parameter from the TF parameters and the value of x.
| x | The value of x. |
Implemented in KLFitter::ResCrystalBallJets.
|
pure virtual |
Calculate the mean from the TF parameters and the value of x.
| x | The value of x. |
Implemented in KLFitter::ResCrystalBallJets.
|
pure virtual |
Calculate the n parameter from the TF parameters and the value of x.
| x | The value of x. |
Implemented in KLFitter::ResCrystalBallJets.
| double KLFitter::ResCrystalBallBase::LogCrystalBallFunction | ( | double | x, |
| double | alpha, | ||
| double | n, | ||
| double | sigma, | ||
| double | mean | ||
| ) |
A function that calculates CrystalBall See twiki: https://en.wikipedia.org/wiki/Crystal_Ball_function.
| x | |
| Alpha | parameter |
| n | parameter |
| sigma | parameter |
| mean | parameter |
|
overridevirtual |
Return the probability of the true value of x given the measured value, xmeas.
| x | The true value of x. |
| xmeas | The measured value of x. |
| good | False if problem with TF. |
| par | Optional additional parameter (not used here). |
Reimplemented from KLFitter::ResolutionBase.
1.8.11