Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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