#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 mps_fire::i, theErrors, theNComp, theParameters, and theWeights.
|
inline |
Definition at line 35 of file GSUtilities.h.
References cdf(), combinedMean(), dpdf1(), dpdf2(), errorCombinedMean(), errorHighestWeight(), errorMode(), findMode(), gauss(), gaussInt(), getMax(), getMin(), maxWeight(), mode(), pdf(), quantile(), theErrors, theParameters, and theWeights.
double GSUtilities::cdf | ( | const double & | x | ) | const |
value of integral(pdf)
Definition at line 157 of file GSUtilities.cc.
References gaussInt(), mps_fire::i, mps_fire::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by errorMode(), getMax(), getMin(), quantile(), and ~GSUtilities().
double GSUtilities::combinedMean | ( | ) | const |
mean value of combined state
Definition at line 210 of file GSUtilities.cc.
References mps_fire::i, theNComp, theParameters, and theWeights.
Referenced by ~GSUtilities().
double GSUtilities::dpdf1 | ( | const double & | x | ) | const |
first derivative of pdf
Definition at line 166 of file GSUtilities.cc.
References PVValHelper::dx, gauss(), mps_fire::i, mps_fire::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by findMode(), and ~GSUtilities().
double GSUtilities::dpdf2 | ( | const double & | x | ) | const |
second derivative of pdf
Definition at line 178 of file GSUtilities.cc.
References PVValHelper::dx, gauss(), mps_fire::i, mps_fire::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by findMode(), and ~GSUtilities().
double GSUtilities::errorCombinedMean | ( | ) | const |
Definition at line 222 of file GSUtilities.cc.
References mps_fire::i, mathSSE::sqrt(), theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::errorHighestWeight | ( | ) | const |
Definition at line 73 of file GSUtilities.cc.
References mps_fire::i, theErrors, theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::errorMode | ( | ) |
Definition at line 249 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, getMax(), getMin(), Exhume::I, hpstanc_transforms::max, min(), mod(), mode(), and pdf().
Referenced by ~GSUtilities().
|
private |
mean value of combined state double combinedMean() const; mode from starting value
Definition at line 122 of file GSUtilities.cc.
References dpdf1(), dpdf2(), MillePedeFileConverter_cfg::e, pdf(), and x.
Referenced by mode(), and ~GSUtilities().
|
private |
value of gaussian distribution
Definition at line 190 of file GSUtilities.cc.
References edmIntegrityCheck::d, JetChargeProducer_cfi::exp, Pi, mps_fire::result, and mathSSE::sqrt().
Referenced by dpdf1(), dpdf2(), pdf(), and ~GSUtilities().
|
private |
integrated value of gaussian distribution
Definition at line 203 of file GSUtilities.cc.
Referenced by cdf(), and ~GSUtilities().
float GSUtilities::getMax | ( | float | x | ) |
Definition at line 291 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode(), and ~GSUtilities().
float GSUtilities::getMin | ( | float | x | ) |
Definition at line 278 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode(), and ~GSUtilities().
float GSUtilities::maxWeight | ( | ) | const |
Definition at line 232 of file GSUtilities.cc.
References mps_fire::i, theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::mode | ( | void | ) | const |
mode
Definition at line 88 of file GSUtilities.cc.
References findMode(), mps_fire::i, pdf(), theNComp, theParameters, and x.
Referenced by errorMode(), and ~GSUtilities().
double GSUtilities::pdf | ( | const double & | x | ) | const |
value of the pdf
Definition at line 148 of file GSUtilities.cc.
References gauss(), mps_fire::i, mps_fire::result, theErrors, theNComp, theParameters, and theWeights.
Referenced by errorMode(), findMode(), mode(), and ~GSUtilities().
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(), PVValHelper::dx, MillePedeFileConverter_cfg::e, mps_fire::i, lumiQueryAPI::q, theErrors, theNComp, theParameters, theWeights, x, and y.
Referenced by ~GSUtilities().
|
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().