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.

17 : theCombinedStateUp2Date(false) {}

◆ MultiGaussianState1D() [2/2]

MultiGaussianState1D::MultiGaussianState1D ( const SingleState1dContainer stateV)
inline

Definition at line 19 of file MultiGaussianState1D.h.

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

◆ ~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.

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 }

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

Referenced by mean(), and variance().

◆ components()

const SingleState1dContainer& MultiGaussianState1D::components ( ) const
inline

◆ mean()

double MultiGaussianState1D::mean ( ) const

◆ variance()

double MultiGaussianState1D::variance ( ) const

◆ weight()

double MultiGaussianState1D::weight ( ) const

combined weight

Definition at line 5 of file MultiGaussianState1D.cc.

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 }

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

Referenced by GaussianSumUtilities1D::computeMode(), and GaussianSumUtilities1D::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().

MultiGaussianState1D::theComponents
const SingleState1dContainer theComponents
Definition: MultiGaussianState1D.h:38
MultiGaussianState1D::theCombinedStateUp2Date
bool theCombinedStateUp2Date
Definition: MultiGaussianState1D.h:40
SingleGaussianState1D::mean
double mean() const
parameter vector
Definition: SingleGaussianState1D.h:25
SingleGaussianState1D::variance
double variance() const
variance
Definition: SingleGaussianState1D.h:27
SingleGaussianState1D::weight
double weight() const
weight
Definition: SingleGaussianState1D.h:23
combiner
Definition: CandCombiner.h:17
MultiGaussianState1D::checkCombinedState
void checkCombinedState() const
calculation of the combined state (on demand)
Definition: MultiGaussianState1D.cc:25
MultiGaussianState1D::theCombinedState
SingleGaussianState1D theCombinedState
Definition: MultiGaussianState1D.h:39
MultiGaussianStateCombiner1D
Definition: MultiGaussianStateCombiner1D.h:13
mps_fire.result
result
Definition: mps_fire.py:303
heavyFlavorValidationHarvestingSequence_cff.combiner
combiner
Definition: heavyFlavorValidationHarvestingSequence_cff.py:107