#include <RecoVertex/AdaptiveVertexFit/interface/KalmanChiSquare.h>
Public Types | |
typedef ReferenceCountingPointer < LinearizedTrackState< 5 > > | RefCountedLinearizedTrackState |
typedef ReferenceCountingPointer < VertexTrack< 5 > > | RefCountedVertexTrack |
A chi-2 criterion that relies on the Kalman formalism, exploiting data stored in LinearizedTrackState. | |
Public Member Functions | |
float | estimate (const GlobalPoint &, RefCountedLinearizedTrackState) const |
Definition at line 9 of file KalmanChiSquare.h.
typedef ReferenceCountingPointer<LinearizedTrackState<5> > KalmanChiSquare::RefCountedLinearizedTrackState |
Definition at line 18 of file KalmanChiSquare.h.
A chi-2 criterion that relies on the Kalman formalism, exploiting data stored in LinearizedTrackState.
It needs only a VertexState, not a full
Definition at line 17 of file KalmanChiSquare.h.
float KalmanChiSquare::estimate | ( | const GlobalPoint & | vertex, | |
RefCountedLinearizedTrackState | lt | |||
) | const |
Definition at line 6 of file KalmanChiSquare.cc.
References a, b, s, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by AdaptiveVertexFitter::weightTracks().
00009 { 00010 AlgebraicVector3 vtxposV; 00011 vtxposV[0] = vertex.x(); 00012 vtxposV[1] = vertex.y(); 00013 vtxposV[2] = vertex.z(); 00014 00015 AlgebraicMatrix53 a = lt->positionJacobian(); 00016 AlgebraicMatrix53 b = lt->momentumJacobian(); 00017 00018 // track information 00019 AlgebraicVector5 trackParameters = 00020 lt->predictedStateParameters(); 00021 00022 AlgebraicSymMatrix55 trackParametersWeight = 00023 lt->predictedStateWeight(); 00024 00025 AlgebraicSymMatrix33 s = ROOT::Math::SimilarityT(b,trackParametersWeight); 00026 bool ret = s.Invert(); 00027 if(!ret) throw VertexException 00028 ("[KalmanChiSquare] S matrix inversion failed"); 00029 00030 AlgebraicVector5 residual = lt->constantTerm(); 00031 AlgebraicVector3 newTrackMomentumP = s * ROOT::Math::Transpose(b) * trackParametersWeight * 00032 (trackParameters - residual - a*vtxposV); 00033 00034 AlgebraicVector5 rtp = ( residual + a * vtxposV + b * newTrackMomentumP); 00035 00036 AlgebraicVector5 parameterResiduals = trackParameters - rtp; 00037 lt->checkParameters(parameterResiduals); 00038 00039 return ROOT::Math::Similarity(parameterResiduals, trackParametersWeight); 00040 }