#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, theWeights, and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.
|
inline |
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, theWeights, and x.
Referenced by errorMode(), getMax(), getMin(), and quantile().
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.
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, theWeights, and x.
Referenced by findMode().
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, theWeights, and x.
Referenced by findMode().
double GSUtilities::errorCombinedMean | ( | ) | const |
Definition at line 197 of file GSUtilities.cc.
References mps_fire::i, mathSSE::sqrt(), theNComp, and theWeights.
float GSUtilities::errorHighestWeight | ( | ) | const |
Definition at line 71 of file GSUtilities.cc.
References mps_fire::i, theErrors, theNComp, and theWeights.
float GSUtilities::errorMode | ( | ) |
Definition at line 219 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, getMax(), getMin(), Exhume::I, SiStripPI::max, SiStripPI::min, mod(), mode(), seedmultiplicitymonitor_newtracking_cfi::nBins, pdf(), testProducerWithPsetDescEmpty_cfi::x1, and testProducerWithPsetDescEmpty_cfi::x2.
|
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().
|
private |
value of gaussian distribution
Definition at line 172 of file GSUtilities.cc.
References ztail::d, JetChargeProducer_cfi::exp, SiStripPI::mean, Pi, mps_fire::result, mathSSE::sqrt(), and x.
Referenced by dpdf1(), dpdf2(), and pdf().
|
private |
integrated value of gaussian distribution
Definition at line 183 of file GSUtilities.cc.
References SiStripPI::mean, and x.
Referenced by cdf().
float GSUtilities::getMax | ( | float | x | ) |
Definition at line 262 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode().
float GSUtilities::getMin | ( | float | x | ) |
Definition at line 248 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, and x.
Referenced by errorMode().
float GSUtilities::maxWeight | ( | ) | const |
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().
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, theWeights, and x.
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 11 of file GSUtilities.cc.
References cdf(), PVValHelper::dx, MillePedeFileConverter_cfg::e, mps_fire::i, submitPVResolutionJobs::q, theErrors, theNComp, theParameters, theWeights, x, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, y, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.
|
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().