10#include <tracking/trackingUtilities/numerics/JacobianMatrix.h>
11#include <tracking/trackingUtilities/numerics/ParameterVector.h>
13#include <tracking/trackingUtilities/geometry/VectorUtil.h>
15#include <tracking/trackingUtilities/numerics/EigenView.h>
17#include <Math/Vector2D.h>
26 namespace TrackingUtilities {
32 template <
unsigned int M,
unsigned int N = M>
33 static JacobianMatrix<M, N>
zero()
39 template <
int M,
int N = M>
54 static JacobianMatrix<N, N>
passiveRotation(
int i,
int j,
const ROOT::Math::XYVector& phiVec)
59 result(i, i) = phiVec.x();
60 result(i, j) = phiVec.y();
61 result(j, i) = -phiVec.y();
62 result(j, j) = phiVec.x();
68 static JacobianMatrix<N>
scale(
const ParameterVector<N>& scales)
70 JacobianMatrix<N> result =
zero<N>();
71 mapToEigen(result).diagonal() = mapToEigen(scales);
77 template <
int M1,
int N1,
int M2,
int N2>
78 static JacobianMatrix < M1 + M2, N1 + N2 >
stackBlocks(
const JacobianMatrix<M1, N1>& block1,
79 const JacobianMatrix<M2, N2>& block2)
81 JacobianMatrix < M1 + M2, N1 + N2 > result;
82 mapToEigen(result) << mapToEigen(block1), Eigen::Matrix<double, M1, N2>::Zero(),
83 Eigen::Matrix<double, M2, N1>::Zero(), mapToEigen(block2);
static PlainMatrix< T, M, N > Identity()
Construct an identity matrix.
static PlainMatrix< T, M, N > Zero()
Construct a matrix initialized with zeros.
Abstract base class for different kinds of events.
Collection of functions related to jacobian matrices.
static JacobianMatrix< M1+M2, N1+N2 > stackBlocks(const JacobianMatrix< M1, N1 > &block1, const JacobianMatrix< M2, N2 > &block2)
Combines two jacobian matrices by putting them in two blocks diagonal to each other in a larger matri...
static JacobianMatrix< N, N > passiveRotation(int i, int j, const ROOT::Math::XYVector &phiVec)
Construct a passive rotation matrix around coordinates i and j.
static JacobianMatrix< N, N > passiveRotation(int i, int j, double phi)
Construct a passive rotation matrix around coordinates i and j.
static JacobianMatrix< M, N > zero()
Construct a zero matrix.
static JacobianMatrix< N > scale(const ParameterVector< N > &scales)
Calculates the jacobian matrix for a scaling in each parameter.
static JacobianMatrix< M, N > identity()
Construct a unit matrix.