36 double parV0[5], covParV0[15];
40 double ptot[3]= {0.,0.,0.};
42 for (
it=0;
it<NTRK;
it++) {
51 long int Charge = 0;
for (
it=0;
it<NTRK;
it++) Charge += vk->
TrackList[
it]->Charge;
57 double DummyErr[21] = { 1.e-20,
61 0., 0., 0., 0., 1.e-18,
62 0., 0., 0., 0., 0., 1.e-18};
63 combinedTrack( Charge, ptot, DummyErr, localField, parV0, covParV0);
68 double nPar[5],nCov[15];
69 long int TrkID = -999;
74 cnv[0][0] = -
sin(nPar[3]);
75 cnv[0][1] =
cos(nPar[3]);
77 cnv[1][0] =
sin(nPar[3])/
tan(nPar[2]);
78 cnv[1][1] =
cos(nPar[3])/
tan(nPar[2]);
81 double covImp[3]={0.,0.,0.};
84 if(
i>=j){ ij=
i*(
i+1)/2+j; }
else{ ij=j*(j+1)/2+
i;}
85 covImp[0] += cnv[0][
i]*vk->
FVC.
covvrt[ij]*cnv[0][j];
86 covImp[1] += cnv[0][
i]*vk->
FVC.
covvrt[ij]*cnv[1][j];
87 covImp[2] += cnv[1][
i]*vk->
FVC.
covvrt[ij]*cnv[1][j];
90 if ( UseTrkErr){ covImp[0] += nCov[0]; covImp[1] += nCov[1]; covImp[2] += nCov[2];}
93 int IERR=
cfdinv(covImp, dwgt, -2);
if(IERR){ IERR=
cfdinv(covImp, dwgt, 2);
if(IERR){dwgt[0]=dwgt[2]=1.e6; dwgt[1]=0.;}}
94 Signif = sqrt(dwgt[0] * nPar[0] * nPar[0] + 2. * dwgt[1] * nPar[0] * nPar[1] +
95 dwgt[2] * nPar[1] * nPar[1]);