CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

DistanceOfVertices Class Reference

#include <DistanceOfVertices.h>

Inheritance diagram for DistanceOfVertices:
DistanceOfVertices2D

List of all members.

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.

{}
virtual DistanceOfVertices::~DistanceOfVertices ( ) [inline, virtual]

Definition at line 17 of file DistanceOfVertices.h.

{}

Member Function Documentation

CLHEP::Hep3Vector DistanceOfVertices::deltaV2V1 ( const TransientVertex v1,
const TransientVertex v2 
) [inline, protected]
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 
) [inline, protected]

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().

                                                                             {
    // better to have meaningful variables ...
    double deltaX = deltaV2V1(v1,v2).x() ;
    double deltaY = deltaV2V1(v1,v2).y() ;

    // covariance matrix of the diff. = sum of ind. cov. matr.
    GlobalError covDelta = v1.positionError() + v2.positionError() ;

    double covDeltaXX = covDelta.cxx() ;
    double covDeltaYY = covDelta.cyy() ;
    double covDeltaXY = covDelta.cyx() ;

    return (   deltaX*deltaX * covDeltaXX  +
               deltaY*deltaY * covDeltaYY  +
             2*deltaX*deltaY * covDeltaXY    ) ; 
  }
double DistanceOfVertices::terms3D ( const TransientVertex v1,
const TransientVertex v2 
) [inline, protected]

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().

                                                                             {
    //
    double deltaX = deltaV2V1(v1,v2).x() ;
    double deltaY = deltaV2V1(v1,v2).y() ;
    double deltaZ = deltaV2V1(v1,v2).z() ;

    // covariance matrix of the diff. = sum of ind. cov. matr.
    GlobalError covDelta = v1.positionError() + v2.positionError() ;

    double covDeltaZZ = covDelta.czz() ;
    double covDeltaXZ = covDelta.czx() ;
    double covDeltaYZ = covDelta.czy() ;

    
    return (   terms2D ( v1 , v2 )         +
               deltaZ*deltaZ * covDeltaZZ  +
             2*deltaX*deltaZ * covDeltaXZ  +  
             2*deltaY*deltaZ * covDeltaYZ   ) ;
  }