CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 15 of file PosteriorWeightsCalculator.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file PosteriorWeightsCalculator.h.

18 : predictedComponents(mixture) {}
PosteriorWeightsCalculator::~PosteriorWeightsCalculator ( )
inline

Definition at line 20 of file PosteriorWeightsCalculator.h.

20 {}

Member Function Documentation

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

Create random state.

Definition at line 11 of file PosteriorWeightsCalculator.cc.

References TrackingRecHit::dimension(), and Exception.

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

11  {
12  switch (recHit.dimension()) {
13  case 1:
14  return weights<1>(recHit);
15  case 2:
16  return weights<2>(recHit);
17  case 3:
18  return weights<3>(recHit);
19  case 4:
20  return weights<4>(recHit);
21  case 5:
22  return weights<5>(recHit);
23  }
24  throw cms::Exception("Error: rechit of size not 1,2,3,4,5");
25 }
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 27 of file PosteriorWeightsCalculator.h.