41 theLabel(0), theOffset(0), measDim(0), transFlag(
false), measTransformation(), scatFlag(
42 false), localDerivatives(), globalLabels(), globalDerivatives() {
44 for (
unsigned int i = 0; i < 5; ++i) {
45 for (
unsigned int j = 0; j < 5; ++j) {
52 theLabel(0), theOffset(0), p2pJacobian(aJacobian), measDim(0), transFlag(
53 false), measTransformation(), scatFlag(
false), localDerivatives(), globalLabels(), globalDerivatives() {
70 const TVectorD &aResiduals,
const TVectorD &aPrecision,
71 double minPrecision) {
72 measDim = aResiduals.GetNrows();
73 unsigned int iOff = 5 -
measDim;
74 for (
unsigned int i = 0; i <
measDim; ++i) {
77 aPrecision[i] >= minPrecision ? aPrecision[i] : 0.);
78 for (
unsigned int j = 0; j <
measDim; ++j) {
95 const TVectorD &aResiduals,
const TMatrixDSym &aPrecision,
96 double minPrecision) {
97 measDim = aResiduals.GetNrows();
98 TMatrixDSymEigen measEigen(aPrecision);
104 TVectorD transPrecision = measEigen.GetEigenValues();
106 unsigned int iOff = 5 -
measDim;
107 for (
unsigned int i = 0; i <
measDim; ++i) {
110 transPrecision[i] >= minPrecision ? transPrecision[i] : 0.);
111 for (
unsigned int j = 0; j <
measDim; ++j) {
126 const TVectorD &aPrecision,
double minPrecision) {
127 measDim = aResiduals.GetNrows();
128 unsigned int iOff = 5 -
measDim;
129 for (
unsigned int i = 0; i <
measDim; ++i) {
132 aPrecision[i] >= minPrecision ? aPrecision[i] : 0.);
147 const TMatrixDSym &aPrecision,
double minPrecision) {
148 measDim = aResiduals.GetNrows();
149 TMatrixDSymEigen measEigen(aPrecision);
155 TVectorD transPrecision = measEigen.GetEigenValues();
156 unsigned int iOff = 5 -
measDim;
157 for (
unsigned int i = 0; i <
measDim; ++i) {
160 transPrecision[i] >= minPrecision ? transPrecision[i] : 0.);
161 for (
unsigned int j = 0; j <
measDim; ++j) {
198 aTransformation.UnitMatrix();
211 const TVectorD &aPrecision) {
237 const TMatrixDSym &aPrecision) {
239 TMatrixDSymEigen scatEigen(aPrecision);
240 TMatrixD aTransformation = scatEigen.GetEigenVectors();
242 TVectorD transResiduals = aTransformation * aResiduals;
243 TVectorD transPrecision = scatEigen.GetEigenValues();
244 for (
unsigned int i = 0; i < 2; ++i) {
247 for (
unsigned int j = 0; j < 2; ++j) {
276 aTransformation.ResizeTo(2, 2);
278 for (
unsigned int i = 0; i < 2; ++i) {
279 for (
unsigned int j = 0; j < 2; ++j) {
284 aTransformation.UnitMatrix();
321 const TMatrixD &aDerivatives) {
390 * aJac.Sub<
SMatrix33>(0, 0).InverseFast(ifail);
420 if (aDirection < 1) {
430 if (!matW.InvertFast()) {
431 std::cout <<
" GblPoint::getDerivatives failed to invert matrix: "
432 << matW << std::endl;
434 <<
" Possible reason for singular matrix: multiple GblPoints at same arc-length"
436 throw std::overflow_error(
"Singular matrix inversion exception");
448 std::cout <<
" GblPoint";
450 std::cout <<
", label " <<
theLabel;
456 std::cout <<
", " <<
measDim <<
" measurements";
459 std::cout <<
", scatterer";
462 std::cout <<
", diagonalized";
466 <<
" local derivatives";
470 <<
" global derivatives";
472 std::cout << std::endl;
475 std::cout <<
" Measurement" << std::endl;
482 std::cout <<
" Scatterer" << std::endl;
487 std::cout <<
" Local Derivatives:" << std::endl;
491 std::cout <<
" Global Labels:";
492 for (
unsigned int i = 0; i <
globalLabels.size(); ++i) {
495 std::cout << std::endl;
496 std::cout <<
" Global Derivatives:" << std::endl;
499 std::cout <<
" Jacobian " << std::endl;
500 std::cout <<
" Point-to-point " << std::endl <<
p2pJacobian
503 std::cout <<
" To previous offset " << std::endl <<
prevJacobian
505 std::cout <<
" To next offset " << std::endl <<
nextJacobian