3 #include <Math/Functions.h> 4 #include <Math/SVector.h> 5 #include <Math/SMatrix.h> 19 fillVertexCovariance(err);
33 typedef ROOT::Math::SVector<double, 3> SVector1;
34 typedef ROOT::Math::SMatrix<double, 3, 3,
35 ROOT::Math::MatRepSym<double, 3> > SMatrixSym1;
38 SMatrixSym1 cov = covariance;
43 double dist = ROOT::Math::Mag(vector);
44 double error = ROOT::Math::Similarity(cov, vector);
45 if (error > 0.0 && dist > 1.0
e-9)
49 if ((vector[0] * direction.x() +
50 vector[1] * direction.y() +
51 vector[2] * direction.z()) < 0.0)
61 typedef ROOT::Math::SVector<double, 2> SVector2;
62 typedef ROOT::Math::SMatrix<double, 2, 2,
63 ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
67 SMatrixSym2 cov = covariance.Sub<SMatrixSym2>(0, 0);
73 double dist = ROOT::Math::Mag(vector);
74 double error = ROOT::Math::Similarity(cov, vector);
75 if (error > 0.0 && dist > 1.0
e-9)
80 if ((vector[0] * direction.x() +
81 vector[1] * direction.y()) < 0.0)
91 typedef ROOT::Math::SVector<double, 3>
SVector3;
92 typedef ROOT::Math::SMatrix<double, 3, 3,
93 ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
97 SMatrixSym3 cov = covariance;
105 double dist = ROOT::Math::Mag(vector);
106 double error = ROOT::Math::Similarity(cov, vector);
107 if (error > 0.0 && dist > 1.0
e-9)
112 if ((vector[0] * direction.x() +
113 vector[1] * direction.y() +
114 vector[2] * direction.z()) < 0.0)
125 typedef ROOT::Math::SVector<double, 3> SVector1;
126 typedef ROOT::Math::SMatrix<double, 3, 3,
127 ROOT::Math::MatRepSym<double, 3> > SMatrixSym1;
135 double dist = ROOT::Math::Mag(vector);
136 double error = ROOT::Math::Similarity(cov, vector);
137 if (error > 0.0 && dist > 1.0
e-9)
142 if ((vector[0] * direction.x() +
143 vector[1] * direction.y() +
144 vector[2] * direction.z()) < 0.0)
156 typedef ROOT::Math::SVector<double, 2> SVector2;
157 typedef ROOT::Math::SMatrix<double, 2, 2,
158 ROOT::Math::MatRepSym<double, 2> > SMatrixSym2;
160 SMatrixSym2 cov = sv.
covariance().Sub<SMatrixSym2>(0, 0);
162 cov += pv.
covariance().Sub<SMatrixSym2>(0, 0);
167 double dist = ROOT::Math::Mag(vector);
168 double error = ROOT::Math::Similarity(cov, vector);
169 if (error > 0.0 && dist > 1.0
e-9)
174 if ((vector[0] * direction.x() +
175 vector[1] * direction.y()) < 0.0)
185 typedef ROOT::Math::SVector<double, 3>
SVector3;
186 typedef ROOT::Math::SMatrix<double, 3, 3,
187 ROOT::Math::MatRepSym<double, 3> > SMatrixSym3;
197 double dist = ROOT::Math::Mag(vector);
198 double error = ROOT::Math::Similarity(cov, vector);
199 if (error > 0.0 && dist > 1.0
e-9)
204 if ((vector[0] * direction.x() +
205 vector[1] * direction.y() +
206 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)
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)
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