CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
MultiGaussianState1D Class Reference

#include <MultiGaussianState1D.h>

Public Types

typedef std::vector< SingleGaussianState1DSingleState1dContainer
 

Public Member Functions

const SingleState1dContainercomponents () const
 access to components More...
 
double mean () const
 combined mean More...
 
 MultiGaussianState1D ()
 
 MultiGaussianState1D (const SingleState1dContainer &stateV)
 
double variance () const
 combined variance More...
 
double weight () const
 combined weight More...
 
 ~MultiGaussianState1D ()
 

Private Member Functions

void checkCombinedState () const
 calculation of the combined state (on demand) More...
 

Private Attributes

SingleGaussianState1D theCombinedState
 
bool theCombinedStateUp2Date
 
const SingleState1dContainer theComponents
 

Detailed Description

One-dimensional multi-Gaussian mixture: weighted sum of single Gaussian components.

Definition at line 12 of file MultiGaussianState1D.h.

Member Typedef Documentation

◆ SingleState1dContainer

Definition at line 14 of file MultiGaussianState1D.h.

Constructor & Destructor Documentation

◆ MultiGaussianState1D() [1/2]

MultiGaussianState1D::MultiGaussianState1D ( )
inline

Definition at line 17 of file MultiGaussianState1D.h.

◆ MultiGaussianState1D() [2/2]

MultiGaussianState1D::MultiGaussianState1D ( const SingleState1dContainer stateV)
inline

Definition at line 19 of file MultiGaussianState1D.h.

19 : theComponents(stateV), theCombinedStateUp2Date(false) {}
const SingleState1dContainer theComponents

◆ ~MultiGaussianState1D()

MultiGaussianState1D::~MultiGaussianState1D ( )
inline

Definition at line 21 of file MultiGaussianState1D.h.

21 {}

Member Function Documentation

◆ checkCombinedState()

void MultiGaussianState1D::checkCombinedState ( ) const
private

calculation of the combined state (on demand)

Definition at line 25 of file MultiGaussianState1D.cc.

References heavyFlavorValidationHarvestingSequence_cff::combiner, theCombinedState, theCombinedStateUp2Date, and theComponents.

Referenced by mean(), and variance().

25  {
27  return;
28 
31 
32  // typedef SingleGaussianState<1> SingleState;
33  // typedef std::shared_ptr< SingleGaussianState<1> > SingleStatePtr;
34  // typedef std::vector< SingleStatePtr > SingleStateContainer;
35 
36  // SingleStateContainer components;
37  // for ( SingleState1dContainer::const_iterator ic=theComponents.begin();
38  // ic!=theComponents.end(); ic++ ) {
39  // SingleStatePtr ssp(new SingleState(SingleState::Vector((*ic).mean()),
40  // SingleState::Matrix((*ic).variance()),
41  // (*ic).weight()));
42  // components.push_back(ssp);
43  // }
44  // MultiGaussianState<1> multiState(components);
45 
46  // theCombinedState = SingleGaussianState1D(multiState.mean()(0),
47  // multiState.covariance()(0,0),
48  // multiState.weight());
49 
51 }
SingleGaussianState1D theCombinedState
const SingleState1dContainer theComponents

◆ components()

const SingleState1dContainer& MultiGaussianState1D::components ( ) const
inline

access to components

Definition at line 30 of file MultiGaussianState1D.h.

References theComponents.

Referenced by MultiGaussianStateCombiner1D::combine(), GaussianSumUtilities1D::components(), and multiTrajectoryStateMode::momentumFromModeP().

30 { return theComponents; }
const SingleState1dContainer theComponents

◆ mean()

double MultiGaussianState1D::mean ( ) const

combined mean

Definition at line 15 of file MultiGaussianState1D.cc.

References checkCombinedState(), SingleGaussianState1D::mean(), and theCombinedState.

Referenced by GaussianSumUtilities1D::computeMode(), and GaussianSumUtilities1D::mean().

15  {
17  return theCombinedState.mean();
18 }
SingleGaussianState1D theCombinedState
double mean() const
parameter vector
void checkCombinedState() const
calculation of the combined state (on demand)

◆ variance()

double MultiGaussianState1D::variance ( ) const

combined variance

Definition at line 20 of file MultiGaussianState1D.cc.

References checkCombinedState(), theCombinedState, and SingleGaussianState1D::variance().

Referenced by GaussianSumUtilities1D::computeMode(), and GaussianSumUtilities1D::variance().

20  {
22  return theCombinedState.variance();
23 }
SingleGaussianState1D theCombinedState
double variance() const
variance
void checkCombinedState() const
calculation of the combined state (on demand)

◆ weight()

double MultiGaussianState1D::weight ( ) const

combined weight

Definition at line 5 of file MultiGaussianState1D.cc.

References mps_fire::result, theCombinedState, theCombinedStateUp2Date, theComponents, and SingleGaussianState1D::weight().

Referenced by GaussianSumUtilities1D::computeMode(), and GaussianSumUtilities1D::weight().

5  {
7  return theCombinedState.weight();
8 
9  double result(0.);
10  for (SingleState1dContainer::const_iterator ic = theComponents.begin(); ic != theComponents.end(); ic++)
11  result += (*ic).weight();
12  return result;
13 }
SingleGaussianState1D theCombinedState
const SingleState1dContainer theComponents
double weight() const
weight

Member Data Documentation

◆ theCombinedState

SingleGaussianState1D MultiGaussianState1D::theCombinedState
mutableprivate

Definition at line 39 of file MultiGaussianState1D.h.

Referenced by checkCombinedState(), mean(), variance(), and weight().

◆ theCombinedStateUp2Date

bool MultiGaussianState1D::theCombinedStateUp2Date
mutableprivate

Definition at line 40 of file MultiGaussianState1D.h.

Referenced by checkCombinedState(), and weight().

◆ theComponents

const SingleState1dContainer MultiGaussianState1D::theComponents
private

Definition at line 38 of file MultiGaussianState1D.h.

Referenced by checkCombinedState(), components(), and weight().