#include <RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h>
Public Member Functions | |
KalmanSmoothedVertexChi2Estimator * | clone () const |
float | estimate (const CachingVertex< N > &vertex) const |
Methode which calculates the smoothed vertex chi**2. | |
virtual | ~KalmanSmoothedVertexChi2Estimator () |
Private Attributes | |
KVFHelper< N > | helper |
Definition at line 14 of file KalmanSmoothedVertexChi2Estimator.h.
virtual KalmanSmoothedVertexChi2Estimator< N >::~KalmanSmoothedVertexChi2Estimator | ( | ) | [inline, virtual] |
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 }
float KalmanSmoothedVertexChi2Estimator< N >::estimate | ( | const CachingVertex< N > & | vertex | ) | const [inline, virtual] |
Methode which calculates the smoothed vertex chi**2.
vertex | is the final estimate of the vertex, with the refited tracks |
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 }
KVFHelper<N> KalmanSmoothedVertexChi2Estimator< N >::helper [private] |
Definition at line 34 of file KalmanSmoothedVertexChi2Estimator.h.
Referenced by KalmanSmoothedVertexChi2Estimator< N >::estimate().