![]() |
![]() |
#include <RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackCompatibilityEstimator.h>
The compatibility is computed from the squared standardized residuals between the track and the vertex. If track and vertex errors are Gaussian and correct, this quantity is distributed as chi**2(ndf=2)). Can be used to identify outlying tracks.
Definition at line 25 of file KalmanVertexTrackCompatibilityEstimator.h.
typedef VertexTrack<N>::RefCountedLinearizedTrackState KalmanVertexTrackCompatibilityEstimator< N >::RefCountedLinearizedTrackState |
Reimplemented from VertexTrackCompatibilityEstimator< N >.
Definition at line 31 of file KalmanVertexTrackCompatibilityEstimator.h.
typedef VertexTrack<N>::RefCountedRefittedTrackState KalmanVertexTrackCompatibilityEstimator< N >::RefCountedRefittedTrackState |
Definition at line 32 of file KalmanVertexTrackCompatibilityEstimator.h.
typedef CachingVertex<N>::RefCountedVertexTrack KalmanVertexTrackCompatibilityEstimator< N >::RefCountedVertexTrack |
Reimplemented from VertexTrackCompatibilityEstimator< N >.
Definition at line 30 of file KalmanVertexTrackCompatibilityEstimator.h.
KalmanVertexTrackCompatibilityEstimator< N >::KalmanVertexTrackCompatibilityEstimator | ( | ) | [inline] |
Definition at line 34 of file KalmanVertexTrackCompatibilityEstimator.h.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::clone().
virtual KalmanVertexTrackCompatibilityEstimator< N >::~KalmanVertexTrackCompatibilityEstimator | ( | ) | [inline, virtual] |
virtual KalmanVertexTrackCompatibilityEstimator<N>* KalmanVertexTrackCompatibilityEstimator< N >::clone | ( | ) | const [inline, virtual] |
Clone method.
Implements VertexTrackCompatibilityEstimator< N >.
Definition at line 54 of file KalmanVertexTrackCompatibilityEstimator.h.
References KalmanVertexTrackCompatibilityEstimator< N >::KalmanVertexTrackCompatibilityEstimator().
00055 { 00056 return new KalmanVertexTrackCompatibilityEstimator(* this); 00057 }
float KalmanVertexTrackCompatibilityEstimator< N >::estimate | ( | const reco::Vertex & | vertex, | |
const reco::TransientTrack & | track | |||
) | const [inline, virtual] |
Implements VertexTrackCompatibilityEstimator< N >.
Definition at line 36 of file KalmanVertexTrackCompatibilityEstimator.cc.
References reco::Vertex::chi2(), RecoVertex::convertError(), reco::Vertex::covariance(), err, KalmanVertexTrackCompatibilityEstimator< N >::estimateFittedTrack(), KalmanVertexTrackCompatibilityEstimator< N >::estimateNFittedTrack(), find(), LinearizedTrackStateFactory::linearizedTrackState(), reco::Vertex::position(), reco::TransientTrack::trackBaseRef(), reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), and KalmanVertexTrackCompatibilityEstimator< N >::vTrackFactory.
00038 { 00039 // GlobalPoint linP(vertex.position().x(), vertex.position().z(),vertex.position().z()); 00040 GlobalPoint linP(Basic3DVector<float> (vertex.position())); 00041 00042 LinearizedTrackStateFactory lTrackFactory; 00043 RefCountedLinearizedTrackState linTrack = 00044 lTrackFactory.linearizedTrackState(linP, track); 00045 GlobalError err(RecoVertex::convertError(vertex.covariance())); 00046 VertexState vState(linP, err); 00047 RefCountedVertexTrack vertexTrack = vTrackFactory.vertexTrack(linTrack, vState); 00048 00049 vector<RefCountedVertexTrack> initialTracks(1, vertexTrack); 00050 CachingVertex<N> cachingVertex(linP, err, initialTracks, 00051 vertex.chi2()); 00052 // FIXME: this should work also for tracks without a persistent ref. 00053 // return estimateNFittedTrack(cachingVertex, vertexTrack); 00054 if (find(vertex.tracks_begin(), vertex.tracks_end(), track.trackBaseRef()) != vertex.tracks_end()) 00055 { 00056 return estimateFittedTrack(cachingVertex, vertexTrack); 00057 } else { 00058 return estimateNFittedTrack(cachingVertex, vertexTrack); 00059 } 00060 }
virtual float KalmanVertexTrackCompatibilityEstimator< N >::estimate | ( | const CachingVertex< N > & | v, | |
const RefCountedLinearizedTrackState | track | |||
) | const [virtual] |
Methods giving back the compatibility estimation.
Implements VertexTrackCompatibilityEstimator< N >.
float KalmanVertexTrackCompatibilityEstimator< N >::estimate | ( | const CachingVertex< N > & | vrt, | |
const RefCountedVertexTrack | track | |||
) | const [inline, virtual] |
Track-to-vertex compatibility.
The track weight is taken into account.
track | The track for which the chi**2 has to be estimated. | |
v | The vertex against which the chi**2 has to be estimated. |
Implements VertexTrackCompatibilityEstimator< N >.
Definition at line 10 of file KalmanVertexTrackCompatibilityEstimator.cc.
References KalmanVertexTrackCompatibilityEstimator< N >::estimateFittedTrack(), KalmanVertexTrackCompatibilityEstimator< N >::estimateNFittedTrack(), CachingVertex< N >::tracks(), and tracks.
Referenced by MultiVertexFitter::updateWeights().
00012 { 00013 //checking if the track passed really belongs to the vertex 00014 vector<RefCountedVertexTrack> tracks = vertex.tracks(); 00015 typename vector<RefCountedVertexTrack>::iterator pos 00016 = find_if(tracks.begin(), tracks.end(), VertexTrackEqual<N>(tr)); 00017 if(pos != tracks.end()) { 00018 return estimateFittedTrack(vertex,*pos); 00019 } else { 00020 return estimateNFittedTrack(vertex,tr); 00021 } 00022 }
float KalmanVertexTrackCompatibilityEstimator< N >::estimateDifference | ( | const CachingVertex< N > & | more, | |
const CachingVertex< N > & | less, | |||
const RefCountedVertexTrack | track | |||
) | const [inline, private] |
Definition at line 97 of file KalmanVertexTrackCompatibilityEstimator.cc.
References KalmanVertexTrackCompatibilityEstimator< N >::helper.
float KalmanVertexTrackCompatibilityEstimator< N >::estimateFittedTrack | ( | const CachingVertex< N > & | v, | |
const RefCountedVertexTrack | track | |||
) | const [inline, private] |
Definition at line 69 of file KalmanVertexTrackCompatibilityEstimator.cc.
References KalmanVertexTrackCompatibilityEstimator< N >::trackUpdator.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimate().
00070 { 00071 //remove track from the vertex using the vertex updator 00072 // Using the update instead of the remove methode, we can specify a weight which 00073 // is different than then one which the vertex track has been defined with. 00074 //CachingVertex rVert = updator.remove(v, track); 00075 RefCountedVertexTrack newSmoothedTrack = trackUpdator.update(v, track); 00076 // cout << newSmoothedTrack->smoothedChi2()<<" "<<estimateDifference(v,rVert,newSmoothedTrack)<<endl; 00077 // return estimateDifference(v,rVert,newSmoothedTrack); 00078 return newSmoothedTrack->smoothedChi2(); 00079 }
float KalmanVertexTrackCompatibilityEstimator< N >::estimateNFittedTrack | ( | const CachingVertex< N > & | v, | |
const RefCountedVertexTrack | track | |||
) | const [inline, private] |
Definition at line 85 of file KalmanVertexTrackCompatibilityEstimator.cc.
References CachingVertex< N >::totalChiSquared(), and KalmanVertexTrackCompatibilityEstimator< N >::updator.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimate().
00086 { 00087 // Using the update instead of the add methode, we can specify a weight which 00088 // is different than then one which the vertex track has been defined with. 00089 CachingVertex<N> rVert = updator.add(v, track); 00090 return (rVert.totalChiSquared()-v.totalChiSquared()); 00091 }
KVFHelper<N> KalmanVertexTrackCompatibilityEstimator< N >::helper [private] |
Definition at line 69 of file KalmanVertexTrackCompatibilityEstimator.h.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimateDifference().
KalmanVertexTrackUpdator<N> KalmanVertexTrackCompatibilityEstimator< N >::trackUpdator [private] |
Definition at line 67 of file KalmanVertexTrackCompatibilityEstimator.h.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimateFittedTrack().
KalmanVertexUpdator<N> KalmanVertexTrackCompatibilityEstimator< N >::updator [private] |
Definition at line 66 of file KalmanVertexTrackCompatibilityEstimator.h.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimateNFittedTrack().
VertexTrackFactory<N> KalmanVertexTrackCompatibilityEstimator< N >::vTrackFactory [private] |
Definition at line 68 of file KalmanVertexTrackCompatibilityEstimator.h.
Referenced by KalmanVertexTrackCompatibilityEstimator< N >::estimate().