34 void PropagateSTD(
long int,
long int Charge,
double *ParOld,
double *CovOld,
35 double *RefStart,
double *RefEnd,
double *ParNew,
37 double Way, closePoint[3], Goal[3];
38 Goal[0] = RefEnd[0] - RefStart[0];
39 Goal[1] = RefEnd[1] - RefStart[1];
40 Goal[2] = RefEnd[2] - RefStart[2];
41 cfnewp(Charge, ParOld, &Goal[0], &Way, ParNew, closePoint);
42 if (CovOld !=
nullptr)
43 cferpr(Charge, ParOld, &Goal[0], Way, CovOld, CovNew);
46 double vBx, vBy, vBz, vBzn;
51 double Corr = vBzn / vBz;
53 if (CovOld !=
nullptr) {
58 CovNew[14] *= Corr * Corr;
66 void PropagateRKM(
long int Charge,
double *ParOld,
double *CovOld,
67 double *RefStart,
double *RefEnd,
double *ParNew,
70 double closePoint[3], Goal[3];
71 Goal[0] = RefEnd[0] - RefStart[0];
72 Goal[1] = RefEnd[1] - RefStart[1];
73 Goal[2] = RefEnd[2] - RefStart[2];
74 cfnewp(Charge, ParOld, &Goal[0], &Way, ParNew, closePoint);
75 if (CovOld !=
nullptr)
76 cferpr(Charge, ParOld, &Goal[0], Way, CovOld, CovNew);
79 cfnewpm(ParOld, RefStart, RefEnd, Way, ParNew, closePoint, CONTROL);
83 double vBx, vBy, vBz, vBzn;
88 double Corr = vBzn / vBz;
90 if (CovOld !=
nullptr) {
95 CovNew[14] *= Corr * Corr;
128 double *CovOld,
double *RefOld,
double *RefNew,
129 double *ParNew,
double *CovNew,
131 if (RefOld[0] == RefNew[0] && RefOld[1] == RefNew[1] &&
132 RefOld[2] == RefNew[2]) {
134 if (CovOld !=
nullptr) {
142 if (FitControl ==
nullptr ||
148 PropagateRKM(Charge, ParOld, CovOld, RefOld, RefNew, ParNew, CovNew,
151 PropagateSTD(TrkID, Charge, ParOld, CovOld, RefOld, RefNew, ParNew,
160 PropagateSTD(TrkID, Charge, ParOld, CovOld, RefOld, RefNew, ParNew,
164 RefNew, ParNew, CovNew,
166 if (ParNew[0] == 0. && ParNew[1] == 0. && ParNew[2] == 0. &&
167 ParNew[3] == 0. && ParNew[4] == 0.) {
168 PropagateRKM(Charge, ParOld, CovOld, RefOld, RefNew, ParNew, CovNew,
176 FitControl->
vk_funcProp(TrkID, Charge, ParOld, CovOld, RefOld, RefNew,
184 double *ParNew,
double *CovNew,
186 if (RefOld[0] == RefNew[0] && RefOld[1] == RefNew[1] &&
187 RefOld[2] == RefNew[2]) {
192 long int TrkID = trk->
Id;
193 long int Charge = trk->
Charge;
197 if (FitControl ==
nullptr ||
206 ParNew, CovNew, FitControl);
214 ParNew, CovNew, FitControl);
217 trk->
refCovar, RefOld, RefNew, ParNew,
219 if (ParNew[0] == 0. && ParNew[1] == 0. && ParNew[2] == 0. &&
220 ParNew[3] == 0. && ParNew[4] == 0.) {
222 ParNew, CovNew, FitControl);
230 RefNew, ParNew, CovNew);