3 #include <Math/Functions.h> 4 #include <Math/SVector.h> 5 #include <Math/SMatrix.h> 19 fillVertexCovariance(err);
31 typedef ROOT::Math::SVector<double, 3> SVector1;
32 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > SMatrixSym1;
35 SMatrixSym1 cov = covariance;
40 double dist = ROOT::Math::Mag(vector);
41 double error = ROOT::Math::Similarity(cov, vector);
42 if (error > 0.0 && dist > 1.0
e-9)
46 if ((vector[0] * direction.x() + vector[1] * direction.y() + vector[2] * direction.z()) < 0.0)
54 typedef ROOT::Math::SVector<double, 2> SVector2;
55 typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
59 SMatrixSym2 cov = covariance.Sub<SMatrixSym2>(0, 0);
64 double dist = ROOT::Math::Mag(vector);
65 double error = ROOT::Math::Similarity(cov, vector);
66 if (error > 0.0 && dist > 1.0
e-9)
71 if ((vector[0] * direction.x() + vector[1] * direction.y()) < 0.0)
79 typedef ROOT::Math::SVector<double, 3>
SVector3;
80 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
84 SMatrixSym3 cov = covariance;
91 double dist = ROOT::Math::Mag(vector);
92 double error = ROOT::Math::Similarity(cov, vector);
93 if (error > 0.0 && dist > 1.0
e-9)
98 if ((vector[0] * direction.x() + vector[1] * direction.y() + vector[2] * direction.z()) < 0.0)
109 typedef ROOT::Math::SVector<double, 3> SVector1;
110 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > SMatrixSym1;
118 double dist = ROOT::Math::Mag(vector);
119 double error = ROOT::Math::Similarity(cov, vector);
120 if (error > 0.0 && dist > 1.0
e-9)
125 if ((vector[0] * direction.x() + vector[1] * direction.y() + vector[2] * direction.z()) < 0.0)
136 typedef ROOT::Math::SVector<double, 2> SVector2;
137 typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
139 SMatrixSym2 cov = sv.
covariance().Sub<SMatrixSym2>(0, 0);
141 cov += pv.
covariance().Sub<SMatrixSym2>(0, 0);
145 double dist = ROOT::Math::Mag(vector);
146 double error = ROOT::Math::Similarity(cov, vector);
147 if (error > 0.0 && dist > 1.0
e-9)
152 if ((vector[0] * direction.x() + vector[1] * direction.y()) < 0.0)
162 typedef ROOT::Math::SVector<double, 3>
SVector3;
163 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
173 double dist = ROOT::Math::Mag(vector);
174 double error = ROOT::Math::Similarity(cov, vector);
175 if (error > 0.0 && dist > 1.0
e-9)
180 if ((vector[0] * direction.x() + vector[1] * direction.y() + vector[2] * direction.z()) < 0.0)
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
static Measurement1D computeDist3d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
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
static Measurement1D computeDist1d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
const Point & vertex() const override
vertex position (overwritten by PF...)
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