CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
PosteriorWeightsCalculator Class Reference

#include <PosteriorWeightsCalculator.h>

Public Member Functions

 PosteriorWeightsCalculator (const std::vector< TSOS > &mixture)
 
std::vector< double > weights (const TrackingRecHit &tsos) const
 Create random state. More...
 
template<unsigned int D>
std::vector< double > weights (const TrackingRecHit &tsos) const
 
 ~PosteriorWeightsCalculator ()
 

Private Types

typedef TrajectoryStateOnSurface TSOS
 

Private Attributes

std::vector< TSOSpredictedComponents
 

Detailed Description

Helper class which calculates the posterior weights of a Gaussian mixture given a prior (predicted) mixture and a RecHit. The prior is specified during construction time in the form of a vector of trajectory states.

Definition at line 13 of file PosteriorWeightsCalculator.h.

Member Typedef Documentation

Definition at line 16 of file PosteriorWeightsCalculator.h.

Constructor & Destructor Documentation

PosteriorWeightsCalculator::PosteriorWeightsCalculator ( const std::vector< TSOS > &  mixture)
inline

Definition at line 19 of file PosteriorWeightsCalculator.h.

19  :
20  predictedComponents(mixture) {}
PosteriorWeightsCalculator::~PosteriorWeightsCalculator ( )
inline

Definition at line 22 of file PosteriorWeightsCalculator.h.

22 {}

Member Function Documentation

std::vector< double > PosteriorWeightsCalculator::weights ( const TrackingRecHit tsos) const

Create random state.

Definition at line 9 of file PosteriorWeightsCalculator.cc.

References TrackingRecHit::dimension(), and Exception.

Referenced by GsfChi2MeasurementEstimator::estimate(), and GsfMultiStateUpdator::update().

9  {
10  switch (recHit.dimension()) {
11  case 1: return weights<1>(recHit);
12  case 2: return weights<2>(recHit);
13  case 3: return weights<3>(recHit);
14  case 4: return weights<4>(recHit);
15  case 5: return weights<5>(recHit);
16  }
17  throw cms::Exception("Error: rechit of size not 1,2,3,4,5");
18 }
template<unsigned int D>
std::vector<double> PosteriorWeightsCalculator::weights ( const TrackingRecHit tsos) const

Member Data Documentation

std::vector<TSOS> PosteriorWeightsCalculator::predictedComponents
private

Definition at line 29 of file PosteriorWeightsCalculator.h.