Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:26

0001 #include "RecoVertex/VertexTools/interface/VertexDistance.h"
0002 #include "RecoVertex/VertexPrimitives/interface/VertexState.h"
0003 #include "FWCore/Utilities/interface/Exception.h"
0004 #include <cfloat>
0005 
0006 using namespace reco;
0007 
0008 Measurement1D VertexDistance::distance(const VertexState& vtx1, const VertexState& vtx2) const {
0009   return distance(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
0010 }
0011 
0012 Measurement1D VertexDistance::distance(const Vertex& vtx1, const VertexState& vtx2) const {
0013   return distance(GlobalPoint(Basic3DVector<float>(vtx1.position())),
0014                   GlobalError(vtx1.covariance()),
0015                   vtx2.position(),
0016                   vtx2.error());
0017 }
0018 
0019 Measurement1D VertexDistance::distance(const VertexState& vtx1, const Vertex& vtx2) const {
0020   return distance(vtx1.position(),
0021                   vtx1.error(),
0022                   GlobalPoint(Basic3DVector<float>(vtx2.position())),
0023                   GlobalError(vtx2.covariance()));
0024 }
0025 
0026 Measurement1D VertexDistance::distance(const Vertex& vtx1, const Vertex& vtx2) const {
0027   return distance(GlobalPoint(Basic3DVector<float>(vtx1.position())),
0028                   GlobalError(vtx1.covariance()),
0029                   GlobalPoint(Basic3DVector<float>(vtx2.position())),
0030                   GlobalError(vtx2.covariance()));
0031 }
0032 
0033 float VertexDistance::compatibility(const VertexState& vtx1, const VertexState& vtx2) const {
0034   return compatibility(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
0035 }
0036 
0037 float VertexDistance::compatibility(const Vertex& vtx1, const VertexState& vtx2) const {
0038   return compatibility(GlobalPoint(Basic3DVector<float>(vtx1.position())),
0039                        GlobalError(vtx1.covariance()),
0040                        vtx2.position(),
0041                        vtx2.error());
0042 }
0043 
0044 float VertexDistance::compatibility(const VertexState& vtx1, const Vertex& vtx2) const {
0045   return compatibility(vtx1.position(),
0046                        vtx1.error(),
0047                        GlobalPoint(Basic3DVector<float>(vtx2.position())),
0048                        GlobalError(vtx2.covariance()));
0049 }
0050 
0051 float VertexDistance::compatibility(const Vertex& vtx1, const Vertex& vtx2) const {
0052   return compatibility(GlobalPoint(Basic3DVector<float>(vtx1.position())),
0053                        GlobalError(vtx1.covariance()),
0054                        GlobalPoint(Basic3DVector<float>(vtx2.position())),
0055                        GlobalError(vtx2.covariance()));
0056 }