Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:20

0001 #ifndef Vertex_VertexDistance3D_H
0002 #define Vertex_VertexDistance3D_H
0003 
0004 #include "RecoVertex/VertexTools/interface/VertexDistance.h"
0005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0006 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0007 
0008 /**
0009  * Computes the distance and chi-squared compatibility between two vertices
0010  * with their 3D positions.
0011  */
0012 
0013 class VertexDistance3D : public VertexDistance {
0014 public:
0015   using VertexDistance::compatibility;
0016 
0017   VertexDistance3D() {}
0018 
0019   /**
0020    * The signed distance is computed using a vector
0021    * from the primary to the secondary vertex and
0022    * a given reference vector.
0023    * The sign is determined by the scalar product  of
0024    * the vector connecting the vertices and the reference vector:
0025    * if the scalar product is greater than zero, the sign is +1, else -1
0026    */
0027   Measurement1D signedDistance(const reco::Vertex &primVtx,
0028                                const reco::Vertex &secVtx,
0029                                const GlobalVector &momentum) const override;
0030 
0031   VertexDistance3D *clone() const override { return new VertexDistance3D(*this); }
0032 
0033   using VertexDistance::distance;
0034 
0035 private:
0036   AlgebraicSymMatrix33 theNullMatrix;
0037   Measurement1D distance(const GlobalPoint &vtx1Position,
0038                          const GlobalError &vtx1PositionError,
0039                          const GlobalPoint &vtx2Position,
0040                          const GlobalError &vtx2PositionError) const override;
0041 
0042   float compatibility(const GlobalPoint &vtx1Position,
0043                       const GlobalError &vtx1PositionError,
0044                       const GlobalPoint &vtx2Position,
0045                       const GlobalError &vtx2PositionError) const override;
0046 };
0047 
0048 #endif