CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

KalmanSmoothedVertexChi2Estimator< N > Class Template Reference

#include <KalmanSmoothedVertexChi2Estimator.h>

Inheritance diagram for KalmanSmoothedVertexChi2Estimator< N >:
VertexSmoothedChiSquaredEstimator< N >

List of all members.

Public Types

typedef std::pair< bool, double > BDpair

Public Member Functions

KalmanSmoothedVertexChi2Estimatorclone () const
BDpair estimate (const CachingVertex< N > &vertex) const
virtual ~KalmanSmoothedVertexChi2Estimator ()

Private Attributes

KVFHelper< N > helper

Detailed Description

template<unsigned int N>
class KalmanSmoothedVertexChi2Estimator< N >

Class to calculate the smoothed chi**2 of the vertex using the Kalman filter algorithms after the vertex has been fit and the tracks refit.

Definition at line 14 of file KalmanSmoothedVertexChi2Estimator.h.


Member Typedef Documentation

template<unsigned int N>
typedef std::pair<bool, double> KalmanSmoothedVertexChi2Estimator< N >::BDpair

Reimplemented from VertexSmoothedChiSquaredEstimator< N >.

Definition at line 18 of file KalmanSmoothedVertexChi2Estimator.h.


Constructor & Destructor Documentation

template<unsigned int N>
virtual KalmanSmoothedVertexChi2Estimator< N >::~KalmanSmoothedVertexChi2Estimator ( ) [inline, virtual]

Definition at line 20 of file KalmanSmoothedVertexChi2Estimator.h.

{}

Member Function Documentation

template<unsigned int N>
KalmanSmoothedVertexChi2Estimator* KalmanSmoothedVertexChi2Estimator< N >::clone ( void  ) const [inline, virtual]
template<unsigned int N>
KalmanSmoothedVertexChi2Estimator< N >::BDpair KalmanSmoothedVertexChi2Estimator< N >::estimate ( const CachingVertex< N > &  vertex) const [virtual]

Methode which calculates the smoothed vertex chi**2.

Parameters:
vertexis the final estimate of the vertex, with the refited tracks
Returns:
the smoothed vertex chi**2

Implements VertexSmoothedChiSquaredEstimator< N >.

Definition at line 7 of file KalmanSmoothedVertexChi2Estimator.cc.

References CachingVertex< N >::hasPrior(), i, CachingVertex< N >::priorVertexState(), query::result, summarizeEdmComparisonLogfiles::success, CachingVertex< N >::tracks(), testEve_cfg::tracks, and CachingVertex< N >::vertexState().

{
//initial vertex part
  float v_part = 0.;
  float returnChi = 0.;

  if (vertex.hasPrior()) {
    v_part = helper.vertexChi2(vertex.priorVertexState(), vertex.vertexState());
  }

//vector of tracks part
  typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
  std::vector< RefCountedVertexTrack > tracks = vertex.tracks();
  float sum = 0.;
  bool success = true;
  for(typename std::vector<RefCountedVertexTrack>::iterator i = tracks.begin(); i != tracks.end(); i++)
  {
    BDpair result = helper.trackParameterChi2((*i)->linearizedTrack(), (*i)->refittedState());
    success = success && result.first;
    sum += (*i)->weight() * result.second;
  }
 returnChi = v_part + sum;
 return BDpair(success, returnChi);
}

Member Data Documentation

template<unsigned int N>
KVFHelper<N> KalmanSmoothedVertexChi2Estimator< N >::helper [private]

Definition at line 36 of file KalmanSmoothedVertexChi2Estimator.h.