#include <GSUtilities.h>
Public Member Functions | |
double | cdf (const double &) const |
value of integral(pdf) More... | |
double | combinedMean () const |
mean value of combined state More... | |
double | dpdf1 (const double &) const |
first derivative of pdf More... | |
double | dpdf2 (const double &) const |
second derivative of pdf More... | |
double | errorCombinedMean () const |
float | errorHighestWeight () const |
float | errorMode () |
float | getMax (float) |
float | getMin (float) |
GSUtilities (const unsigned nComp, const float *weights, const float *parameters, const float *errors) | |
constructor from arrays of weights, parameters and standard deviations More... | |
float | maxWeight () const |
float | mode () const |
mode More... | |
double | pdf (const double &) const |
value of the pdf More... | |
float | quantile (const float) const |
~GSUtilities () | |
Private Member Functions | |
double | findMode (const double) const |
double | gauss (const double &, const double &, const double &) const |
value of gaussian distribution More... | |
double | gaussInt (const double &, const double &, const double &) const |
integrated value of gaussian distribution More... | |
Private Attributes | |
float * | theErrors |
unsigned | theNComp |
float * | theParameters |
float * | theWeights |
Some utilities for analysing 1D Gaussian mixtures. Copied from ORCA's EgammaGSUtilities.
Definition at line 8 of file GSUtilities.h.
|
inline |
constructor from arrays of weights, parameters and standard deviations
Definition at line 11 of file GSUtilities.h.
References i, theErrors, theNComp, theParameters, and theWeights.
|
inline |
double GSUtilities::cdf | ( | const double & | x | ) | const |
value of integral(pdf)
Definition at line 157 of file GSUtilities.cc.
References gaussInt(), i, query::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by errorMode(), getMax(), getMin(), and quantile().
double GSUtilities::combinedMean | ( | ) | const |
mean value of combined state
Definition at line 210 of file GSUtilities.cc.
References i, theNComp, theParameters, and theWeights.
double GSUtilities::dpdf1 | ( | const double & | x | ) | const |
first derivative of pdf
Definition at line 166 of file GSUtilities.cc.
References gauss(), i, query::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by findMode().
double GSUtilities::dpdf2 | ( | const double & | x | ) | const |
second derivative of pdf
Definition at line 178 of file GSUtilities.cc.
References gauss(), i, query::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by findMode().
double GSUtilities::errorCombinedMean | ( | ) | const |
Definition at line 222 of file GSUtilities.cc.
References i, mathSSE::sqrt(), theNComp, and theWeights.
float GSUtilities::errorHighestWeight | ( | ) | const |
float GSUtilities::errorMode | ( | ) |
Definition at line 249 of file GSUtilities.cc.
References cdf(), getMax(), getMin(), Exhume::I, max(), bookConverter::min, mod(), mode(), and pdf().
|
private |
mean value of combined state double combinedMean() const; mode from starting value
Definition at line 122 of file GSUtilities.cc.
References dpdf1(), dpdf2(), alignCSCRings::e, pdf(), and x.
Referenced by mode().
|
private |
value of gaussian distribution
Definition at line 190 of file GSUtilities.cc.
References create_public_lumi_plots::exp, Pi, query::result, and mathSSE::sqrt().
Referenced by dpdf1(), dpdf2(), and pdf().
|
private |
integrated value of gaussian distribution
Definition at line 203 of file GSUtilities.cc.
Referenced by cdf().
float GSUtilities::getMax | ( | float | x | ) |
Definition at line 291 of file GSUtilities.cc.
Referenced by errorMode().
float GSUtilities::getMin | ( | float | x | ) |
Definition at line 278 of file GSUtilities.cc.
Referenced by errorMode().
float GSUtilities::maxWeight | ( | ) | const |
float GSUtilities::mode | ( | void | ) | const |
mode
Definition at line 88 of file GSUtilities.cc.
References findMode(), i, pdf(), theNComp, theParameters, and x.
Referenced by errorMode().
double GSUtilities::pdf | ( | const double & | x | ) | const |
value of the pdf
Definition at line 148 of file GSUtilities.cc.
References gauss(), i, query::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by errorMode(), findMode(), and mode().
float GSUtilities::quantile | ( | const float | q | ) | const |
normalised integral from -inf to x (taking into account under- & overflows)
Definition at line 12 of file GSUtilities.cc.
References cdf(), alignCSCRings::e, i, lumiQueryAPI::q, theErrors, theNComp, theParameters, theWeights, x, and detailsBasic3DVector::y.
|
private |
Definition at line 83 of file GSUtilities.h.
Referenced by cdf(), dpdf1(), dpdf2(), errorHighestWeight(), GSUtilities(), pdf(), quantile(), and ~GSUtilities().
|
private |
Definition at line 80 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), errorCombinedMean(), errorHighestWeight(), GSUtilities(), maxWeight(), mode(), pdf(), and quantile().
|
private |
Definition at line 82 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), GSUtilities(), mode(), pdf(), quantile(), and ~GSUtilities().
|
private |
Definition at line 81 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), errorCombinedMean(), errorHighestWeight(), GSUtilities(), maxWeight(), pdf(), quantile(), and ~GSUtilities().