CMS 3D CMS Logo

KalmanSmoothedVertexChi2Estimator< N > Class Template Reference

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. More...

#include <RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h>

Inheritance diagram for KalmanSmoothedVertexChi2Estimator< N >:

VertexSmoothedChiSquaredEstimator< N >

List of all members.

Public Member Functions

KalmanSmoothedVertexChi2Estimatorclone () const
float estimate (const CachingVertex< N > &vertex) const
 Methode which calculates the smoothed vertex chi**2.
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.


Constructor & Destructor Documentation

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

Definition at line 18 of file KalmanSmoothedVertexChi2Estimator.h.

00018 {}


Member Function Documentation

template<unsigned int N>
KalmanSmoothedVertexChi2Estimator* KalmanSmoothedVertexChi2Estimator< N >::clone ( void   )  const [inline, virtual]

Implements VertexSmoothedChiSquaredEstimator< N >.

Definition at line 27 of file KalmanSmoothedVertexChi2Estimator.h.

00028   {
00029    return new KalmanSmoothedVertexChi2Estimator(* this);
00030   }

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

Methode which calculates the smoothed vertex chi**2.

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

Implements VertexSmoothedChiSquaredEstimator< N >.

Definition at line 6 of file KalmanSmoothedVertexChi2Estimator.cc.

References CachingVertex< N >::hasPrior(), KalmanSmoothedVertexChi2Estimator< N >::helper, i, CachingVertex< N >::priorVertexState(), sum(), CachingVertex< N >::tracks(), tracks, and CachingVertex< N >::vertexState().

00007 {
00008 //initial vertex part
00009   float v_part = 0.;
00010   float returnChi = 0.;
00011   
00012   if (vertex.hasPrior()) {
00013     v_part = helper.vertexChi2(vertex.priorVertexState(), vertex.vertexState());
00014   }
00015  
00016 //vector of tracks part
00017   typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
00018   vector< RefCountedVertexTrack > tracks = vertex.tracks();
00019   float sum = 0.;
00020   for(typename vector<RefCountedVertexTrack>::iterator i = tracks.begin(); i != tracks.end(); i++)
00021   {
00022    sum += (*i)->weight() * helper.trackParameterChi2((*i)->linearizedTrack(), (*i)->refittedState());
00023   }
00024  returnChi = v_part + sum;
00025  return returnChi;   
00026 }


Member Data Documentation

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

Definition at line 34 of file KalmanSmoothedVertexChi2Estimator.h.

Referenced by KalmanSmoothedVertexChi2Estimator< N >::estimate().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:16 2009 for CMSSW by  doxygen 1.5.4