89 int trkID_loc=trkID;
if(trkID_loc<0)trkID_loc=0;
92 double vX=RefEnd[0];
double vY=RefEnd[1];
double vZ=RefEnd[2];
94 Amg::Vector3D endPointG( vX + state.m_refFrameX, vY + state.m_refFrameY, vZ + state.m_refFrameZ);
98 std::vector<double> PerigeeIni( ParOld, ParOld+5 );
99 std::vector<double> CovPerigeeIni( 15, 0. );
100 if( CovOld !=
nullptr) {
102 std::copy(CovOld,CovOld+15,CovPerigeeIni.begin() );
105 CovPerigeeIni[0]=1.e6;CovPerigeeIni[2]=1.e6;CovPerigeeIni[5]=1.;CovPerigeeIni[9]=1.;CovPerigeeIni[14]=fabs(PerigeeIni[4]);
114 double fx,fy,BMAG_FIXED;
115 state.m_fitField.getMagFld(vX,vY,vZ,fx,fy,BMAG_FIXED);
126 if( endPer ==
nullptr ) {
127 ParNew[0]=0.; ParNew[1]=0.;ParNew[2]=0.;ParNew[3]=0.;ParNew[4]=0.;
128 delete inpPer;
return;
132 AmgVector(5) VectPerig; VectPerig.setZero();
135 VectPerig = mPer->parameters();
136 CovMtx = mPer->covariance();
139 VectPerig =
Line->parameters();
140 CovMtx =
Line->covariance();
142 if( (Line==
nullptr && mPer==
nullptr) || CovMtx==
nullptr ){
143 ParNew[0]=0.; ParNew[1]=0.;ParNew[2]=0.;ParNew[3]=0.;ParNew[4]=0.;
144 delete inpPer;
return;
147 if((*CovMtx)(0,0)<=0. || (*CovMtx)(1,1)<=0.){
148 ParNew[0]=0.; ParNew[1]=0.;ParNew[2]=0.;ParNew[3]=0.;ParNew[4]=0.;
149 delete inpPer;
delete endPer;
152 double CovVertTrk[15];
153 long int locCharge=Charge;
154 CovVertTrk[ 0] =(*CovMtx)(0,0);
155 CovVertTrk[ 1] =(*CovMtx)(1,0);
156 CovVertTrk[ 2] =(*CovMtx)(1,1);
157 CovVertTrk[ 3] =(*CovMtx)(2,0);
158 CovVertTrk[ 4] =(*CovMtx)(2,1);
159 CovVertTrk[ 5] =(*CovMtx)(2,2);
160 CovVertTrk[ 6] =(*CovMtx)(3,0);
161 CovVertTrk[ 7] =(*CovMtx)(3,1);
162 CovVertTrk[ 8] =(*CovMtx)(3,2);
163 CovVertTrk[ 9] =(*CovMtx)(3,3);
164 CovVertTrk[10] =(*CovMtx)(4,0);
165 CovVertTrk[11] =(*CovMtx)(4,1);
166 CovVertTrk[12] =(*CovMtx)(4,2);
167 CovVertTrk[13] =(*CovMtx)(4,3);
168 CovVertTrk[14] =(*CovMtx)(4,4);
173 if(CovNew !=
nullptr) {
175 VectPerig(2), VectPerig(3), VectPerig(4), CovVertTrk,
176 locCharge, &ParNew[0] , &CovNew[0]);
178 double CovVertTrkTmp[15];
180 VectPerig(2), VectPerig(3), VectPerig(4), CovVertTrk,
181 locCharge, &ParNew[0] , CovVertTrkTmp);
183 delete inpPer;
delete endPer;