41 #define SIMPLE_UOP(OPER) \
42 G4ErrorMatrixIter a=m.begin(); \
43 G4ErrorMatrixIter e=m.begin()+num_size(); \
44 for(;a<e; a++) (*a) OPER t;
46 #define SIMPLE_BOP(OPER) \
47 G4ErrorMatrixIter a=m.begin(); \
48 G4ErrorMatrixConstIter b=mat2.m.begin(); \
49 G4ErrorMatrixConstIter e=m.begin()+num_size(); \
50 for(;a<e; a++, b++) (*a) OPER (*b);
52 #define SIMPLE_TOP(OPER) \
53 G4ErrorMatrixConstIter a=mat1.m.begin(); \
54 G4ErrorMatrixConstIter b=mat2.m.begin(); \
55 G4ErrorMatrixIter t=mret.m.begin(); \
56 G4ErrorMatrixConstIter e=mat1.m.begin()+mat1.num_size(); \
57 for( ;a<e; a++, b++, t++) (*t) = (*a) OPER (*b);
59 #define CHK_DIM_2(r1,r2,c1,c2,fun) \
60 if (r1!=r2 || c1!=c2) { \
61 G4ErrorMatrix::error("Range error in Matrix function " #fun "(1)."); \
64 #define CHK_DIM_1(c1,r2,fun) \
66 G4ErrorMatrix::error("Range error in Matrix function " #fun "(2)."); \
72 :
m(p*(p+1)/2), nrow(p)
79 :
m(p*(p+1)/2), nrow(p)
113 :
m(mat1.size), nrow(mat1.nrow), size(mat1.size)
134 for(
G4int icol=1; icol<=irow; icol++)
138 b1 += irow+min_row-1;
153 for(
G4int icol=1; icol<=irow; icol++)
157 b1 += irow+min_row-1;
171 for(
G4int icol=1; icol<=irow; icol++)
203 for(;a<e; a++, b++) { (*b) = -(*a); }
294 for(mit1=mat1.
m.begin();
299 for(
int step=1;step<=mat2.
num_row();++step)
306 temp+=*(sp++)*(*(mit2++));
309 for(
int stept=step+1;stept<=mat2.
num_row();stept++)
311 temp+=*sp*(*(mit2++));
312 if(stept<mat2.
num_row()) sp+=stept;
329 for(step=1,snp=mat1.
m.begin();step<=mat1.
num_row();snp+=step++)
331 for(mit1=mat2.
m.begin();mit1<mat2.
m.begin()+mat2.
num_col();mit1++)
338 temp+=*mit2*(*(sp++));
342 for(stept=step+1;stept<=mat1.
num_row();stept++)
358 G4int step1,stept1,step2,stept2;
362 for(step1=1,snp1=mat1.
m.begin();step1<=mat1.
num_row();snp1+=step1++)
364 for(step2=1,snp2=mat2.
m.begin();step2<=mat2.
num_row();)
372 while(sp1<snp1+step1)
373 { temp+=(*(sp1++))*(*(sp2++)); }
375 for(stept1=step1+1;stept1!=step2+1;sp1+=stept1++)
376 { temp+=(*sp1)*(*(sp2++)); }
378 for(stept2=++step2;stept2<=mat2.
num_row();sp1+=stept1++,sp2+=stept2++)
379 { temp+=(*sp1)*(*sp2); }
384 { temp+=(*(sp1++))*(*(sp2++)); }
386 for(stept2=++step2;stept2!=step1+1;sp2+=stept2++)
387 { temp+=(*(sp1++))*(*sp2); }
389 for(stept1=step1+1;stept1<=mat1.
num_row();sp1+=stept1++,sp2+=stept2++)
390 { temp+=(*sp1)*(*sp2); }
414 for(
G4int k=1;k<=j;k++)
417 if(j!=k) *mkj += *sjk;
446 for(
G4int k=1;k<=j;k++)
449 if(j!=k) *mkj -= *sjk;
496 for(
G4int k=1;k<=j;k++)
499 if(j!=k) *mkj = *sjk;
511 if (&mat1 ==
this) {
return *
this; }
532 if(os.flags() & std::ios::fixed)
534 width = os.precision()+3;
538 width = os.precision()+7;
545 os << q(irow,icol) <<
" ";
560 for(
G4int ic=1;ic<=ir;ic++)
562 *(b++) = (*f)(*(a++), ir, ic);
581 for(
G4int c=1;c<=r;c++)
600 for(
G4int r=1;r<=mret.num_row();r++)
603 for(
G4int c=1;c<=r;c++)
610 tmp+=(*(tempri++))*(*(m1ci++));
627 for(
G4int r=1;r<=mret.num_row();r++)
639 tmp+=(*(tempri++))*(*(m1ci++));
643 tmp+=(*(tempri++))*(*(m1ci));
661 for(
G4int r=1;r<=mret.num_row();r++)
664 for(
G4int c=1;c<=r;c++)
669 for(
G4int i=1;i<=mat1.num_row();i++)
671 tmp+=(*(tempir))*(*(m1ic));
694 c11 = (*(
m.begin()+2)) * (*(
m.begin()+5))
695 - (*(
m.begin()+4)) * (*(
m.begin()+4));
696 c12 = (*(
m.begin()+4)) * (*(
m.begin()+3))
697 - (*(
m.begin()+1)) * (*(
m.begin()+5));
698 c13 = (*(
m.begin()+1)) * (*(
m.begin()+4))
699 - (*(
m.begin()+2)) * (*(
m.begin()+3));
700 c22 = (*(
m.begin()+5)) * (*
m.begin())
701 - (*(
m.begin()+3)) * (*(
m.begin()+3));
702 c23 = (*(
m.begin()+3)) * (*(
m.begin()+1))
703 - (*(
m.begin()+4)) * (*
m.begin());
704 c33 = (*
m.begin()) * (*(
m.begin()+2))
705 - (*(
m.begin()+1)) * (*(
m.begin()+1));
706 t1 = std::fabs(*
m.begin());
707 t2 = std::fabs(*(
m.begin()+1));
708 t3 = std::fabs(*(
m.begin()+3));
713 temp = *(
m.begin()+3);
714 det = c23*c12-c22*c13;
719 det = c22*c33-c23*c23;
724 temp = *(
m.begin()+3);
725 det = c23*c12-c22*c13;
729 temp = *(
m.begin()+1);
730 det = c13*c23-c12*c33;
752 det = (*
m.begin())*(*(
m.begin()+2)) - (*(
m.begin()+1))*(*(
m.begin()+1));
759 *(
m.begin()+1) *= -ss;
760 temp = ss*(*(
m.begin()+2));
761 *(
m.begin()+2) = ss*(*
m.begin());
772 *
m.begin() = 1.0/(*
m.begin());
801 static const G4int max_array = 20;
805 static std::vector<G4int> ir_vec (max_array+1);
806 if (ir_vec.size() <=
static_cast<unsigned int>(
nrow))
808 ir_vec.resize(
nrow+1);
810 G4int * ir = &ir_vec[0];
815 if(i==0) {
return det; }
823 { t += *(
m.begin() + (i+3)*i/2); }
846 static const G4int max_array = 25;
848 if (!xvec) xvec =
new std::vector<G4double> (max_array) ;
850 if (!pivv) pivv =
new std::vector<G4int> (max_array) ;
851 typedef std::vector<G4int>::iterator pivIter;
852 if (xvec->size() <
static_cast<unsigned int>(
nrow)) xvec->resize(
nrow);
853 if (pivv->size() <
static_cast<unsigned int>(
nrow)) pivv->resize(
nrow);
860 pivIter piv = pivv->begin();
873 for (i = 0; i <
nrow; i++)
884 for (j=1; j <
nrow; j+=ss)
886 mjj =
m.begin() + j*(j-1)/2 + j-1;
889 ip =
m.begin() + (j+1)*j/2 + j-1;
890 for (i=j+1; i <=
nrow ; ip += i++)
892 if (std::fabs(*ip) >
lambda)
894 lambda = std::fabs(*ip);
910 if (std::fabs(*mjj) >= lambda*alpha)
918 ip =
m.begin() + pivrow*(pivrow-1)/2+j-1;
919 for (k=j; k < pivrow; k++)
921 if (std::fabs(*ip) > sigma)
922 sigma = std::fabs(*ip);
925 if (sigma * std::fabs(*mjj) >= alpha * lambda *
lambda)
930 else if (std::fabs(*(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1))
944 temp2 = *mjj = 1./ *mjj;
947 for (i=j+1; i <=
nrow; i++)
949 temp1 = *(
m.begin() + i*(i-1)/2 + j-1) * temp2;
950 ip =
m.begin()+i*(i-1)/2+j;
951 for (k=j+1; k<=i; k++)
953 *ip -= temp1 * *(
m.begin() + k*(k-1)/2 + j-1);
954 if (std::fabs(*ip) <= epsilon)
960 ip =
m.begin() + (j+1)*j/2 + j-1;
961 for (i=j+1; i <=
nrow; ip += i++)
972 ip =
m.begin() + pivrow*(pivrow-1)/2 + j;
973 for (i=j+1; i < pivrow; i++, ip++)
975 temp1 = *(
m.begin() + i*(i-1)/2 + j-1);
976 *(
m.begin() + i*(i-1)/2 + j-1)= *ip;
980 *mjj = *(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1);
981 *(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1) = temp1;
982 ip =
m.begin() + (pivrow+1)*pivrow/2 + j-1;
984 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
996 temp2 = *mjj = 1./ *mjj;
999 for (i = j+1; i <=
nrow; i++)
1001 temp1 = *(
m.begin() + i*(i-1)/2 + j-1) * temp2;
1002 ip =
m.begin()+i*(i-1)/2+j;
1003 for (k=j+1; k<=i; k++)
1005 *ip -= temp1 * *(
m.begin() + k*(k-1)/2 + j-1);
1006 if (std::fabs(*ip) <= epsilon)
1012 ip =
m.begin() + (j+1)*j/2 + j-1;
1013 for (i=j+1; i<=
nrow; ip += i++)
1027 ip =
m.begin() + pivrow*(pivrow-1)/2 + j+1;
1028 for (i=j+2; i < pivrow; i++, ip++)
1030 temp1 = *(
m.begin() + i*(i-1)/2 + j);
1031 *(
m.begin() + i*(i-1)/2 + j) = *ip;
1034 temp1 = *(mjj + j + 1);
1036 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1);
1037 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1) = temp1;
1039 *(mjj + j) = *(
m.begin() + pivrow*(pivrow-1)/2 + j-1);
1040 *(
m.begin() + pivrow*(pivrow-1)/2 + j-1) = temp1;
1041 ip =
m.begin() + (pivrow+1)*pivrow/2 + j;
1042 iq = ip + pivrow-(j+1);
1043 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
1051 temp2 = *mjj * *(mjj + j + 1) - *(mjj + j) * *(mjj + j);
1056 "Error in pivot choice!");
1064 *mjj = *(mjj + j + 1) * temp2;
1065 *(mjj + j + 1) = temp1 * temp2;
1066 *(mjj + j) = - *(mjj + j) * temp2;
1071 for (i=j+2; i <=
nrow ; i++)
1073 ip =
m.begin() + i*(i-1)/2 + j-1;
1074 temp1 = *ip * *mjj + *(ip + 1) * *(mjj + j);
1075 if (std::fabs(temp1 ) <= epsilon)
1077 temp2 = *ip * *(mjj + j) + *(ip + 1) * *(mjj + j + 1);
1078 if (std::fabs(temp2 ) <= epsilon)
1080 for (k = j+2; k <= i ; k++)
1082 ip =
m.begin() + i*(i-1)/2 + k-1;
1083 iq =
m.begin() + k*(k-1)/2 + j-1;
1084 *ip -= temp1 * *iq + temp2 * *(iq+1);
1085 if (std::fabs(*ip) <= epsilon)
1090 for (i=j+2; i <=
nrow ; i++)
1092 ip =
m.begin() + i*(i-1)/2 + j-1;
1093 temp1 = *ip * *mjj + *(ip+1) * *(mjj + j);
1094 if (std::fabs(temp1) <= epsilon)
1096 *(ip+1) = *ip * *(mjj + j) + *(ip+1) * *(mjj + j + 1);
1097 if (std::fabs(*(ip+1)) <= epsilon)
1108 mjj =
m.begin() + j*(j-1)/2 + j-1;
1122 for (j = nrow ; j >= 1 ; j -= ss)
1124 mjj =
m.begin() + j*(j-1)/2 + j-1;
1130 ip =
m.begin() + (j+1)*j/2 + j-1;
1131 for (i=0; i < nrow-j; ip += 1+j+i++)
1135 for (i=j+1; i<=
nrow ; i++)
1138 ip =
m.begin() + i*(i-1)/2 + j;
1139 for (k=0; k <= i-j-1; k++)
1140 { temp2 += *ip++ * x[k]; }
1141 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1142 { temp2 += *ip * x[k]; }
1143 *(
m.begin()+ i*(i-1)/2 + j-1) = -temp2;
1146 ip =
m.begin() + (j+1)*j/2 + j-1;
1147 for (k=0; k < nrow-j; ip += 1+j+k++)
1148 { temp2 += x[k] * *ip; }
1156 std::ostringstream message;
1157 message <<
"Error in pivot: " << piv[j-1];
1158 G4Exception(
"G4ErrorSymMatrix::invertBunchKaufman()",
1164 ip =
m.begin() + (j+1)*j/2 + j-1;
1165 for (i=0; i < nrow-j; ip += 1+j+i++)
1169 for (i=j+1; i<=
nrow ; i++)
1172 ip =
m.begin() + i*(i-1)/2 + j;
1173 for (k=0; k <= i-j-1; k++)
1174 { temp2 += *ip++ * x[k]; }
1175 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1176 { temp2 += *ip * x[k]; }
1177 *(
m.begin()+ i*(i-1)/2 + j-1) = -temp2;
1180 ip =
m.begin() + (j+1)*j/2 + j-1;
1181 for (k=0; k < nrow-j; ip += 1+j+k++)
1182 { temp2 += x[k] * *ip; }
1185 ip =
m.begin() + (j+1)*j/2 + j-2;
1186 for (i=j+1; i <=
nrow; ip += i++)
1187 { temp2 += *ip * *(ip+1); }
1189 ip =
m.begin() + (j+1)*j/2 + j-2;
1190 for (i=0; i < nrow-j; ip += 1+j+i++)
1194 for (i=j+1; i <=
nrow ; i++)
1197 ip =
m.begin() + i*(i-1)/2 + j;
1198 for (k=0; k <= i-j-1; k++)
1199 { temp2 += *ip++ * x[k]; }
1200 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1201 { temp2 += *ip * x[k]; }
1202 *(
m.begin()+ i*(i-1)/2 + j-2)= -temp2;
1205 ip =
m.begin() + (j+1)*j/2 + j-2;
1206 for (k=0; k < nrow-j; ip += 1+j+k++)
1207 { temp2 += x[k] * *ip; }
1215 pivrow = (piv[j-1]==0)? -piv[j-2] : piv[j-1];
1216 ip =
m.begin() + pivrow*(pivrow-1)/2 + j;
1217 for (i=j+1;i < pivrow; i++, ip++)
1219 temp1 = *(
m.begin() + i*(i-1)/2 + j-1);
1220 *(
m.begin() + i*(i-1)/2 + j-1) = *ip;
1224 *mjj = *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1);
1225 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1) = temp1;
1229 *(mjj-1) = *(
m.begin() + pivrow*(pivrow-1)/2 + j-2);
1230 *(
m.begin() + pivrow*(pivrow-1)/2 + j-2) = temp1;
1233 ip =
m.begin() + (pivrow+1)*pivrow/2 + j-1;
1235 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
1400 + m[
A12]*Det2_23_01;
1402 + m[
A13]*Det2_23_01;
1404 + m[
A13]*Det2_23_02;
1406 + m[
A13]*Det2_23_12;
1408 + m[
A12]*Det2_24_01;
1410 + m[
A13]*Det2_24_01;
1412 + m[
A14]*Det2_24_01;
1414 + m[
A13]*Det2_24_02;
1416 + m[
A14]*Det2_24_02;
1418 + m[
A13]*Det2_24_12;
1420 + m[
A14]*Det2_24_12;
1422 + m[
A12]*Det2_34_01;
1424 + m[
A13]*Det2_34_01;
1426 + m[
A14]*Det2_34_01;
1428 + m[
A13]*Det2_34_02;
1430 + m[
A14]*Det2_34_02;
1432 + m[
A14]*Det2_34_03;
1434 + m[
A13]*Det2_34_12;
1436 + m[
A14]*Det2_34_12;
1438 + m[
A14]*Det2_34_13;
1440 + m[
A22]*Det2_34_01;
1442 + m[
A23]*Det2_34_01;
1444 + m[
A24]*Det2_34_01;
1446 + m[
A23]*Det2_34_02;
1448 + m[
A24]*Det2_34_02;
1450 + m[
A24]*Det2_34_03;
1452 + m[
A23]*Det2_34_12;
1454 + m[
A24]*Det2_34_12;
1456 + m[
A24]*Det2_34_13;
1458 + m[
A24]*Det2_34_23;
1462 G4double Det4_0123_0123 = m[
A00]*Det3_123_123 - m[
A01]*Det3_123_023
1463 + m[
A02]*Det3_123_013 - m[
A03]*Det3_123_012;
1464 G4double Det4_0124_0123 = m[
A00]*Det3_124_123 - m[
A01]*Det3_124_023
1465 + m[
A02]*Det3_124_013 - m[
A03]*Det3_124_012;
1466 G4double Det4_0124_0124 = m[
A00]*Det3_124_124 - m[
A01]*Det3_124_024
1467 + m[
A02]*Det3_124_014 - m[
A04]*Det3_124_012;
1468 G4double Det4_0134_0123 = m[
A00]*Det3_134_123 - m[
A01]*Det3_134_023
1469 + m[
A02]*Det3_134_013 - m[
A03]*Det3_134_012;
1470 G4double Det4_0134_0124 = m[
A00]*Det3_134_124 - m[
A01]*Det3_134_024
1471 + m[
A02]*Det3_134_014 - m[
A04]*Det3_134_012;
1472 G4double Det4_0134_0134 = m[
A00]*Det3_134_134 - m[
A01]*Det3_134_034
1473 + m[
A03]*Det3_134_014 - m[
A04]*Det3_134_013;
1474 G4double Det4_0234_0123 = m[
A00]*Det3_234_123 - m[
A01]*Det3_234_023
1475 + m[
A02]*Det3_234_013 - m[
A03]*Det3_234_012;
1476 G4double Det4_0234_0124 = m[
A00]*Det3_234_124 - m[
A01]*Det3_234_024
1477 + m[
A02]*Det3_234_014 - m[
A04]*Det3_234_012;
1478 G4double Det4_0234_0134 = m[
A00]*Det3_234_134 - m[
A01]*Det3_234_034
1479 + m[
A03]*Det3_234_014 - m[
A04]*Det3_234_013;
1480 G4double Det4_0234_0234 = m[
A00]*Det3_234_234 - m[
A02]*Det3_234_034
1481 + m[
A03]*Det3_234_024 - m[
A04]*Det3_234_023;
1482 G4double Det4_1234_0123 = m[
A10]*Det3_234_123 - m[
A11]*Det3_234_023
1483 + m[
A12]*Det3_234_013 - m[
A13]*Det3_234_012;
1484 G4double Det4_1234_0124 = m[
A10]*Det3_234_124 - m[
A11]*Det3_234_024
1485 + m[
A12]*Det3_234_014 - m[
A14]*Det3_234_012;
1486 G4double Det4_1234_0134 = m[
A10]*Det3_234_134 - m[
A11]*Det3_234_034
1487 + m[
A13]*Det3_234_014 - m[
A14]*Det3_234_013;
1488 G4double Det4_1234_0234 = m[
A10]*Det3_234_234 - m[
A12]*Det3_234_034
1489 + m[
A13]*Det3_234_024 - m[
A14]*Det3_234_023;
1490 G4double Det4_1234_1234 = m[
A11]*Det3_234_234 - m[
A12]*Det3_234_134
1491 + m[
A13]*Det3_234_124 - m[
A14]*Det3_234_123;
1496 - m[
A01]*Det4_1234_0234
1497 + m[
A02]*Det4_1234_0134
1498 - m[
A03]*Det4_1234_0124
1499 + m[
A04]*Det4_1234_0123;
1508 G4double mn1OverDet = - oneOverDet;
1510 m[
A00] = Det4_1234_1234 * oneOverDet;
1511 m[
A01] = Det4_1234_0234 * mn1OverDet;
1512 m[
A02] = Det4_1234_0134 * oneOverDet;
1513 m[
A03] = Det4_1234_0124 * mn1OverDet;
1514 m[
A04] = Det4_1234_0123 * oneOverDet;
1516 m[
A11] = Det4_0234_0234 * oneOverDet;
1517 m[
A12] = Det4_0234_0134 * mn1OverDet;
1518 m[
A13] = Det4_0234_0124 * oneOverDet;
1519 m[
A14] = Det4_0234_0123 * mn1OverDet;
1521 m[
A22] = Det4_0134_0134 * oneOverDet;
1522 m[
A23] = Det4_0134_0124 * mn1OverDet;
1523 m[
A24] = Det4_0134_0123 * oneOverDet;
1525 m[
A33] = Det4_0124_0124 * oneOverDet;
1526 m[
A34] = Det4_0124_0123 * mn1OverDet;
1528 m[
A44] = Det4_0123_0123 * oneOverDet;
1582 + m[
A22]*Det2_34_01;
1584 + m[
A23]*Det2_34_01;
1586 + m[
A24]*Det2_34_01;
1588 + m[
A23]*Det2_34_02;
1590 + m[
A24]*Det2_34_02;
1592 + m[
A24]*Det2_34_03;
1594 + m[
A23]*Det2_34_12;
1596 + m[
A24]*Det2_34_12;
1598 + m[
A24]*Det2_34_13;
1600 + m[
A24]*Det2_34_23;
1602 + m[
A22]*Det2_35_01;
1604 + m[
A23]*Det2_35_01;
1606 + m[
A24]*Det2_35_01;
1608 + m[
A25]*Det2_35_01;
1610 + m[
A23]*Det2_35_02;
1612 + m[
A24]*Det2_35_02;
1614 + m[
A25]*Det2_35_02;
1616 + m[
A24]*Det2_35_03;
1618 + m[
A25]*Det2_35_03;
1620 + m[
A23]*Det2_35_12;
1622 + m[
A24]*Det2_35_12;
1624 + m[
A25]*Det2_35_12;
1626 + m[
A24]*Det2_35_13;
1628 + m[
A25]*Det2_35_13;
1630 + m[
A24]*Det2_35_23;
1632 + m[
A25]*Det2_35_23;
1634 + m[
A22]*Det2_45_01;
1636 + m[
A23]*Det2_45_01;
1638 + m[
A24]*Det2_45_01;
1640 + m[
A25]*Det2_45_01;
1642 + m[
A23]*Det2_45_02;
1644 + m[
A24]*Det2_45_02;
1646 + m[
A25]*Det2_45_02;
1648 + m[
A24]*Det2_45_03;
1650 + m[
A25]*Det2_45_03;
1652 + m[
A25]*Det2_45_04;
1654 + m[
A23]*Det2_45_12;
1656 + m[
A24]*Det2_45_12;
1658 + m[
A25]*Det2_45_12;
1660 + m[
A24]*Det2_45_13;
1662 + m[
A25]*Det2_45_13;
1664 + m[
A25]*Det2_45_14;
1666 + m[
A24]*Det2_45_23;
1668 + m[
A25]*Det2_45_23;
1670 + m[
A25]*Det2_45_24;
1672 + m[
A32]*Det2_45_01;
1674 + m[
A33]*Det2_45_01;
1676 + m[
A34]*Det2_45_01;
1678 + m[
A35]*Det2_45_01;
1680 + m[
A33]*Det2_45_02;
1682 + m[
A34]*Det2_45_02;
1684 + m[
A35]*Det2_45_02;
1686 + m[
A34]*Det2_45_03;
1688 + m[
A35]*Det2_45_03;
1690 + m[
A35]*Det2_45_04;
1692 + m[
A33]*Det2_45_12;
1694 + m[
A34]*Det2_45_12;
1696 + m[
A35]*Det2_45_12;
1698 + m[
A34]*Det2_45_13;
1700 + m[
A35]*Det2_45_13;
1702 + m[
A35]*Det2_45_14;
1704 + m[
A34]*Det2_45_23;
1706 + m[
A35]*Det2_45_23;
1708 + m[
A35]*Det2_45_24;
1710 + m[
A35]*Det2_45_34;
1714 G4double Det4_1234_0123 = m[
A10]*Det3_234_123 - m[
A11]*Det3_234_023
1715 + m[
A12]*Det3_234_013 - m[
A13]*Det3_234_012;
1716 G4double Det4_1234_0124 = m[
A10]*Det3_234_124 - m[
A11]*Det3_234_024
1717 + m[
A12]*Det3_234_014 - m[
A14]*Det3_234_012;
1718 G4double Det4_1234_0134 = m[
A10]*Det3_234_134 - m[
A11]*Det3_234_034
1719 + m[
A13]*Det3_234_014 - m[
A14]*Det3_234_013;
1720 G4double Det4_1234_0234 = m[
A10]*Det3_234_234 - m[
A12]*Det3_234_034
1721 + m[
A13]*Det3_234_024 - m[
A14]*Det3_234_023;
1722 G4double Det4_1234_1234 = m[
A11]*Det3_234_234 - m[
A12]*Det3_234_134
1723 + m[
A13]*Det3_234_124 - m[
A14]*Det3_234_123;
1724 G4double Det4_1235_0123 = m[
A10]*Det3_235_123 - m[
A11]*Det3_235_023
1725 + m[
A12]*Det3_235_013 - m[
A13]*Det3_235_012;
1726 G4double Det4_1235_0124 = m[
A10]*Det3_235_124 - m[
A11]*Det3_235_024
1727 + m[
A12]*Det3_235_014 - m[
A14]*Det3_235_012;
1728 G4double Det4_1235_0125 = m[
A10]*Det3_235_125 - m[
A11]*Det3_235_025
1729 + m[
A12]*Det3_235_015 - m[
A15]*Det3_235_012;
1730 G4double Det4_1235_0134 = m[
A10]*Det3_235_134 - m[
A11]*Det3_235_034
1731 + m[
A13]*Det3_235_014 - m[
A14]*Det3_235_013;
1732 G4double Det4_1235_0135 = m[
A10]*Det3_235_135 - m[
A11]*Det3_235_035
1733 + m[
A13]*Det3_235_015 - m[
A15]*Det3_235_013;
1734 G4double Det4_1235_0234 = m[
A10]*Det3_235_234 - m[
A12]*Det3_235_034
1735 + m[
A13]*Det3_235_024 - m[
A14]*Det3_235_023;
1736 G4double Det4_1235_0235 = m[
A10]*Det3_235_235 - m[
A12]*Det3_235_035
1737 + m[
A13]*Det3_235_025 - m[
A15]*Det3_235_023;
1738 G4double Det4_1235_1234 = m[
A11]*Det3_235_234 - m[
A12]*Det3_235_134
1739 + m[
A13]*Det3_235_124 - m[
A14]*Det3_235_123;
1740 G4double Det4_1235_1235 = m[
A11]*Det3_235_235 - m[
A12]*Det3_235_135
1741 + m[
A13]*Det3_235_125 - m[
A15]*Det3_235_123;
1742 G4double Det4_1245_0123 = m[
A10]*Det3_245_123 - m[
A11]*Det3_245_023
1743 + m[
A12]*Det3_245_013 - m[
A13]*Det3_245_012;
1744 G4double Det4_1245_0124 = m[
A10]*Det3_245_124 - m[
A11]*Det3_245_024
1745 + m[
A12]*Det3_245_014 - m[
A14]*Det3_245_012;
1746 G4double Det4_1245_0125 = m[
A10]*Det3_245_125 - m[
A11]*Det3_245_025
1747 + m[
A12]*Det3_245_015 - m[
A15]*Det3_245_012;
1748 G4double Det4_1245_0134 = m[
A10]*Det3_245_134 - m[
A11]*Det3_245_034
1749 + m[
A13]*Det3_245_014 - m[
A14]*Det3_245_013;
1750 G4double Det4_1245_0135 = m[
A10]*Det3_245_135 - m[
A11]*Det3_245_035
1751 + m[
A13]*Det3_245_015 - m[
A15]*Det3_245_013;
1752 G4double Det4_1245_0145 = m[
A10]*Det3_245_145 - m[
A11]*Det3_245_045
1753 + m[
A14]*Det3_245_015 - m[
A15]*Det3_245_014;
1754 G4double Det4_1245_0234 = m[
A10]*Det3_245_234 - m[
A12]*Det3_245_034
1755 + m[
A13]*Det3_245_024 - m[
A14]*Det3_245_023;
1756 G4double Det4_1245_0235 = m[
A10]*Det3_245_235 - m[
A12]*Det3_245_035
1757 + m[
A13]*Det3_245_025 - m[
A15]*Det3_245_023;
1758 G4double Det4_1245_0245 = m[
A10]*Det3_245_245 - m[
A12]*Det3_245_045
1759 + m[
A14]*Det3_245_025 - m[
A15]*Det3_245_024;
1760 G4double Det4_1245_1234 = m[
A11]*Det3_245_234 - m[
A12]*Det3_245_134
1761 + m[
A13]*Det3_245_124 - m[
A14]*Det3_245_123;
1762 G4double Det4_1245_1235 = m[
A11]*Det3_245_235 - m[
A12]*Det3_245_135
1763 + m[
A13]*Det3_245_125 - m[
A15]*Det3_245_123;
1764 G4double Det4_1245_1245 = m[
A11]*Det3_245_245 - m[
A12]*Det3_245_145
1765 + m[
A14]*Det3_245_125 - m[
A15]*Det3_245_124;
1766 G4double Det4_1345_0123 = m[
A10]*Det3_345_123 - m[
A11]*Det3_345_023
1767 + m[
A12]*Det3_345_013 - m[
A13]*Det3_345_012;
1768 G4double Det4_1345_0124 = m[
A10]*Det3_345_124 - m[
A11]*Det3_345_024
1769 + m[
A12]*Det3_345_014 - m[
A14]*Det3_345_012;
1770 G4double Det4_1345_0125 = m[
A10]*Det3_345_125 - m[
A11]*Det3_345_025
1771 + m[
A12]*Det3_345_015 - m[
A15]*Det3_345_012;
1772 G4double Det4_1345_0134 = m[
A10]*Det3_345_134 - m[
A11]*Det3_345_034
1773 + m[
A13]*Det3_345_014 - m[
A14]*Det3_345_013;
1774 G4double Det4_1345_0135 = m[
A10]*Det3_345_135 - m[
A11]*Det3_345_035
1775 + m[
A13]*Det3_345_015 - m[
A15]*Det3_345_013;
1776 G4double Det4_1345_0145 = m[
A10]*Det3_345_145 - m[
A11]*Det3_345_045
1777 + m[
A14]*Det3_345_015 - m[
A15]*Det3_345_014;
1778 G4double Det4_1345_0234 = m[
A10]*Det3_345_234 - m[
A12]*Det3_345_034
1779 + m[
A13]*Det3_345_024 - m[
A14]*Det3_345_023;
1780 G4double Det4_1345_0235 = m[
A10]*Det3_345_235 - m[
A12]*Det3_345_035
1781 + m[
A13]*Det3_345_025 - m[
A15]*Det3_345_023;
1782 G4double Det4_1345_0245 = m[
A10]*Det3_345_245 - m[
A12]*Det3_345_045
1783 + m[
A14]*Det3_345_025 - m[
A15]*Det3_345_024;
1784 G4double Det4_1345_0345 = m[
A10]*Det3_345_345 - m[
A13]*Det3_345_045
1785 + m[
A14]*Det3_345_035 - m[
A15]*Det3_345_034;
1786 G4double Det4_1345_1234 = m[
A11]*Det3_345_234 - m[
A12]*Det3_345_134
1787 + m[
A13]*Det3_345_124 - m[
A14]*Det3_345_123;
1788 G4double Det4_1345_1235 = m[
A11]*Det3_345_235 - m[
A12]*Det3_345_135
1789 + m[
A13]*Det3_345_125 - m[
A15]*Det3_345_123;
1790 G4double Det4_1345_1245 = m[
A11]*Det3_345_245 - m[
A12]*Det3_345_145
1791 + m[
A14]*Det3_345_125 - m[
A15]*Det3_345_124;
1792 G4double Det4_1345_1345 = m[
A11]*Det3_345_345 - m[
A13]*Det3_345_145
1793 + m[
A14]*Det3_345_135 - m[
A15]*Det3_345_134;
1794 G4double Det4_2345_0123 = m[
A20]*Det3_345_123 - m[
A21]*Det3_345_023
1795 + m[
A22]*Det3_345_013 - m[
A23]*Det3_345_012;
1796 G4double Det4_2345_0124 = m[
A20]*Det3_345_124 - m[
A21]*Det3_345_024
1797 + m[
A22]*Det3_345_014 - m[
A24]*Det3_345_012;
1798 G4double Det4_2345_0125 = m[
A20]*Det3_345_125 - m[
A21]*Det3_345_025
1799 + m[
A22]*Det3_345_015 - m[
A25]*Det3_345_012;
1800 G4double Det4_2345_0134 = m[
A20]*Det3_345_134 - m[
A21]*Det3_345_034
1801 + m[
A23]*Det3_345_014 - m[
A24]*Det3_345_013;
1802 G4double Det4_2345_0135 = m[
A20]*Det3_345_135 - m[
A21]*Det3_345_035
1803 + m[
A23]*Det3_345_015 - m[
A25]*Det3_345_013;
1804 G4double Det4_2345_0145 = m[
A20]*Det3_345_145 - m[
A21]*Det3_345_045
1805 + m[
A24]*Det3_345_015 - m[
A25]*Det3_345_014;
1806 G4double Det4_2345_0234 = m[
A20]*Det3_345_234 - m[
A22]*Det3_345_034
1807 + m[
A23]*Det3_345_024 - m[
A24]*Det3_345_023;
1808 G4double Det4_2345_0235 = m[
A20]*Det3_345_235 - m[
A22]*Det3_345_035
1809 + m[
A23]*Det3_345_025 - m[
A25]*Det3_345_023;
1810 G4double Det4_2345_0245 = m[
A20]*Det3_345_245 - m[
A22]*Det3_345_045
1811 + m[
A24]*Det3_345_025 - m[
A25]*Det3_345_024;
1812 G4double Det4_2345_0345 = m[
A20]*Det3_345_345 - m[
A23]*Det3_345_045
1813 + m[
A24]*Det3_345_035 - m[
A25]*Det3_345_034;
1814 G4double Det4_2345_1234 = m[
A21]*Det3_345_234 - m[
A22]*Det3_345_134
1815 + m[
A23]*Det3_345_124 - m[
A24]*Det3_345_123;
1816 G4double Det4_2345_1235 = m[
A21]*Det3_345_235 - m[
A22]*Det3_345_135
1817 + m[
A23]*Det3_345_125 - m[
A25]*Det3_345_123;
1818 G4double Det4_2345_1245 = m[
A21]*Det3_345_245 - m[
A22]*Det3_345_145
1819 + m[
A24]*Det3_345_125 - m[
A25]*Det3_345_124;
1820 G4double Det4_2345_1345 = m[
A21]*Det3_345_345 - m[
A23]*Det3_345_145
1821 + m[
A24]*Det3_345_135 - m[
A25]*Det3_345_134;
1822 G4double Det4_2345_2345 = m[
A22]*Det3_345_345 - m[
A23]*Det3_345_245
1823 + m[
A24]*Det3_345_235 - m[
A25]*Det3_345_234;
1827 G4double Det5_01234_01234 = m[
A00]*Det4_1234_1234 - m[
A01]*Det4_1234_0234
1828 + m[
A02]*Det4_1234_0134 - m[
A03]*Det4_1234_0124 + m[
A04]*Det4_1234_0123;
1829 G4double Det5_01235_01234 = m[
A00]*Det4_1235_1234 - m[
A01]*Det4_1235_0234
1830 + m[
A02]*Det4_1235_0134 - m[
A03]*Det4_1235_0124 + m[
A04]*Det4_1235_0123;
1831 G4double Det5_01235_01235 = m[
A00]*Det4_1235_1235 - m[
A01]*Det4_1235_0235
1832 + m[
A02]*Det4_1235_0135 - m[
A03]*Det4_1235_0125 + m[
A05]*Det4_1235_0123;
1833 G4double Det5_01245_01234 = m[
A00]*Det4_1245_1234 - m[
A01]*Det4_1245_0234
1834 + m[
A02]*Det4_1245_0134 - m[
A03]*Det4_1245_0124 + m[
A04]*Det4_1245_0123;
1835 G4double Det5_01245_01235 = m[
A00]*Det4_1245_1235 - m[
A01]*Det4_1245_0235
1836 + m[
A02]*Det4_1245_0135 - m[
A03]*Det4_1245_0125 + m[
A05]*Det4_1245_0123;
1837 G4double Det5_01245_01245 = m[
A00]*Det4_1245_1245 - m[
A01]*Det4_1245_0245
1838 + m[
A02]*Det4_1245_0145 - m[
A04]*Det4_1245_0125 + m[
A05]*Det4_1245_0124;
1839 G4double Det5_01345_01234 = m[
A00]*Det4_1345_1234 - m[
A01]*Det4_1345_0234
1840 + m[
A02]*Det4_1345_0134 - m[
A03]*Det4_1345_0124 + m[
A04]*Det4_1345_0123;
1841 G4double Det5_01345_01235 = m[
A00]*Det4_1345_1235 - m[
A01]*Det4_1345_0235
1842 + m[
A02]*Det4_1345_0135 - m[
A03]*Det4_1345_0125 + m[
A05]*Det4_1345_0123;
1843 G4double Det5_01345_01245 = m[
A00]*Det4_1345_1245 - m[
A01]*Det4_1345_0245
1844 + m[
A02]*Det4_1345_0145 - m[
A04]*Det4_1345_0125 + m[
A05]*Det4_1345_0124;
1845 G4double Det5_01345_01345 = m[
A00]*Det4_1345_1345 - m[
A01]*Det4_1345_0345
1846 + m[
A03]*Det4_1345_0145 - m[
A04]*Det4_1345_0135 + m[
A05]*Det4_1345_0134;
1847 G4double Det5_02345_01234 = m[
A00]*Det4_2345_1234 - m[
A01]*Det4_2345_0234
1848 + m[
A02]*Det4_2345_0134 - m[
A03]*Det4_2345_0124 + m[
A04]*Det4_2345_0123;
1849 G4double Det5_02345_01235 = m[
A00]*Det4_2345_1235 - m[
A01]*Det4_2345_0235
1850 + m[
A02]*Det4_2345_0135 - m[
A03]*Det4_2345_0125 + m[
A05]*Det4_2345_0123;
1851 G4double Det5_02345_01245 = m[
A00]*Det4_2345_1245 - m[
A01]*Det4_2345_0245
1852 + m[
A02]*Det4_2345_0145 - m[
A04]*Det4_2345_0125 + m[
A05]*Det4_2345_0124;
1853 G4double Det5_02345_01345 = m[
A00]*Det4_2345_1345 - m[
A01]*Det4_2345_0345
1854 + m[
A03]*Det4_2345_0145 - m[
A04]*Det4_2345_0135 + m[
A05]*Det4_2345_0134;
1855 G4double Det5_02345_02345 = m[
A00]*Det4_2345_2345 - m[
A02]*Det4_2345_0345
1856 + m[
A03]*Det4_2345_0245 - m[
A04]*Det4_2345_0235 + m[
A05]*Det4_2345_0234;
1857 G4double Det5_12345_01234 = m[
A10]*Det4_2345_1234 - m[
A11]*Det4_2345_0234
1858 + m[
A12]*Det4_2345_0134 - m[
A13]*Det4_2345_0124 + m[
A14]*Det4_2345_0123;
1859 G4double Det5_12345_01235 = m[
A10]*Det4_2345_1235 - m[
A11]*Det4_2345_0235
1860 + m[
A12]*Det4_2345_0135 - m[
A13]*Det4_2345_0125 + m[
A15]*Det4_2345_0123;
1861 G4double Det5_12345_01245 = m[
A10]*Det4_2345_1245 - m[
A11]*Det4_2345_0245
1862 + m[
A12]*Det4_2345_0145 - m[
A14]*Det4_2345_0125 + m[
A15]*Det4_2345_0124;
1863 G4double Det5_12345_01345 = m[
A10]*Det4_2345_1345 - m[
A11]*Det4_2345_0345
1864 + m[
A13]*Det4_2345_0145 - m[
A14]*Det4_2345_0135 + m[
A15]*Det4_2345_0134;
1865 G4double Det5_12345_02345 = m[
A10]*Det4_2345_2345 - m[
A12]*Det4_2345_0345
1866 + m[
A13]*Det4_2345_0245 - m[
A14]*Det4_2345_0235 + m[
A15]*Det4_2345_0234;
1867 G4double Det5_12345_12345 = m[
A11]*Det4_2345_2345 - m[
A12]*Det4_2345_1345
1868 + m[
A13]*Det4_2345_1245 - m[
A14]*Det4_2345_1235 + m[
A15]*Det4_2345_1234;
1873 - m[
A01]*Det5_12345_02345
1874 + m[
A02]*Det5_12345_01345
1875 - m[
A03]*Det5_12345_01245
1876 + m[
A04]*Det5_12345_01235
1877 - m[
A05]*Det5_12345_01234;
1886 G4double mn1OverDet = - oneOverDet;
1888 m[
A00] = Det5_12345_12345*oneOverDet;
1889 m[
A01] = Det5_12345_02345*mn1OverDet;
1890 m[
A02] = Det5_12345_01345*oneOverDet;
1891 m[
A03] = Det5_12345_01245*mn1OverDet;
1892 m[
A04] = Det5_12345_01235*oneOverDet;
1893 m[
A05] = Det5_12345_01234*mn1OverDet;
1895 m[
A11] = Det5_02345_02345*oneOverDet;
1896 m[
A12] = Det5_02345_01345*mn1OverDet;
1897 m[
A13] = Det5_02345_01245*oneOverDet;
1898 m[
A14] = Det5_02345_01235*mn1OverDet;
1899 m[
A15] = Det5_02345_01234*oneOverDet;
1901 m[
A22] = Det5_01345_01345*oneOverDet;
1902 m[
A23] = Det5_01345_01245*mn1OverDet;
1903 m[
A24] = Det5_01345_01235*oneOverDet;
1904 m[
A25] = Det5_01345_01234*mn1OverDet;
1906 m[
A33] = Det5_01245_01245*oneOverDet;
1907 m[
A34] = Det5_01245_01235*mn1OverDet;
1908 m[
A35] = Det5_01245_01234*oneOverDet;
1910 m[
A44] = Det5_01235_01235*oneOverDet;
1911 m[
A45] = Det5_01235_01234*mn1OverDet;
1913 m[
A55] = Det5_01234_01234*oneOverDet;
1952 if (h00 <= 0) {
return; }
1953 h00 = 1.0 / std::sqrt(h00);
1962 h11 =
m[
A11] - (g10 * g10);
1963 if (h11 <= 0) {
return; }
1964 h11 = 1.0 / std::sqrt(h11);
1969 g21 = (
m[
A21] - (g10 * g20)) * h11;
1970 g31 = (
m[
A31] - (g10 * g30)) * h11;
1971 g41 = (
m[
A41] - (g10 * g40)) * h11;
1975 h22 =
m[
A22] - (g20 * g20) - (g21 * g21);
1976 if (h22 <= 0) {
return; }
1977 h22 = 1.0 / std::sqrt(h22);
1982 g32 = (
m[
A32] - (g20 * g30) - (g21 * g31)) * h22;
1983 g42 = (
m[
A42] - (g20 * g40) - (g21 * g41)) * h22;
1987 h33 =
m[
A33] - (g30 * g30) - (g31 * g31) - (g32 * g32);
1988 if (h33 <= 0) {
return; }
1989 h33 = 1.0 / std::sqrt(h33);
1993 g43 = (
m[
A43] - (g30 * g40) - (g31 * g41) - (g32 * g42)) * h33;
1997 h44 =
m[
A44] - (g40 * g40) - (g41 * g41) - (g42 * g42) - (g43 * g43);
1998 if (h44 <= 0) {
return; }
1999 h44 = 1.0 / std::sqrt(h44);
2006 h43 = -h33 * g43 * h44;
2007 h32 = -h22 * g32 * h33;
2008 h42 = -h22 * (g32 * h43 + g42 * h44);
2009 h21 = -h11 * g21 * h22;
2010 h31 = -h11 * (g21 * h32 + g31 * h33);
2011 h41 = -h11 * (g21 * h42 + g31 * h43 + g41 * h44);
2012 h10 = -h00 * g10 * h11;
2013 h20 = -h00 * (g10 * h21 + g20 * h22);
2014 h30 = -h00 * (g10 * h31 + g20 * h32 + g30 * h33);
2015 h40 = -h00 * (g10 * h41 + g20 * h42 + g30 * h43 + g40 * h44);
2020 m[
A00] = h00 * h00 + h10 * h10 + h20 * h20 + h30 * h30 + h40 * h40;
2021 m[
A01] = h10 * h11 + h20 * h21 + h30 * h31 + h40 * h41;
2022 m[
A11] = h11 * h11 + h21 * h21 + h31 * h31 + h41 * h41;
2023 m[
A02] = h20 * h22 + h30 * h32 + h40 * h42;
2024 m[
A12] = h21 * h22 + h31 * h32 + h41 * h42;
2025 m[
A22] = h22 * h22 + h32 * h32 + h42 * h42;
2026 m[
A03] = h30 * h33 + h40 * h43;
2027 m[
A13] = h31 * h33 + h41 * h43;
2028 m[
A23] = h32 * h33 + h42 * h43;
2029 m[
A33] = h33 * h33 + h43 * h43;
2058 G4double h00, h11, h22, h33, h44, h55;
2075 if (h00 <= 0) {
return; }
2076 h00 = 1.0 / std::sqrt(h00);
2086 h11 =
m[
A11] - (g10 * g10);
2087 if (h11 <= 0) {
return; }
2088 h11 = 1.0 / std::sqrt(h11);
2093 g21 = (
m[
A21] - (g10 * g20)) * h11;
2094 g31 = (
m[
A31] - (g10 * g30)) * h11;
2095 g41 = (
m[
A41] - (g10 * g40)) * h11;
2096 g51 = (
m[
A51] - (g10 * g50)) * h11;
2100 h22 =
m[
A22] - (g20 * g20) - (g21 * g21);
2101 if (h22 <= 0) {
return; }
2102 h22 = 1.0 / std::sqrt(h22);
2107 g32 = (
m[
A32] - (g20 * g30) - (g21 * g31)) * h22;
2108 g42 = (
m[
A42] - (g20 * g40) - (g21 * g41)) * h22;
2109 g52 = (
m[
A52] - (g20 * g50) - (g21 * g51)) * h22;
2113 h33 =
m[
A33] - (g30 * g30) - (g31 * g31) - (g32 * g32);
2114 if (h33 <= 0) {
return; }
2115 h33 = 1.0 / std::sqrt(h33);
2120 g43 = (
m[
A43] - (g30 * g40) - (g31 * g41) - (g32 * g42)) * h33;
2121 g53 = (
m[
A53] - (g30 * g50) - (g31 * g51) - (g32 * g52)) * h33;
2125 h44 =
m[
A44] - (g40 * g40) - (g41 * g41) - (g42 * g42) - (g43 * g43);
2126 if (h44 <= 0) {
return; }
2127 h44 = 1.0 / std::sqrt(h44);
2131 g54 = (
m[
A54] - (g40 * g50) - (g41 * g51) - (g42 * g52) - (g43 * g53)) * h44;
2135 h55 =
m[
A55] - (g50*g50) - (g51*g51) - (g52*g52) - (g53*g53) - (g54*g54);
2136 if (h55 <= 0) {
return; }
2137 h55 = 1.0 / std::sqrt(h55);
2144 h54 = -h44 * g54 * h55;
2145 h43 = -h33 * g43 * h44;
2146 h53 = -h33 * (g43 * h54 + g53 * h55);
2147 h32 = -h22 * g32 * h33;
2148 h42 = -h22 * (g32 * h43 + g42 * h44);
2149 h52 = -h22 * (g32 * h53 + g42 * h54 + g52 * h55);
2150 h21 = -h11 * g21 * h22;
2151 h31 = -h11 * (g21 * h32 + g31 * h33);
2152 h41 = -h11 * (g21 * h42 + g31 * h43 + g41 * h44);
2153 h51 = -h11 * (g21 * h52 + g31 * h53 + g41 * h54 + g51 * h55);
2154 h10 = -h00 * g10 * h11;
2155 h20 = -h00 * (g10 * h21 + g20 * h22);
2156 h30 = -h00 * (g10 * h31 + g20 * h32 + g30 * h33);
2157 h40 = -h00 * (g10 * h41 + g20 * h42 + g30 * h43 + g40 * h44);
2158 h50 = -h00 * (g10 * h51 + g20 * h52 + g30 * h53 + g40 * h54 + g50 * h55);
2163 m[
A00] = h00 * h00 + h10 * h10 + h20 * h20 + h30 * h30 + h40 * h40 + h50*h50;
2164 m[
A01] = h10 * h11 + h20 * h21 + h30 * h31 + h40 * h41 + h50 * h51;
2165 m[
A11] = h11 * h11 + h21 * h21 + h31 * h31 + h41 * h41 + h51 * h51;
2166 m[
A02] = h20 * h22 + h30 * h32 + h40 * h42 + h50 * h52;
2167 m[
A12] = h21 * h22 + h31 * h32 + h41 * h42 + h51 * h52;
2168 m[
A22] = h22 * h22 + h32 * h32 + h42 * h42 + h52 * h52;
2169 m[
A03] = h30 * h33 + h40 * h43 + h50 * h53;
2170 m[
A13] = h31 * h33 + h41 * h43 + h51 * h53;
2171 m[
A23] = h32 * h33 + h42 * h43 + h52 * h53;
2172 m[
A33] = h33 * h33 + h43 * h43 + h53 * h53;
2173 m[
A04] = h40 * h44 + h50 * h54;
2174 m[
A14] = h41 * h44 + h51 * h54;
2175 m[
A24] = h42 * h44 + h52 * h54;
2176 m[
A34] = h43 * h44 + h53 * h54;
2177 m[
A44] = h44 * h44 + h54 * h54;
2213 + m[
A02]*Det2_12_01;
2215 + m[
A02]*Det2_13_01;
2217 + m[
A03]*Det2_13_01;
2219 + m[
A02]*Det2_23_01;
2221 + m[
A03]*Det2_23_01;
2223 + m[
A03]*Det2_23_02;
2225 + m[
A12]*Det2_23_01;
2227 + m[
A13]*Det2_23_01;
2229 + m[
A13]*Det2_23_02;
2231 + m[
A13]*Det2_23_12;
2236 - m[
A01]*Det3_123_023
2237 + m[
A02]*Det3_123_013
2238 - m[
A03]*Det3_123_012;
2247 G4double mn1OverDet = - oneOverDet;
2249 m[
A00] = Det3_123_123 * oneOverDet;
2250 m[
A01] = Det3_123_023 * mn1OverDet;
2251 m[
A02] = Det3_123_013 * oneOverDet;
2252 m[
A03] = Det3_123_012 * mn1OverDet;
2255 m[
A11] = Det3_023_023 * oneOverDet;
2256 m[
A12] = Det3_023_013 * mn1OverDet;
2257 m[
A13] = Det3_023_012 * oneOverDet;
2259 m[
A22] = Det3_013_013 * oneOverDet;
2260 m[
A23] = Det3_013_012 * mn1OverDet;
2262 m[
A33] = Det3_012_012 * oneOverDet;
static G4ThreadLocal G4double adjustment6x6
static G4ThreadLocal G4double posDefFraction6x6
virtual G4int num_row() const
G4ErrorSymMatrix operator/(const G4ErrorSymMatrix &mat1, G4double t)
G4ErrorSymMatrix similarity(const G4ErrorMatrix &m1) const
void invert5(G4int &ifail)
virtual G4int num_col() const
G4ErrorSymMatrix apply(G4double(*f)(G4double, G4int, G4int)) const
G4ErrorSymMatrix & operator=(const G4ErrorSymMatrix &m2)
static const G4double CHOLESKY_THRESHOLD_5x5
G4ErrorSymMatrix sub(G4int min_row, G4int max_row) const
void invertHaywood6(G4int &ifail)
void invertBunchKaufman(G4int &ifail)
void invertHaywood5(G4int &ifail)
G4ErrorSymMatrix & operator-=(const G4ErrorSymMatrix &m2)
static const G4double CHOLESKY_THRESHOLD_6x6
G4ErrorSymMatrix dsum(const G4ErrorSymMatrix &mat1, const G4ErrorSymMatrix &mat2)
G4ErrorMatrix & operator=(const G4ErrorMatrix &m2)
void invert(G4int &ifail)
G4ErrorMatrix operator-(const G4ErrorMatrix &mat1, const G4ErrorSymMatrix &mat2)
std::vector< G4double >::const_iterator G4ErrorMatrixConstIter
G4ErrorMatrix operator+(const G4ErrorMatrix &mat1, const G4ErrorSymMatrix &mat2)
G4ErrorSymMatrix operator*(const G4ErrorSymMatrix &mat1, G4double t)
void invertCholesky6(G4int &ifail)
std::vector< G4double > m
static const G4double CHOLESKY_CREEP_6x6
G4ErrorSymMatrix & operator/=(G4double t)
#define CHK_DIM_1(c1, r2, fun)
G4ErrorSymMatrix operator-() const
std::vector< G4double > m
G4int dfact_matrix(G4double &det, G4int *ir)
G4ErrorSymMatrix & operator+=(const G4ErrorSymMatrix &m2)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static void error(const char *s)
void invert4(G4int &ifail)
std::vector< G4double >::iterator G4ErrorMatrixIter
void invertHaywood4(G4int &ifail)
#define CHK_DIM_2(r1, r2, c1, c2, fun)
static const G4double CHOLESKY_CREEP_5x5
static G4ThreadLocal G4double posDefFraction5x5
std::ostream & operator<<(std::ostream &os, const G4ErrorSymMatrix &q)
virtual ~G4ErrorSymMatrix()
G4ErrorMatrix & operator+=(const G4ErrorMatrix &m2)
G4ErrorMatrix & operator-=(const G4ErrorMatrix &m2)
void invert6(G4int &ifail)
static const G4double alpha
G4ErrorSymMatrix similarityT(const G4ErrorMatrix &m1) const
G4ErrorSymMatrix & operator*=(G4double t)
G4double determinant() const
void invertCholesky5(G4int &ifail)
void assign(const G4ErrorMatrix &m2)
static G4ThreadLocal G4double adjustment5x5