42#if !defined(R__SOLARIS) && !defined(R__ACC) && !defined(R__FBSD)
48template<
class Element>
51 if (
m.GetNrows() != 2) {
52 Error(
"Inv2x2",
"matrix should be square 2x2");
56 Element *pM =
m.GetMatrixArray();
58 const Double_t det = pM[0] * pM[3] - pM[1] * pM[1];
64 Error(
"Inv2x2",
"matrix is singular");
70 pM[2] = pM[1] = -pM[1] / det;
78template<
class Element>
81 if (
m.GetNrows() != 3) {
82 Error(
"Inv3x3",
"matrix should be square 3x3");
86 Element *pM =
m.GetMatrixArray();
88 const Double_t c00 = pM[4] * pM[8] - pM[5] * pM[5];
89 const Double_t c01 = pM[5] * pM[2] - pM[1] * pM[8];
90 const Double_t c02 = pM[1] * pM[5] - pM[4] * pM[2];
91 const Double_t c11 = pM[8] * pM[0] - pM[2] * pM[2];
92 const Double_t c12 = pM[2] * pM[1] - pM[5] * pM[0];
93 const Double_t c22 = pM[0] * pM[4] - pM[1] * pM[1];
105 det = c12*c01-c11*c02;
108 det = c11*c22-c12*c12;
110 }
else if (t2 >=
t1) {
112 det = c12*c01-c11*c02;
115 det = c02*c12-c01*c22;
118 if ( det == 0 || tmp == 0) {
119 Error(
"Inv3x3",
"matrix is singular");
164template<
class Element>
167 if (
m.GetNrows() != 4) {
168 Error(
"Inv4x4",
"matrix should be square 4x4");
172 Element *pM =
m.GetMatrixArray();
194 + pM[
SF02]*mDet2_12_01;
196 + pM[
SF02]*mDet2_13_01;
198 + pM[
SF03]*mDet2_13_01;
200 + pM[
SF02]*mDet2_23_01;
202 + pM[
SF03]*mDet2_23_01;
204 + pM[
SF03]*mDet2_23_02;
206 + pM[
SF12]*mDet2_23_01;
208 + pM[
SF13]*mDet2_23_01;
210 + pM[
SF13]*mDet2_23_02;
212 + pM[
SF13]*mDet2_23_12;
217 + pM[
SF02]*mDet3_123_013 - pM[
SF03]*mDet3_123_012;
223 Error(
"Inv4x4",
"matrix is singular");
227 const Double_t oneOverDet = 1.0/det;
228 const Double_t mn1OverDet = - oneOverDet;
230 pM[
SF00] = mDet3_123_123 * oneOverDet;
231 pM[
SF01] = mDet3_123_023 * mn1OverDet;
232 pM[
SF02] = mDet3_123_013 * oneOverDet;
233 pM[
SF03] = mDet3_123_012 * mn1OverDet;
235 pM[
SF11] = mDet3_023_023 * oneOverDet;
236 pM[
SF12] = mDet3_023_013 * mn1OverDet;
237 pM[
SF13] = mDet3_023_012 * oneOverDet;
239 pM[
SF22] = mDet3_013_013 * oneOverDet;
240 pM[
SF23] = mDet3_013_012 * mn1OverDet;
242 pM[
SF33] = mDet3_012_012 * oneOverDet;
244 for (
Int_t irow = 0; irow < 4; irow++) {
245 const Int_t rowOff1 = irow*4;
246 for (
Int_t icol = 0; icol < irow; icol++) {
247 const Int_t rowOff2 = icol*4;
248 pM[rowOff1+icol] = pM[rowOff2+irow];
289template<
class Element>
292 if (
m.GetNrows() != 5) {
293 Error(
"Inv5x5",
"matrix should be square 5x5");
297 Element *pM =
m.GetMatrixArray();
329 const Double_t mDet3_123_012 = pM[
SM10]*mDet2_23_12 - pM[
SM11]*mDet2_23_02 + pM[
SM12]*mDet2_23_01;
330 const Double_t mDet3_123_013 = pM[
SM10]*mDet2_23_13 - pM[
SM11]*mDet2_23_03 + pM[
SM13]*mDet2_23_01;
331 const Double_t mDet3_123_023 = pM[
SM10]*mDet2_23_23 - pM[
SM12]*mDet2_23_03 + pM[
SM13]*mDet2_23_02;
332 const Double_t mDet3_123_123 = pM[
SM11]*mDet2_23_23 - pM[
SM12]*mDet2_23_13 + pM[
SM13]*mDet2_23_12;
333 const Double_t mDet3_124_012 = pM[
SM10]*mDet2_24_12 - pM[
SM11]*mDet2_24_02 + pM[
SM12]*mDet2_24_01;
334 const Double_t mDet3_124_013 = pM[
SM10]*mDet2_24_13 - pM[
SM11]*mDet2_24_03 + pM[
SM13]*mDet2_24_01;
335 const Double_t mDet3_124_014 = pM[
SM10]*mDet2_24_14 - pM[
SM11]*mDet2_24_04 + pM[
SM14]*mDet2_24_01;
336 const Double_t mDet3_124_023 = pM[
SM10]*mDet2_24_23 - pM[
SM12]*mDet2_24_03 + pM[
SM13]*mDet2_24_02;
337 const Double_t mDet3_124_024 = pM[
SM10]*mDet2_24_24 - pM[
SM12]*mDet2_24_04 + pM[
SM14]*mDet2_24_02;
338 const Double_t mDet3_124_123 = pM[
SM11]*mDet2_24_23 - pM[
SM12]*mDet2_24_13 + pM[
SM13]*mDet2_24_12;
339 const Double_t mDet3_124_124 = pM[
SM11]*mDet2_24_24 - pM[
SM12]*mDet2_24_14 + pM[
SM14]*mDet2_24_12;
340 const Double_t mDet3_134_012 = pM[
SM10]*mDet2_34_12 - pM[
SM11]*mDet2_34_02 + pM[
SM12]*mDet2_34_01;
341 const Double_t mDet3_134_013 = pM[
SM10]*mDet2_34_13 - pM[
SM11]*mDet2_34_03 + pM[
SM13]*mDet2_34_01;
342 const Double_t mDet3_134_014 = pM[
SM10]*mDet2_34_14 - pM[
SM11]*mDet2_34_04 + pM[
SM14]*mDet2_34_01;
343 const Double_t mDet3_134_023 = pM[
SM10]*mDet2_34_23 - pM[
SM12]*mDet2_34_03 + pM[
SM13]*mDet2_34_02;
344 const Double_t mDet3_134_024 = pM[
SM10]*mDet2_34_24 - pM[
SM12]*mDet2_34_04 + pM[
SM14]*mDet2_34_02;
345 const Double_t mDet3_134_034 = pM[
SM10]*mDet2_34_34 - pM[
SM13]*mDet2_34_04 + pM[
SM14]*mDet2_34_03;
346 const Double_t mDet3_134_123 = pM[
SM11]*mDet2_34_23 - pM[
SM12]*mDet2_34_13 + pM[
SM13]*mDet2_34_12;
347 const Double_t mDet3_134_124 = pM[
SM11]*mDet2_34_24 - pM[
SM12]*mDet2_34_14 + pM[
SM14]*mDet2_34_12;
348 const Double_t mDet3_134_134 = pM[
SM11]*mDet2_34_34 - pM[
SM13]*mDet2_34_14 + pM[
SM14]*mDet2_34_13;
349 const Double_t mDet3_234_012 = pM[
SM20]*mDet2_34_12 - pM[
SM21]*mDet2_34_02 + pM[
SM22]*mDet2_34_01;
350 const Double_t mDet3_234_013 = pM[
SM20]*mDet2_34_13 - pM[
SM21]*mDet2_34_03 + pM[
SM23]*mDet2_34_01;
351 const Double_t mDet3_234_014 = pM[
SM20]*mDet2_34_14 - pM[
SM21]*mDet2_34_04 + pM[
SM24]*mDet2_34_01;
352 const Double_t mDet3_234_023 = pM[
SM20]*mDet2_34_23 - pM[
SM22]*mDet2_34_03 + pM[
SM23]*mDet2_34_02;
353 const Double_t mDet3_234_024 = pM[
SM20]*mDet2_34_24 - pM[
SM22]*mDet2_34_04 + pM[
SM24]*mDet2_34_02;
354 const Double_t mDet3_234_034 = pM[
SM20]*mDet2_34_34 - pM[
SM23]*mDet2_34_04 + pM[
SM24]*mDet2_34_03;
355 const Double_t mDet3_234_123 = pM[
SM21]*mDet2_34_23 - pM[
SM22]*mDet2_34_13 + pM[
SM23]*mDet2_34_12;
356 const Double_t mDet3_234_124 = pM[
SM21]*mDet2_34_24 - pM[
SM22]*mDet2_34_14 + pM[
SM24]*mDet2_34_12;
357 const Double_t mDet3_234_134 = pM[
SM21]*mDet2_34_34 - pM[
SM23]*mDet2_34_14 + pM[
SM24]*mDet2_34_13;
358 const Double_t mDet3_234_234 = pM[
SM22]*mDet2_34_34 - pM[
SM23]*mDet2_34_24 + pM[
SM24]*mDet2_34_23;
362 const Double_t mDet4_0123_0123 = pM[
SM00]*mDet3_123_123 - pM[
SM01]*mDet3_123_023
363 + pM[
SM02]*mDet3_123_013 - pM[
SM03]*mDet3_123_012;
364 const Double_t mDet4_0124_0123 = pM[
SM00]*mDet3_124_123 - pM[
SM01]*mDet3_124_023
365 + pM[
SM02]*mDet3_124_013 - pM[
SM03]*mDet3_124_012;
366 const Double_t mDet4_0124_0124 = pM[
SM00]*mDet3_124_124 - pM[
SM01]*mDet3_124_024
367 + pM[
SM02]*mDet3_124_014 - pM[
SM04]*mDet3_124_012;
368 const Double_t mDet4_0134_0123 = pM[
SM00]*mDet3_134_123 - pM[
SM01]*mDet3_134_023
369 + pM[
SM02]*mDet3_134_013 - pM[
SM03]*mDet3_134_012;
370 const Double_t mDet4_0134_0124 = pM[
SM00]*mDet3_134_124 - pM[
SM01]*mDet3_134_024
371 + pM[
SM02]*mDet3_134_014 - pM[
SM04]*mDet3_134_012;
372 const Double_t mDet4_0134_0134 = pM[
SM00]*mDet3_134_134 - pM[
SM01]*mDet3_134_034
373 + pM[
SM03]*mDet3_134_014 - pM[
SM04]*mDet3_134_013;
374 const Double_t mDet4_0234_0123 = pM[
SM00]*mDet3_234_123 - pM[
SM01]*mDet3_234_023
375 + pM[
SM02]*mDet3_234_013 - pM[
SM03]*mDet3_234_012;
376 const Double_t mDet4_0234_0124 = pM[
SM00]*mDet3_234_124 - pM[
SM01]*mDet3_234_024
377 + pM[
SM02]*mDet3_234_014 - pM[
SM04]*mDet3_234_012;
378 const Double_t mDet4_0234_0134 = pM[
SM00]*mDet3_234_134 - pM[
SM01]*mDet3_234_034
379 + pM[
SM03]*mDet3_234_014 - pM[
SM04]*mDet3_234_013;
380 const Double_t mDet4_0234_0234 = pM[
SM00]*mDet3_234_234 - pM[
SM02]*mDet3_234_034
381 + pM[
SM03]*mDet3_234_024 - pM[
SM04]*mDet3_234_023;
382 const Double_t mDet4_1234_0123 = pM[
SM10]*mDet3_234_123 - pM[
SM11]*mDet3_234_023
383 + pM[
SM12]*mDet3_234_013 - pM[
SM13]*mDet3_234_012;
384 const Double_t mDet4_1234_0124 = pM[
SM10]*mDet3_234_124 - pM[
SM11]*mDet3_234_024
385 + pM[
SM12]*mDet3_234_014 - pM[
SM14]*mDet3_234_012;
386 const Double_t mDet4_1234_0134 = pM[
SM10]*mDet3_234_134 - pM[
SM11]*mDet3_234_034
387 + pM[
SM13]*mDet3_234_014 - pM[
SM14]*mDet3_234_013;
388 const Double_t mDet4_1234_0234 = pM[
SM10]*mDet3_234_234 - pM[
SM12]*mDet3_234_034
389 + pM[
SM13]*mDet3_234_024 - pM[
SM14]*mDet3_234_023;
390 const Double_t mDet4_1234_1234 = pM[
SM11]*mDet3_234_234 - pM[
SM12]*mDet3_234_134
391 + pM[
SM13]*mDet3_234_124 - pM[
SM14]*mDet3_234_123;
395 const Double_t det = pM[
SM00]*mDet4_1234_1234 - pM[
SM01]*mDet4_1234_0234 + pM[
SM02]*mDet4_1234_0134
396 - pM[
SM03]*mDet4_1234_0124 + pM[
SM04]*mDet4_1234_0123;
401 Error(
"Inv5x5",
"matrix is singular");
405 const Double_t oneOverDet = 1.0/det;
406 const Double_t mn1OverDet = - oneOverDet;
408 pM[
SM00] = mDet4_1234_1234 * oneOverDet;
409 pM[
SM01] = mDet4_1234_0234 * mn1OverDet;
410 pM[
SM02] = mDet4_1234_0134 * oneOverDet;
411 pM[
SM03] = mDet4_1234_0124 * mn1OverDet;
412 pM[
SM04] = mDet4_1234_0123 * oneOverDet;
414 pM[
SM11] = mDet4_0234_0234 * oneOverDet;
415 pM[
SM12] = mDet4_0234_0134 * mn1OverDet;
416 pM[
SM13] = mDet4_0234_0124 * oneOverDet;
417 pM[
SM14] = mDet4_0234_0123 * mn1OverDet;
419 pM[
SM22] = mDet4_0134_0134 * oneOverDet;
420 pM[
SM23] = mDet4_0134_0124 * mn1OverDet;
421 pM[
SM24] = mDet4_0134_0123 * oneOverDet;
423 pM[
SM33] = mDet4_0124_0124 * oneOverDet;
424 pM[
SM34] = mDet4_0124_0123 * mn1OverDet;
426 pM[
SM44] = mDet4_0123_0123 * oneOverDet;
428 for (
Int_t irow = 0; irow < 5; irow++) {
429 const Int_t rowOff1 = irow*5;
430 for (
Int_t icol = 0; icol < irow; icol++) {
431 const Int_t rowOff2 = icol*5;
432 pM[rowOff1+icol] = pM[rowOff2+irow];
485template<
class Element>
488 if (
m.GetNrows() != 6 ||
m.GetNcols() != 6 ||
m.GetRowLwb() !=
m.GetColLwb()) {
489 Error(
"Inv6x6",
"matrix should be square 6x6");
493 Element *pM =
m.GetMatrixArray();
539 const Double_t mDet3_234_012 = pM[
SA20]*mDet2_34_12 - pM[
SA21]*mDet2_34_02 + pM[
SA22]*mDet2_34_01;
540 const Double_t mDet3_234_013 = pM[
SA20]*mDet2_34_13 - pM[
SA21]*mDet2_34_03 + pM[
SA23]*mDet2_34_01;
541 const Double_t mDet3_234_014 = pM[
SA20]*mDet2_34_14 - pM[
SA21]*mDet2_34_04 + pM[
SA24]*mDet2_34_01;
542 const Double_t mDet3_234_023 = pM[
SA20]*mDet2_34_23 - pM[
SA22]*mDet2_34_03 + pM[
SA23]*mDet2_34_02;
543 const Double_t mDet3_234_024 = pM[
SA20]*mDet2_34_24 - pM[
SA22]*mDet2_34_04 + pM[
SA24]*mDet2_34_02;
544 const Double_t mDet3_234_034 = pM[
SA20]*mDet2_34_34 - pM[
SA23]*mDet2_34_04 + pM[
SA24]*mDet2_34_03;
545 const Double_t mDet3_234_123 = pM[
SA21]*mDet2_34_23 - pM[
SA22]*mDet2_34_13 + pM[
SA23]*mDet2_34_12;
546 const Double_t mDet3_234_124 = pM[
SA21]*mDet2_34_24 - pM[
SA22]*mDet2_34_14 + pM[
SA24]*mDet2_34_12;
547 const Double_t mDet3_234_134 = pM[
SA21]*mDet2_34_34 - pM[
SA23]*mDet2_34_14 + pM[
SA24]*mDet2_34_13;
548 const Double_t mDet3_234_234 = pM[
SA22]*mDet2_34_34 - pM[
SA23]*mDet2_34_24 + pM[
SA24]*mDet2_34_23;
549 const Double_t mDet3_235_012 = pM[
SA20]*mDet2_35_12 - pM[
SA21]*mDet2_35_02 + pM[
SA22]*mDet2_35_01;
550 const Double_t mDet3_235_013 = pM[
SA20]*mDet2_35_13 - pM[
SA21]*mDet2_35_03 + pM[
SA23]*mDet2_35_01;
551 const Double_t mDet3_235_014 = pM[
SA20]*mDet2_35_14 - pM[
SA21]*mDet2_35_04 + pM[
SA24]*mDet2_35_01;
552 const Double_t mDet3_235_015 = pM[
SA20]*mDet2_35_15 - pM[
SA21]*mDet2_35_05 + pM[
SA25]*mDet2_35_01;
553 const Double_t mDet3_235_023 = pM[
SA20]*mDet2_35_23 - pM[
SA22]*mDet2_35_03 + pM[
SA23]*mDet2_35_02;
554 const Double_t mDet3_235_024 = pM[
SA20]*mDet2_35_24 - pM[
SA22]*mDet2_35_04 + pM[
SA24]*mDet2_35_02;
555 const Double_t mDet3_235_025 = pM[
SA20]*mDet2_35_25 - pM[
SA22]*mDet2_35_05 + pM[
SA25]*mDet2_35_02;
556 const Double_t mDet3_235_034 = pM[
SA20]*mDet2_35_34 - pM[
SA23]*mDet2_35_04 + pM[
SA24]*mDet2_35_03;
557 const Double_t mDet3_235_035 = pM[
SA20]*mDet2_35_35 - pM[
SA23]*mDet2_35_05 + pM[
SA25]*mDet2_35_03;
558 const Double_t mDet3_235_123 = pM[
SA21]*mDet2_35_23 - pM[
SA22]*mDet2_35_13 + pM[
SA23]*mDet2_35_12;
559 const Double_t mDet3_235_124 = pM[
SA21]*mDet2_35_24 - pM[
SA22]*mDet2_35_14 + pM[
SA24]*mDet2_35_12;
560 const Double_t mDet3_235_125 = pM[
SA21]*mDet2_35_25 - pM[
SA22]*mDet2_35_15 + pM[
SA25]*mDet2_35_12;
561 const Double_t mDet3_235_134 = pM[
SA21]*mDet2_35_34 - pM[
SA23]*mDet2_35_14 + pM[
SA24]*mDet2_35_13;
562 const Double_t mDet3_235_135 = pM[
SA21]*mDet2_35_35 - pM[
SA23]*mDet2_35_15 + pM[
SA25]*mDet2_35_13;
563 const Double_t mDet3_235_234 = pM[
SA22]*mDet2_35_34 - pM[
SA23]*mDet2_35_24 + pM[
SA24]*mDet2_35_23;
564 const Double_t mDet3_235_235 = pM[
SA22]*mDet2_35_35 - pM[
SA23]*mDet2_35_25 + pM[
SA25]*mDet2_35_23;
565 const Double_t mDet3_245_012 = pM[
SA20]*mDet2_45_12 - pM[
SA21]*mDet2_45_02 + pM[
SA22]*mDet2_45_01;
566 const Double_t mDet3_245_013 = pM[
SA20]*mDet2_45_13 - pM[
SA21]*mDet2_45_03 + pM[
SA23]*mDet2_45_01;
567 const Double_t mDet3_245_014 = pM[
SA20]*mDet2_45_14 - pM[
SA21]*mDet2_45_04 + pM[
SA24]*mDet2_45_01;
568 const Double_t mDet3_245_015 = pM[
SA20]*mDet2_45_15 - pM[
SA21]*mDet2_45_05 + pM[
SA25]*mDet2_45_01;
569 const Double_t mDet3_245_023 = pM[
SA20]*mDet2_45_23 - pM[
SA22]*mDet2_45_03 + pM[
SA23]*mDet2_45_02;
570 const Double_t mDet3_245_024 = pM[
SA20]*mDet2_45_24 - pM[
SA22]*mDet2_45_04 + pM[
SA24]*mDet2_45_02;
571 const Double_t mDet3_245_025 = pM[
SA20]*mDet2_45_25 - pM[
SA22]*mDet2_45_05 + pM[
SA25]*mDet2_45_02;
572 const Double_t mDet3_245_034 = pM[
SA20]*mDet2_45_34 - pM[
SA23]*mDet2_45_04 + pM[
SA24]*mDet2_45_03;
573 const Double_t mDet3_245_035 = pM[
SA20]*mDet2_45_35 - pM[
SA23]*mDet2_45_05 + pM[
SA25]*mDet2_45_03;
574 const Double_t mDet3_245_045 = pM[
SA20]*mDet2_45_45 - pM[
SA24]*mDet2_45_05 + pM[
SA25]*mDet2_45_04;
575 const Double_t mDet3_245_123 = pM[
SA21]*mDet2_45_23 - pM[
SA22]*mDet2_45_13 + pM[
SA23]*mDet2_45_12;
576 const Double_t mDet3_245_124 = pM[
SA21]*mDet2_45_24 - pM[
SA22]*mDet2_45_14 + pM[
SA24]*mDet2_45_12;
577 const Double_t mDet3_245_125 = pM[
SA21]*mDet2_45_25 - pM[
SA22]*mDet2_45_15 + pM[
SA25]*mDet2_45_12;
578 const Double_t mDet3_245_134 = pM[
SA21]*mDet2_45_34 - pM[
SA23]*mDet2_45_14 + pM[
SA24]*mDet2_45_13;
579 const Double_t mDet3_245_135 = pM[
SA21]*mDet2_45_35 - pM[
SA23]*mDet2_45_15 + pM[
SA25]*mDet2_45_13;
580 const Double_t mDet3_245_145 = pM[
SA21]*mDet2_45_45 - pM[
SA24]*mDet2_45_15 + pM[
SA25]*mDet2_45_14;
581 const Double_t mDet3_245_234 = pM[
SA22]*mDet2_45_34 - pM[
SA23]*mDet2_45_24 + pM[
SA24]*mDet2_45_23;
582 const Double_t mDet3_245_235 = pM[
SA22]*mDet2_45_35 - pM[
SA23]*mDet2_45_25 + pM[
SA25]*mDet2_45_23;
583 const Double_t mDet3_245_245 = pM[
SA22]*mDet2_45_45 - pM[
SA24]*mDet2_45_25 + pM[
SA25]*mDet2_45_24;
584 const Double_t mDet3_345_012 = pM[
SA30]*mDet2_45_12 - pM[
SA31]*mDet2_45_02 + pM[
SA32]*mDet2_45_01;
585 const Double_t mDet3_345_013 = pM[
SA30]*mDet2_45_13 - pM[
SA31]*mDet2_45_03 + pM[
SA33]*mDet2_45_01;
586 const Double_t mDet3_345_014 = pM[
SA30]*mDet2_45_14 - pM[
SA31]*mDet2_45_04 + pM[
SA34]*mDet2_45_01;
587 const Double_t mDet3_345_015 = pM[
SA30]*mDet2_45_15 - pM[
SA31]*mDet2_45_05 + pM[
SA35]*mDet2_45_01;
588 const Double_t mDet3_345_023 = pM[
SA30]*mDet2_45_23 - pM[
SA32]*mDet2_45_03 + pM[
SA33]*mDet2_45_02;
589 const Double_t mDet3_345_024 = pM[
SA30]*mDet2_45_24 - pM[
SA32]*mDet2_45_04 + pM[
SA34]*mDet2_45_02;
590 const Double_t mDet3_345_025 = pM[
SA30]*mDet2_45_25 - pM[
SA32]*mDet2_45_05 + pM[
SA35]*mDet2_45_02;
591 const Double_t mDet3_345_034 = pM[
SA30]*mDet2_45_34 - pM[
SA33]*mDet2_45_04 + pM[
SA34]*mDet2_45_03;
592 const Double_t mDet3_345_035 = pM[
SA30]*mDet2_45_35 - pM[
SA33]*mDet2_45_05 + pM[
SA35]*mDet2_45_03;
593 const Double_t mDet3_345_045 = pM[
SA30]*mDet2_45_45 - pM[
SA34]*mDet2_45_05 + pM[
SA35]*mDet2_45_04;
594 const Double_t mDet3_345_123 = pM[
SA31]*mDet2_45_23 - pM[
SA32]*mDet2_45_13 + pM[
SA33]*mDet2_45_12;
595 const Double_t mDet3_345_124 = pM[
SA31]*mDet2_45_24 - pM[
SA32]*mDet2_45_14 + pM[
SA34]*mDet2_45_12;
596 const Double_t mDet3_345_125 = pM[
SA31]*mDet2_45_25 - pM[
SA32]*mDet2_45_15 + pM[
SA35]*mDet2_45_12;
597 const Double_t mDet3_345_134 = pM[
SA31]*mDet2_45_34 - pM[
SA33]*mDet2_45_14 + pM[
SA34]*mDet2_45_13;
598 const Double_t mDet3_345_135 = pM[
SA31]*mDet2_45_35 - pM[
SA33]*mDet2_45_15 + pM[
SA35]*mDet2_45_13;
599 const Double_t mDet3_345_145 = pM[
SA31]*mDet2_45_45 - pM[
SA34]*mDet2_45_15 + pM[
SA35]*mDet2_45_14;
600 const Double_t mDet3_345_234 = pM[
SA32]*mDet2_45_34 - pM[
SA33]*mDet2_45_24 + pM[
SA34]*mDet2_45_23;
601 const Double_t mDet3_345_235 = pM[
SA32]*mDet2_45_35 - pM[
SA33]*mDet2_45_25 + pM[
SA35]*mDet2_45_23;
602 const Double_t mDet3_345_245 = pM[
SA32]*mDet2_45_45 - pM[
SA34]*mDet2_45_25 + pM[
SA35]*mDet2_45_24;
603 const Double_t mDet3_345_345 = pM[
SA33]*mDet2_45_45 - pM[
SA34]*mDet2_45_35 + pM[
SA35]*mDet2_45_34;
607 const Double_t mDet4_1234_0123 = pM[
SA10]*mDet3_234_123 - pM[
SA11]*mDet3_234_023
608 + pM[
SA12]*mDet3_234_013 - pM[
SA13]*mDet3_234_012;
609 const Double_t mDet4_1234_0124 = pM[
SA10]*mDet3_234_124 - pM[
SA11]*mDet3_234_024
610 + pM[
SA12]*mDet3_234_014 - pM[
SA14]*mDet3_234_012;
611 const Double_t mDet4_1234_0134 = pM[
SA10]*mDet3_234_134 - pM[
SA11]*mDet3_234_034
612 + pM[
SA13]*mDet3_234_014 - pM[
SA14]*mDet3_234_013;
613 const Double_t mDet4_1234_0234 = pM[
SA10]*mDet3_234_234 - pM[
SA12]*mDet3_234_034
614 + pM[
SA13]*mDet3_234_024 - pM[
SA14]*mDet3_234_023;
615 const Double_t mDet4_1234_1234 = pM[
SA11]*mDet3_234_234 - pM[
SA12]*mDet3_234_134
616 + pM[
SA13]*mDet3_234_124 - pM[
SA14]*mDet3_234_123;
617 const Double_t mDet4_1235_0123 = pM[
SA10]*mDet3_235_123 - pM[
SA11]*mDet3_235_023
618 + pM[
SA12]*mDet3_235_013 - pM[
SA13]*mDet3_235_012;
619 const Double_t mDet4_1235_0124 = pM[
SA10]*mDet3_235_124 - pM[
SA11]*mDet3_235_024
620 + pM[
SA12]*mDet3_235_014 - pM[
SA14]*mDet3_235_012;
621 const Double_t mDet4_1235_0125 = pM[
SA10]*mDet3_235_125 - pM[
SA11]*mDet3_235_025
622 + pM[
SA12]*mDet3_235_015 - pM[
SA15]*mDet3_235_012;
623 const Double_t mDet4_1235_0134 = pM[
SA10]*mDet3_235_134 - pM[
SA11]*mDet3_235_034
624 + pM[
SA13]*mDet3_235_014 - pM[
SA14]*mDet3_235_013;
625 const Double_t mDet4_1235_0135 = pM[
SA10]*mDet3_235_135 - pM[
SA11]*mDet3_235_035
626 + pM[
SA13]*mDet3_235_015 - pM[
SA15]*mDet3_235_013;
627 const Double_t mDet4_1235_0234 = pM[
SA10]*mDet3_235_234 - pM[
SA12]*mDet3_235_034
628 + pM[
SA13]*mDet3_235_024 - pM[
SA14]*mDet3_235_023;
629 const Double_t mDet4_1235_0235 = pM[
SA10]*mDet3_235_235 - pM[
SA12]*mDet3_235_035
630 + pM[
SA13]*mDet3_235_025 - pM[
SA15]*mDet3_235_023;
631 const Double_t mDet4_1235_1234 = pM[
SA11]*mDet3_235_234 - pM[
SA12]*mDet3_235_134
632 + pM[
SA13]*mDet3_235_124 - pM[
SA14]*mDet3_235_123;
633 const Double_t mDet4_1235_1235 = pM[
SA11]*mDet3_235_235 - pM[
SA12]*mDet3_235_135
634 + pM[
SA13]*mDet3_235_125 - pM[
SA15]*mDet3_235_123;
635 const Double_t mDet4_1245_0123 = pM[
SA10]*mDet3_245_123 - pM[
SA11]*mDet3_245_023
636 + pM[
SA12]*mDet3_245_013 - pM[
SA13]*mDet3_245_012;
637 const Double_t mDet4_1245_0124 = pM[
SA10]*mDet3_245_124 - pM[
SA11]*mDet3_245_024
638 + pM[
SA12]*mDet3_245_014 - pM[
SA14]*mDet3_245_012;
639 const Double_t mDet4_1245_0125 = pM[
SA10]*mDet3_245_125 - pM[
SA11]*mDet3_245_025
640 + pM[
SA12]*mDet3_245_015 - pM[
SA15]*mDet3_245_012;
641 const Double_t mDet4_1245_0134 = pM[
SA10]*mDet3_245_134 - pM[
SA11]*mDet3_245_034
642 + pM[
SA13]*mDet3_245_014 - pM[
SA14]*mDet3_245_013;
643 const Double_t mDet4_1245_0135 = pM[
SA10]*mDet3_245_135 - pM[
SA11]*mDet3_245_035
644 + pM[
SA13]*mDet3_245_015 - pM[
SA15]*mDet3_245_013;
645 const Double_t mDet4_1245_0145 = pM[
SA10]*mDet3_245_145 - pM[
SA11]*mDet3_245_045
646 + pM[
SA14]*mDet3_245_015 - pM[
SA15]*mDet3_245_014;
647 const Double_t mDet4_1245_0234 = pM[
SA10]*mDet3_245_234 - pM[
SA12]*mDet3_245_034
648 + pM[
SA13]*mDet3_245_024 - pM[
SA14]*mDet3_245_023;
649 const Double_t mDet4_1245_0235 = pM[
SA10]*mDet3_245_235 - pM[
SA12]*mDet3_245_035
650 + pM[
SA13]*mDet3_245_025 - pM[
SA15]*mDet3_245_023;
651 const Double_t mDet4_1245_0245 = pM[
SA10]*mDet3_245_245 - pM[
SA12]*mDet3_245_045
652 + pM[
SA14]*mDet3_245_025 - pM[
SA15]*mDet3_245_024;
653 const Double_t mDet4_1245_1234 = pM[
SA11]*mDet3_245_234 - pM[
SA12]*mDet3_245_134
654 + pM[
SA13]*mDet3_245_124 - pM[
SA14]*mDet3_245_123;
655 const Double_t mDet4_1245_1235 = pM[
SA11]*mDet3_245_235 - pM[
SA12]*mDet3_245_135
656 + pM[
SA13]*mDet3_245_125 - pM[
SA15]*mDet3_245_123;
657 const Double_t mDet4_1245_1245 = pM[
SA11]*mDet3_245_245 - pM[
SA12]*mDet3_245_145
658 + pM[
SA14]*mDet3_245_125 - pM[
SA15]*mDet3_245_124;
659 const Double_t mDet4_1345_0123 = pM[
SA10]*mDet3_345_123 - pM[
SA11]*mDet3_345_023
660 + pM[
SA12]*mDet3_345_013 - pM[
SA13]*mDet3_345_012;
661 const Double_t mDet4_1345_0124 = pM[
SA10]*mDet3_345_124 - pM[
SA11]*mDet3_345_024
662 + pM[
SA12]*mDet3_345_014 - pM[
SA14]*mDet3_345_012;
663 const Double_t mDet4_1345_0125 = pM[
SA10]*mDet3_345_125 - pM[
SA11]*mDet3_345_025
664 + pM[
SA12]*mDet3_345_015 - pM[
SA15]*mDet3_345_012;
665 const Double_t mDet4_1345_0134 = pM[
SA10]*mDet3_345_134 - pM[
SA11]*mDet3_345_034
666 + pM[
SA13]*mDet3_345_014 - pM[
SA14]*mDet3_345_013;
667 const Double_t mDet4_1345_0135 = pM[
SA10]*mDet3_345_135 - pM[
SA11]*mDet3_345_035
668 + pM[
SA13]*mDet3_345_015 - pM[
SA15]*mDet3_345_013;
669 const Double_t mDet4_1345_0145 = pM[
SA10]*mDet3_345_145 - pM[
SA11]*mDet3_345_045
670 + pM[
SA14]*mDet3_345_015 - pM[
SA15]*mDet3_345_014;
671 const Double_t mDet4_1345_0234 = pM[
SA10]*mDet3_345_234 - pM[
SA12]*mDet3_345_034
672 + pM[
SA13]*mDet3_345_024 - pM[
SA14]*mDet3_345_023;
673 const Double_t mDet4_1345_0235 = pM[
SA10]*mDet3_345_235 - pM[
SA12]*mDet3_345_035
674 + pM[
SA13]*mDet3_345_025 - pM[
SA15]*mDet3_345_023;
675 const Double_t mDet4_1345_0245 = pM[
SA10]*mDet3_345_245 - pM[
SA12]*mDet3_345_045
676 + pM[
SA14]*mDet3_345_025 - pM[
SA15]*mDet3_345_024;
677 const Double_t mDet4_1345_0345 = pM[
SA10]*mDet3_345_345 - pM[
SA13]*mDet3_345_045
678 + pM[
SA14]*mDet3_345_035 - pM[
SA15]*mDet3_345_034;
679 const Double_t mDet4_1345_1234 = pM[
SA11]*mDet3_345_234 - pM[
SA12]*mDet3_345_134
680 + pM[
SA13]*mDet3_345_124 - pM[
SA14]*mDet3_345_123;
681 const Double_t mDet4_1345_1235 = pM[
SA11]*mDet3_345_235 - pM[
SA12]*mDet3_345_135
682 + pM[
SA13]*mDet3_345_125 - pM[
SA15]*mDet3_345_123;
683 const Double_t mDet4_1345_1245 = pM[
SA11]*mDet3_345_245 - pM[
SA12]*mDet3_345_145
684 + pM[
SA14]*mDet3_345_125 - pM[
SA15]*mDet3_345_124;
685 const Double_t mDet4_1345_1345 = pM[
SA11]*mDet3_345_345 - pM[
SA13]*mDet3_345_145
686 + pM[
SA14]*mDet3_345_135 - pM[
SA15]*mDet3_345_134;
687 const Double_t mDet4_2345_0123 = pM[
SA20]*mDet3_345_123 - pM[
SA21]*mDet3_345_023
688 + pM[
SA22]*mDet3_345_013 - pM[
SA23]*mDet3_345_012;
689 const Double_t mDet4_2345_0124 = pM[
SA20]*mDet3_345_124 - pM[
SA21]*mDet3_345_024
690 + pM[
SA22]*mDet3_345_014 - pM[
SA24]*mDet3_345_012;
691 const Double_t mDet4_2345_0125 = pM[
SA20]*mDet3_345_125 - pM[
SA21]*mDet3_345_025
692 + pM[
SA22]*mDet3_345_015 - pM[
SA25]*mDet3_345_012;
693 const Double_t mDet4_2345_0134 = pM[
SA20]*mDet3_345_134 - pM[
SA21]*mDet3_345_034
694 + pM[
SA23]*mDet3_345_014 - pM[
SA24]*mDet3_345_013;
695 const Double_t mDet4_2345_0135 = pM[
SA20]*mDet3_345_135 - pM[
SA21]*mDet3_345_035
696 + pM[
SA23]*mDet3_345_015 - pM[
SA25]*mDet3_345_013;
697 const Double_t mDet4_2345_0145 = pM[
SA20]*mDet3_345_145 - pM[
SA21]*mDet3_345_045
698 + pM[
SA24]*mDet3_345_015 - pM[
SA25]*mDet3_345_014;
699 const Double_t mDet4_2345_0234 = pM[
SA20]*mDet3_345_234 - pM[
SA22]*mDet3_345_034
700 + pM[
SA23]*mDet3_345_024 - pM[
SA24]*mDet3_345_023;
701 const Double_t mDet4_2345_0235 = pM[
SA20]*mDet3_345_235 - pM[
SA22]*mDet3_345_035
702 + pM[
SA23]*mDet3_345_025 - pM[
SA25]*mDet3_345_023;
703 const Double_t mDet4_2345_0245 = pM[
SA20]*mDet3_345_245 - pM[
SA22]*mDet3_345_045
704 + pM[
SA24]*mDet3_345_025 - pM[
SA25]*mDet3_345_024;
705 const Double_t mDet4_2345_0345 = pM[
SA20]*mDet3_345_345 - pM[
SA23]*mDet3_345_045
706 + pM[
SA24]*mDet3_345_035 - pM[
SA25]*mDet3_345_034;
707 const Double_t mDet4_2345_1234 = pM[
SA21]*mDet3_345_234 - pM[
SA22]*mDet3_345_134
708 + pM[
SA23]*mDet3_345_124 - pM[
SA24]*mDet3_345_123;
709 const Double_t mDet4_2345_1235 = pM[
SA21]*mDet3_345_235 - pM[
SA22]*mDet3_345_135
710 + pM[
SA23]*mDet3_345_125 - pM[
SA25]*mDet3_345_123;
711 const Double_t mDet4_2345_1245 = pM[
SA21]*mDet3_345_245 - pM[
SA22]*mDet3_345_145
712 + pM[
SA24]*mDet3_345_125 - pM[
SA25]*mDet3_345_124;
713 const Double_t mDet4_2345_1345 = pM[
SA21]*mDet3_345_345 - pM[
SA23]*mDet3_345_145
714 + pM[
SA24]*mDet3_345_135 - pM[
SA25]*mDet3_345_134;
715 const Double_t mDet4_2345_2345 = pM[
SA22]*mDet3_345_345 - pM[
SA23]*mDet3_345_245
716 + pM[
SA24]*mDet3_345_235 - pM[
SA25]*mDet3_345_234;
720 const Double_t mDet5_01234_01234 = pM[
SA00]*mDet4_1234_1234 - pM[
SA01]*mDet4_1234_0234
721 + pM[
SA02]*mDet4_1234_0134 - pM[
SA03]*mDet4_1234_0124 + pM[
SA04]*mDet4_1234_0123;
722 const Double_t mDet5_01235_01234 = pM[
SA00]*mDet4_1235_1234 - pM[
SA01]*mDet4_1235_0234
723 + pM[
SA02]*mDet4_1235_0134 - pM[
SA03]*mDet4_1235_0124 + pM[
SA04]*mDet4_1235_0123;
724 const Double_t mDet5_01235_01235 = pM[
SA00]*mDet4_1235_1235 - pM[
SA01]*mDet4_1235_0235
725 + pM[
SA02]*mDet4_1235_0135 - pM[
SA03]*mDet4_1235_0125 + pM[
SA05]*mDet4_1235_0123;
726 const Double_t mDet5_01245_01234 = pM[
SA00]*mDet4_1245_1234 - pM[
SA01]*mDet4_1245_0234
727 + pM[
SA02]*mDet4_1245_0134 - pM[
SA03]*mDet4_1245_0124 + pM[
SA04]*mDet4_1245_0123;
728 const Double_t mDet5_01245_01235 = pM[
SA00]*mDet4_1245_1235 - pM[
SA01]*mDet4_1245_0235
729 + pM[
SA02]*mDet4_1245_0135 - pM[
SA03]*mDet4_1245_0125 + pM[
SA05]*mDet4_1245_0123;
730 const Double_t mDet5_01245_01245 = pM[
SA00]*mDet4_1245_1245 - pM[
SA01]*mDet4_1245_0245
731 + pM[
SA02]*mDet4_1245_0145 - pM[
SA04]*mDet4_1245_0125 + pM[
SA05]*mDet4_1245_0124;
732 const Double_t mDet5_01345_01234 = pM[
SA00]*mDet4_1345_1234 - pM[
SA01]*mDet4_1345_0234
733 + pM[
SA02]*mDet4_1345_0134 - pM[
SA03]*mDet4_1345_0124 + pM[
SA04]*mDet4_1345_0123;
734 const Double_t mDet5_01345_01235 = pM[
SA00]*mDet4_1345_1235 - pM[
SA01]*mDet4_1345_0235
735 + pM[
SA02]*mDet4_1345_0135 - pM[
SA03]*mDet4_1345_0125 + pM[
SA05]*mDet4_1345_0123;
736 const Double_t mDet5_01345_01245 = pM[
SA00]*mDet4_1345_1245 - pM[
SA01]*mDet4_1345_0245
737 + pM[
SA02]*mDet4_1345_0145 - pM[
SA04]*mDet4_1345_0125 + pM[
SA05]*mDet4_1345_0124;
738 const Double_t mDet5_01345_01345 = pM[
SA00]*mDet4_1345_1345 - pM[
SA01]*mDet4_1345_0345
739 + pM[
SA03]*mDet4_1345_0145 - pM[
SA04]*mDet4_1345_0135 + pM[
SA05]*mDet4_1345_0134;
740 const Double_t mDet5_02345_01234 = pM[
SA00]*mDet4_2345_1234 - pM[
SA01]*mDet4_2345_0234
741 + pM[
SA02]*mDet4_2345_0134 - pM[
SA03]*mDet4_2345_0124 + pM[
SA04]*mDet4_2345_0123;
742 const Double_t mDet5_02345_01235 = pM[
SA00]*mDet4_2345_1235 - pM[
SA01]*mDet4_2345_0235
743 + pM[
SA02]*mDet4_2345_0135 - pM[
SA03]*mDet4_2345_0125 + pM[
SA05]*mDet4_2345_0123;
744 const Double_t mDet5_02345_01245 = pM[
SA00]*mDet4_2345_1245 - pM[
SA01]*mDet4_2345_0245
745 + pM[
SA02]*mDet4_2345_0145 - pM[
SA04]*mDet4_2345_0125 + pM[
SA05]*mDet4_2345_0124;
746 const Double_t mDet5_02345_01345 = pM[
SA00]*mDet4_2345_1345 - pM[
SA01]*mDet4_2345_0345
747 + pM[
SA03]*mDet4_2345_0145 - pM[
SA04]*mDet4_2345_0135 + pM[
SA05]*mDet4_2345_0134;
748 const Double_t mDet5_02345_02345 = pM[
SA00]*mDet4_2345_2345 - pM[
SA02]*mDet4_2345_0345
749 + pM[
SA03]*mDet4_2345_0245 - pM[
SA04]*mDet4_2345_0235 + pM[
SA05]*mDet4_2345_0234;
750 const Double_t mDet5_12345_01234 = pM[
SA10]*mDet4_2345_1234 - pM[
SA11]*mDet4_2345_0234
751 + pM[
SA12]*mDet4_2345_0134 - pM[
SA13]*mDet4_2345_0124 + pM[
SA14]*mDet4_2345_0123;
752 const Double_t mDet5_12345_01235 = pM[
SA10]*mDet4_2345_1235 - pM[
SA11]*mDet4_2345_0235
753 + pM[
SA12]*mDet4_2345_0135 - pM[
SA13]*mDet4_2345_0125 + pM[
SA15]*mDet4_2345_0123;
754 const Double_t mDet5_12345_01245 = pM[
SA10]*mDet4_2345_1245 - pM[
SA11]*mDet4_2345_0245
755 + pM[
SA12]*mDet4_2345_0145 - pM[
SA14]*mDet4_2345_0125 + pM[
SA15]*mDet4_2345_0124;
756 const Double_t mDet5_12345_01345 = pM[
SA10]*mDet4_2345_1345 - pM[
SA11]*mDet4_2345_0345
757 + pM[
SA13]*mDet4_2345_0145 - pM[
SA14]*mDet4_2345_0135 + pM[
SA15]*mDet4_2345_0134;
758 const Double_t mDet5_12345_02345 = pM[
SA10]*mDet4_2345_2345 - pM[
SA12]*mDet4_2345_0345
759 + pM[
SA13]*mDet4_2345_0245 - pM[
SA14]*mDet4_2345_0235 + pM[
SA15]*mDet4_2345_0234;
760 const Double_t mDet5_12345_12345 = pM[
SA11]*mDet4_2345_2345 - pM[
SA12]*mDet4_2345_1345
761 + pM[
SA13]*mDet4_2345_1245 - pM[
SA14]*mDet4_2345_1235 + pM[
SA15]*mDet4_2345_1234;
765 const Double_t det = pM[
SA00]*mDet5_12345_12345 - pM[
SA01]*mDet5_12345_02345 + pM[
SA02]*mDet5_12345_01345
766 - pM[
SA03]*mDet5_12345_01245 + pM[
SA04]*mDet5_12345_01235 - pM[
SA05]*mDet5_12345_01234;
772 Error(
"Inv6x6",
"matrix is singular");
776 const Double_t oneOverDet = 1.0/det;
777 const Double_t mn1OverDet = - oneOverDet;
779 pM[
SA00] = mDet5_12345_12345*oneOverDet;
780 pM[
SA01] = mDet5_12345_02345*mn1OverDet;
781 pM[
SA02] = mDet5_12345_01345*oneOverDet;
782 pM[
SA03] = mDet5_12345_01245*mn1OverDet;
783 pM[
SA04] = mDet5_12345_01235*oneOverDet;
784 pM[
SA05] = mDet5_12345_01234*mn1OverDet;
786 pM[
SA11] = mDet5_02345_02345*oneOverDet;
787 pM[
SA12] = mDet5_02345_01345*mn1OverDet;
788 pM[
SA13] = mDet5_02345_01245*oneOverDet;
789 pM[
SA14] = mDet5_02345_01235*mn1OverDet;
790 pM[
SA15] = mDet5_02345_01234*oneOverDet;
792 pM[
SA22] = mDet5_01345_01345*oneOverDet;
793 pM[
SA23] = mDet5_01345_01245*mn1OverDet;
794 pM[
SA24] = mDet5_01345_01235*oneOverDet;
795 pM[
SA25] = mDet5_01345_01234*mn1OverDet;
797 pM[
SA33] = mDet5_01245_01245*oneOverDet;
798 pM[
SA34] = mDet5_01245_01235*mn1OverDet;
799 pM[
SA35] = mDet5_01245_01234*oneOverDet;
801 pM[
SA44] = mDet5_01235_01235*oneOverDet;
802 pM[
SA45] = mDet5_01235_01234*mn1OverDet;
804 pM[
SA55] = mDet5_01234_01234*oneOverDet;
806 for (
Int_t irow = 0; irow < 6; irow++) {
807 const Int_t rowOff1 = irow*6;
808 for (
Int_t icol = 0; icol < irow; icol++) {
809 const Int_t rowOff2 = icol*6;
810 pM[rowOff1+icol] = pM[rowOff2+irow];
#define NamespaceImp(name)
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Bool_t Inv6x6(TMatrixTSym< Element > &m, Double_t *determ)
Bool_t Inv3x3(TMatrixTSym< Element > &m, Double_t *determ)
Bool_t Inv4x4(TMatrixTSym< Element > &m, Double_t *determ)
Bool_t Inv2x2(TMatrixTSym< Element > &m, Double_t *determ)
Bool_t Inv5x5(TMatrixTSym< Element > &m, Double_t *determ)