3 #include <Math/Functions.h>
4 #include <Math/SVector.h>
5 #include <Math/SMatrix.h>
19 typedef ROOT::Math::SVector<double, 2> SVector2;
20 typedef ROOT::Math::SMatrix<double, 2, 2,
21 ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
23 SMatrixSym2 cov = sv.
covariance().Sub<SMatrixSym2>(0, 0);
30 double dist = ROOT::Math::Mag(vector);
31 double error = ROOT::Math::Similarity(cov, vector);
32 if (error > 0.0 && dist > 1.0e-9)
37 if ((vector[0] * direction.x() +
38 vector[1] * direction.y()) < 0.0)
48 typedef ROOT::Math::SVector<double, 3> SVector3;
49 typedef ROOT::Math::SMatrix<double, 3, 3,
50 ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
60 double dist = ROOT::Math::Mag(vector);
61 double error = ROOT::Math::Similarity(cov, vector);
62 if (error > 0.0 && dist > 1.0e-9)
67 if ((vector[0] * direction.x() +
68 vector[1] * direction.y() +
69 vector[2] * direction.z()) < 0.0)
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
const Point & position() const
position
static Measurement1D computeDist2d(const reco::Vertex &pv, const reco::Vertex &sv, const GlobalVector &direction, bool withPVError)
static Measurement1D computeDist3d(const reco::Vertex &pv, const reco::Vertex &sv, const GlobalVector &direction, bool withPVError)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Error error() const
return SMatrix