3 #include <Math/Functions.h>
4 #include <Math/SVector.h>
5 #include <Math/SMatrix.h>
19 fillVertexCovariance(err);
34 typedef ROOT::Math::SVector<double, 2>
SVector2;
35 typedef ROOT::Math::SMatrix<double, 2, 2,
36 ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
40 SMatrixSym2 cov = covariance.Sub<SMatrixSym2>(0, 0);
47 double dist = ROOT::Math::Mag(vector);
48 double error = ROOT::Math::Similarity(cov, vector);
49 if (error > 0.0 && dist > 1.0
e-9)
54 if ((vector[0] * direction.x() +
55 vector[1] * direction.y()) < 0.0)
65 typedef ROOT::Math::SVector<double, 3>
SVector3;
66 typedef ROOT::Math::SMatrix<double, 3, 3,
67 ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
71 SMatrixSym3 cov = covariance;
79 double dist = ROOT::Math::Mag(vector);
80 double error = ROOT::Math::Similarity(cov, vector);
81 if (error > 0.0 && dist > 1.0
e-9)
86 if ((vector[0] * direction.x() +
87 vector[1] * direction.y() +
88 vector[2] * direction.z()) < 0.0)
100 typedef ROOT::Math::SVector<double, 2>
SVector2;
101 typedef ROOT::Math::SMatrix<double, 2, 2,
102 ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
104 SMatrixSym2 cov = sv.
covariance().Sub<SMatrixSym2>(0, 0);
106 cov += pv.
covariance().Sub<SMatrixSym2>(0, 0);
111 double dist = ROOT::Math::Mag(vector);
112 double error = ROOT::Math::Similarity(cov, vector);
113 if (error > 0.0 && dist > 1.0
e-9)
118 if ((vector[0] * direction.x() +
119 vector[1] * direction.y()) < 0.0)
129 typedef ROOT::Math::SVector<double, 3>
SVector3;
130 typedef ROOT::Math::SMatrix<double, 3, 3,
131 ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
141 double dist = ROOT::Math::Mag(vector);
142 double error = ROOT::Math::Similarity(cov, vector);
143 if (error > 0.0 && dist > 1.0
e-9)
148 if ((vector[0] * direction.x() +
149 vector[1] * direction.y() +
150 vector[2] * direction.z()) < 0.0)
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
virtual const Point & vertex() const
vertex position (overwritten by PF...)
static Measurement1D computeDist3d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
ROOT::Math::SVector< double, 2 > SVector2
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
static Measurement1D computeDist2d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
const Point & position() const
position
math::XYZPoint Point
point in the space
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
ROOT::Math::SVector< double, 3 > SVector3