6 #include "CLHEP/Matrix/Matrix.h"
7 #include "CLHEP/Matrix/Vector.h"
28 if(!AmgMtx)
return false;
30 double DET=AmgMtx->determinant();
41 stdSymMtx[ 0] =(*AmgMtx)(0,0);
42 stdSymMtx[ 1] =(*AmgMtx)(1,0);
43 stdSymMtx[ 2] =(*AmgMtx)(1,1);
44 stdSymMtx[ 3] =(*AmgMtx)(2,0);
45 stdSymMtx[ 4] =(*AmgMtx)(2,1);
46 stdSymMtx[ 5] =(*AmgMtx)(2,2);
47 stdSymMtx[ 6] =(*AmgMtx)(3,0);
48 stdSymMtx[ 7] =(*AmgMtx)(3,1);
49 stdSymMtx[ 8] =(*AmgMtx)(3,2);
50 stdSymMtx[ 9] =(*AmgMtx)(3,3);
51 stdSymMtx[10] =(*AmgMtx)(4,0);
52 stdSymMtx[11] =(*AmgMtx)(4,1);
53 stdSymMtx[12] =(*AmgMtx)(4,2);
54 stdSymMtx[13] =(*AmgMtx)(4,3);
55 stdSymMtx[14] =(*AmgMtx)(4,4);
60 double A0V,
double ZV,
double PhiV,
double ThetaV,
double PInv,
const double CovTrk[15],
61 long int & Charge,
double VTrkPar[5],
double VTrkCov[15])
const
65 double sinT =
sin(ThetaV);
66 double cosT =
cos(ThetaV);
72 VTrkPar[4] = -PInv*CnvCst/sinT ;
73 Charge = PInv > 0 ? -1 : 1;
77 double Deriv[5][5] ={{0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.},
78 {0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.}};
80 CovI[0][0] = CovTrk[0];
82 CovI[1][0] = CovTrk[1];
83 CovI[0][1] = CovTrk[1];
84 CovI[1][1] = CovTrk[2];
86 CovI[0][2] = CovTrk[3];
87 CovI[2][0] = CovTrk[3];
88 CovI[1][2] = CovTrk[4];
89 CovI[2][1] = CovTrk[4];
90 CovI[2][2] = CovTrk[5];
92 CovI[0][3] = CovTrk[6];
93 CovI[3][0] = CovTrk[6];
94 CovI[1][3] = CovTrk[7];
95 CovI[3][1] = CovTrk[7];
96 CovI[2][3] = CovTrk[8];
97 CovI[3][2] = CovTrk[8];
98 CovI[3][3] = CovTrk[9];
100 CovI[0][4] = CovTrk[10] ;
101 CovI[4][0] = CovTrk[10] ;
102 CovI[1][4] = CovTrk[11] ;
103 CovI[4][1] = CovTrk[11] ;
104 CovI[2][4] = CovTrk[12] ;
105 CovI[4][2] = CovTrk[12] ;
106 CovI[3][4] = CovTrk[13] ;
107 CovI[4][3] = CovTrk[13] ;
108 CovI[4][4] = CovTrk[14] ;
115 Deriv[4][3] = PInv*CnvCst *(cosT/sinT/sinT) ;
116 Deriv[4][4] = -CnvCst/sinT;
120 for(
i=0;
i<5;
i++){
for(j=0;j<=
i;j++){
122 for(ii=4;ii>=0;ii--){
123 if(Deriv[
i][ii] == 0.)
continue;
124 for(jj=4;jj>=0;jj--){
125 if(Deriv[j][jj] == 0.)
continue;
126 ct += CovI[ii][jj]*Deriv[
i][ii]*Deriv[j][jj];};};