1 #ifndef GaussianSumUtilities_h_
2 #define GaussianSumUtilities_h_
14 template <
unsigned int N>
20 typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepStd<double,N> >
GenMatrix;
39 inline unsigned int size ()
const {
51 inline double weight (
unsigned int i)
const {
102 double gauss (
const double&,
const double&,
const double&)
const;
109 const Vector& xStart)
const;
128 double pdf (
const Vector&,
const std::vector<double>&)
const;
134 double lnPdf (
const Vector&,
const std::vector<double>&)
const;
152 #include "TrackingTools/GsfTools/interface/GaussianSumUtilities.icc"
Matrix d2Pdf(const Vector &) const
Hessian.
double lnPdf(const Vector &) const
value of ln(pdf)
Vector computeModeWithoutTransform() const
calculation of mode
MultiState::SingleStatePtr SingleStatePtr
ROOT::Math::Plane3D::Vector Vector
std::vector< double > pdfComponents(const Vector &) const
pdf components
void setMode(const Vector &mode) const
set mode "state" from solution of mode finding
const SingleStateContainer & components() const
components
const Matrix & covariance(unsigned int i) const
covariance matrix of a component
Matrix tensorProduct(const Vector &) const
Symmetric Tensor Product (not recognized by standard ROOT Math)
Matrix d2LnPdf(const Vector &) const
Hessian of ln(pdf)
const SingleStateContainer & components() const
access to components (single Gaussian states)
SingleState::Matrix Matrix
const Matrix & covariance() const
combined covariance matrix
const SingleGaussianState< N > & mode() const
double pdf(const Vector &) const
value of the p.d.f.
Mixture of multi-variate gaussian states.
GaussianSumUtilities(const MultiState &state)
std::vector< SingleStatePtr > SingleStateContainer
Vector d1Pdf(const Vector &) const
gradient
MultiGaussianState1D constrainedState(const Vector &d, const Vector &x0) const
state constrained to a line x = s*d+x0
const Vector & mean() const
combined mean
Matrix localCovariance(const Vector &x) const
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > Matrix
void setInvalidMode() const
set mode "state" in case of failure
const Matrix & covariance() const
combined covariance
bool findMode(Vector &mode, double &pdfAtMode, const Vector &xStart) const
mode from starting value in ln(pdf); returns true on success
MultiState::SingleStateContainer SingleStateContainer
const MultiState & state() const
multi-state
double weight() const
combined weight
Vector d1LnPdf(const Vector &) const
gradient of ln(pdf)
const Vector & mean(unsigned int i) const
mean value of a component
unsigned int size() const
number of components
MultiGaussianState< N > MultiState
double weight() const
combined weight
SingleGaussianState< N > SingleState
ROOT::Math::SVector< double, N > Vector
double gauss(const double &, const double &, const double &) const
value of gaussian distribution
const MultiState & theState
SingleGaussianState< N > theMode
bool modeIsValid() const
mode status
const Vector & mean() const
combined mean
SingleState::Vector Vector
void computeMode() const
calculation of mode with transformation of pdf
ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepStd< double, N > > GenMatrix
boost::shared_ptr< SingleState > SingleStatePtr
double weight(unsigned int i) const
weight of a component