83 double *ParOld,
double *CovOld,
double *RefStart,
84 double *RefEnd,
double *ParNew,
double *CovNew,
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];
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;
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;
206 : Gaudi::Hive::currentContext();
218 if(TrkID>=0)refPoint = state.
m_trkControl.at(TrkID).trkRefGlobPos;
229 if (pmom.dot(
step) > 0.) {
240 if (pntOnTrk ==
nullptr){
246 step = (*endPoint) - iniPoint;
254 if (pmom.dot(
step) < 0) {
258 ctx, *pntOnTrk, surfEnd,
dir,
true, prtType,
addNoise).release();
267 if (pmom.dot(
step) < 0) {
272 ctx, *pntOnTrk, surfEnd,
dir,
true, prtType, mmode).release();
280 bool dirPositive =
true;
281 if (pmom.dot(
step) < 0.)
283 if ((*endPoint).perp() > Border && iniPoint.perp() > Border) {
298 if ((*endPoint).perp() < Border && iniPoint.perp() < Border) {
321 if (iniPoint.perp() < Border) {
329 if (tmpPer ==
nullptr) {
360 : Gaudi::Hive::currentContext();
378 if(!pntOnTrk)
return endPer;
388 step = (*endPoint) - iniPoint;
436 if(!radiusOfFirstHitAcc.
isAvailable (*xprt))
return nullptr;
438 const EventContext& ctx = Gaudi::Hive::currentContext();
456 true, prtType).release();
457 if(hitOnTrk==
nullptr)
return nullptr;
463 surfacePerigee).release();
465 if(hitOnTrkPerig==
nullptr)
return nullptr;
467 return dynamic_cast<const Perigee*
> (hitOnTrkPerig);