BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
mdcTwoInv.cxx
Go to the documentation of this file.
1
/* Invert a symmetric 2x2 matrix. Return 1 if inversion fails. */
2
3
int
mdcTwoInv
(
double
matrix[3],
double
invmat[3] ) {
4
5
/* Declare variables. */
6
double
det, detinv;
7
8
/**************************************************************************/
9
10
det = matrix[0] * matrix[2] - matrix[1] * matrix[1];
11
if
( det == 0.0 )
12
{
13
invmat[0] = 0.00001;
14
invmat[2] = 0.00001;
15
invmat[1] = 0.00000;
16
return
1;
17
}
18
detinv = 1. / det;
19
20
invmat[0] = matrix[2] * detinv;
21
invmat[2] = matrix[0] * detinv;
22
invmat[1] = -matrix[1] * detinv;
23
24
return
0;
25
}
mdcTwoInv
int mdcTwoInv(double matrix[3], double invmat[3])
Definition
mdcTwoInv.cxx:3
8.0.0
BOSS_Source
Reconstruction
MdcPatRec
MdcTrkRecon
src
mdcTwoInv.cxx
Generated by
1.16.1