#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 30 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 147 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 187 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 154 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 163 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 197 of file GSUtilities.cc.
References mps_fire::i, mathSSE::sqrt(), theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::errorHighestWeight | ( | ) | const |
Definition at line 71 of file GSUtilities.cc.
References mps_fire::i, theErrors, theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::errorMode | ( | ) |
Definition at line 219 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, getMax(), getMin(), Exhume::I, SiStripPI::max, min(), mod(), mode(), seedmultiplicitymonitor_newtracking_cfi::nBins, pdf(), testProducerWithPsetDescEmpty_cfi::x1, and testProducerWithPsetDescEmpty_cfi::x2.
Referenced by ~GSUtilities().
|
private |
mean value of combined state double combinedMean() const; mode from starting value
Definition at line 113 of file GSUtilities.cc.
References dpdf1(), dpdf2(), MillePedeFileConverter_cfg::e, pdf(), x, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.
Referenced by mode(), and ~GSUtilities().
|
private |
value of gaussian distribution
Definition at line 172 of file GSUtilities.cc.
References ztail::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 183 of file GSUtilities.cc.
Referenced by cdf(), and ~GSUtilities().
float GSUtilities::getMax | ( | float | x | ) |
Definition at line 262 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode(), and ~GSUtilities().
float GSUtilities::getMin | ( | float | x | ) |
Definition at line 248 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode(), and ~GSUtilities().
float GSUtilities::maxWeight | ( | ) | const |
Definition at line 205 of file GSUtilities.cc.
References mps_fire::i, theNComp, and theWeights.
Referenced by ~GSUtilities().
float GSUtilities::mode | ( | void | ) | const |
mode
Definition at line 83 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 140 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 11 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, MillePedeFileConverter_cfg::e, mps_fire::i, data-class-funcs::q, theErrors, theNComp, theParameters, theWeights, x, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, y, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.
Referenced by ~GSUtilities().
|
private |
Definition at line 77 of file GSUtilities.h.
Referenced by cdf(), dpdf1(), dpdf2(), errorHighestWeight(), GSUtilities(), pdf(), quantile(), and ~GSUtilities().
|
private |
Definition at line 74 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), errorCombinedMean(), errorHighestWeight(), GSUtilities(), maxWeight(), mode(), pdf(), and quantile().
|
private |
Definition at line 76 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), GSUtilities(), mode(), pdf(), quantile(), and ~GSUtilities().
|
private |
Definition at line 75 of file GSUtilities.h.
Referenced by cdf(), combinedMean(), dpdf1(), dpdf2(), errorCombinedMean(), errorHighestWeight(), GSUtilities(), maxWeight(), pdf(), quantile(), and ~GSUtilities().