/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcTrkRecon/MdcTrkRecon-00-03-45/MdcTrkRecon/mdcTwoInv.h File Reference

Go to the source code of this file.

Functions

int mdcTwoInv (double matrix[3], double invmat[3])


Function Documentation

int mdcTwoInv ( double  matrix[3],
double  invmat[3] 
) [inline]

Definition at line 1 of file mdcTwoInv.h.

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegGrouper::calcParBySegs(), MdcSegInfoSterO::calcStereo(), and MdcSegInfoCsmc::calcStraight().

00001                                                           {
00002 
00003   double det = matrix[0] * matrix[2] - matrix[1] * matrix[1];
00004   if (det == 0.0) {
00005     invmat[0] = invmat[2] = invmat[1] = 0.00000;
00006     return 1;
00007   }
00008   else {
00009     double detinv = 1./det;
00010     invmat[0] = matrix[2] * detinv;
00011     invmat[2] = matrix[0] * detinv;
00012     invmat[1] = -matrix[1] * detinv;
00013     return 0;
00014   }
00015 }


Generated on Tue Nov 29 23:16:56 2016 for BOSS_7.0.2 by  doxygen 1.4.7