1 #ifndef __JFIT__JMATRIXNZ__
2 #define __JFIT__JMATRIXNZ__
16 namespace JPP {
using namespace JFIT; }
62 set(pos, __begin, __end, alpha, sigma);
88 using namespace JTOOLS;
91 const int N = distance(__begin, __end);
97 const double ta = alpha *
PI / 180.0;
98 const double ct = cos(ta);
99 const double st = sin(ta);
104 for (T i = __begin; i != __end; ++i) {
106 const double dx = i->getX() - pos.
getX();
107 const double dy = i->getY() - pos.
getY();
108 const double dz = i->getZ() - pos.
getZ();
110 const double R = sqrt(dx*dx + dy*dy);
122 x *= (dz*ct - dx*st);
123 y *= (dz*ct - dy*st);
124 v *= -(dx*ct + dz*st);
125 w *= -(dy*ct + dz*st);
130 for (
int i = 0; i != N; ++i) {
132 for (
int j = 0; j != i; ++j) {
134 (*this)(j, i) = (*
this)(i, j);
195 return (first.
x * second.
x +
void set(const JVector3D &pos, T __begin, T __end, const double alpha, const double sigma)
Set co-variance matrix.
JMatrixNZ()
Default contructor.
static double getDot(const variance &first, const variance &second)
Get dot product.
JMatrixNZ(const JVector3D &pos, T __begin, T __end, const double alpha, const double sigma)
Constructor.
variance(const double __x, const double __y, const double __v, const double __w)
Constructor.
Data structure for vector in three dimensions.
Determination of the co-variance matrix of hits for a track along z-axis (JFIT::JLine1Z).
std::vector< variance > buffer
double getY() const
Get y position.
double getX() const
Get x position.
variance()
Default constructor.
Auxiliary data structure for co-variance calculation.
double getZ() const
Get z position.