CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions
DistanceOfVertices Class Referenceabstract

#include <DistanceOfVertices.h>

Inheritance diagram for DistanceOfVertices:
DistanceOfVertices2D

Public Member Functions

virtual Measurement1D distance (const TransientVertex &, const TransientVertex &)=0
 
 DistanceOfVertices ()
 
virtual Measurement1D signedDistance (const TransientVertex &, const TransientVertex &, const CLHEP::Hep3Vector &)=0
 
virtual ~DistanceOfVertices ()
 

Protected Member Functions

CLHEP::Hep3Vector deltaV2V1 (const TransientVertex &v1, const TransientVertex &v2)
 
double terms2D (const TransientVertex &v1, const TransientVertex &v2)
 
double terms3D (const TransientVertex &v1, const TransientVertex &v2)
 

Detailed Description

Definition at line 12 of file DistanceOfVertices.h.

Constructor & Destructor Documentation

DistanceOfVertices::DistanceOfVertices ( )
inline

Definition at line 16 of file DistanceOfVertices.h.

16 {}
virtual DistanceOfVertices::~DistanceOfVertices ( )
inlinevirtual

Definition at line 17 of file DistanceOfVertices.h.

17 {}

Member Function Documentation

CLHEP::Hep3Vector DistanceOfVertices::deltaV2V1 ( const TransientVertex v1,
const TransientVertex v2 
)
inlineprotected

Definition at line 25 of file DistanceOfVertices.h.

References TransientVertex::position(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by DistanceOfVertices2D::distance(), DistanceOfVertices2D::signedDistance(), terms2D(), and terms3D().

25  {
26  return CLHEP::Hep3Vector ( v2.position().x() - v1.position().x() ,
27  v2.position().y() - v1.position().y() ,
28  v2.position().z() - v1.position().z() ) ;
29  }
T y() const
Definition: PV3DBase.h:57
GlobalPoint position() const
T z() const
Definition: PV3DBase.h:58
T x() const
Definition: PV3DBase.h:56
virtual Measurement1D DistanceOfVertices::distance ( const TransientVertex ,
const TransientVertex  
)
pure virtual

Implemented in DistanceOfVertices2D.

virtual Measurement1D DistanceOfVertices::signedDistance ( const TransientVertex ,
const TransientVertex ,
const CLHEP::Hep3Vector &   
)
pure virtual

Implemented in DistanceOfVertices2D.

double DistanceOfVertices::terms2D ( const TransientVertex v1,
const TransientVertex v2 
)
inlineprotected

Definition at line 32 of file DistanceOfVertices.h.

References GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), deltaV2V1(), and TransientVertex::positionError().

Referenced by DistanceOfVertices2D::distance(), and terms3D().

32  {
33  // better to have meaningful variables ...
34  double deltaX = deltaV2V1(v1,v2).x() ;
35  double deltaY = deltaV2V1(v1,v2).y() ;
36 
37  // covariance matrix of the diff. = sum of ind. cov. matr.
38  GlobalError covDelta = v1.positionError() + v2.positionError() ;
39 
40  double covDeltaXX = covDelta.cxx() ;
41  double covDeltaYY = covDelta.cyy() ;
42  double covDeltaXY = covDelta.cyx() ;
43 
44  return ( deltaX*deltaX * covDeltaXX +
45  deltaY*deltaY * covDeltaYY +
46  2*deltaX*deltaY * covDeltaXY ) ;
47  }
GlobalError positionError() const
CLHEP::Hep3Vector deltaV2V1(const TransientVertex &v1, const TransientVertex &v2)
double DistanceOfVertices::terms3D ( const TransientVertex v1,
const TransientVertex v2 
)
inlineprotected

Definition at line 50 of file DistanceOfVertices.h.

References GlobalErrorBase< T, ErrorWeightType >::czx(), GlobalErrorBase< T, ErrorWeightType >::czy(), GlobalErrorBase< T, ErrorWeightType >::czz(), deltaV2V1(), TransientVertex::positionError(), and terms2D().

50  {
51  //
52  double deltaX = deltaV2V1(v1,v2).x() ;
53  double deltaY = deltaV2V1(v1,v2).y() ;
54  double deltaZ = deltaV2V1(v1,v2).z() ;
55 
56  // covariance matrix of the diff. = sum of ind. cov. matr.
57  GlobalError covDelta = v1.positionError() + v2.positionError() ;
58 
59  double covDeltaZZ = covDelta.czz() ;
60  double covDeltaXZ = covDelta.czx() ;
61  double covDeltaYZ = covDelta.czy() ;
62 
63 
64  return ( terms2D ( v1 , v2 ) +
65  deltaZ*deltaZ * covDeltaZZ +
66  2*deltaX*deltaZ * covDeltaXZ +
67  2*deltaY*deltaZ * covDeltaYZ ) ;
68  }
GlobalError positionError() const
double terms2D(const TransientVertex &v1, const TransientVertex &v2)
CLHEP::Hep3Vector deltaV2V1(const TransientVertex &v1, const TransientVertex &v2)