CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/DataFormats/PatCandidates/src/Vertexing.cc

Go to the documentation of this file.
00001 #include "DataFormats/PatCandidates/interface/Vertexing.h"
00002 
00003 using pat::VertexAssociation;
00004 
00005 void VertexAssociation::setDistances(const AlgebraicVector3 & dist, const AlgebraicSymMatrix33 &err) {
00006     setDz( Measurement1DFloat( std::abs(dist[2]) , std::sqrt(err(2,2)) ) );
00007 
00008     AlgebraicVector3 dist2D(dist[0], dist[1], 0);
00009     float d2 = dist2D[0]*dist2D[0] + dist2D[1]*dist2D[1];
00010     setDr( Measurement1DFloat( sqrt(d2), sqrt(ROOT::Math::Similarity(dist2D, err)/d2) ) );
00011 }