Skip to content

Commit c2fb406

Browse files
committed
Fix: ensure exact target X assignment in track propagation
1 parent c122906 commit c2fb406

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ GPUd() bool TrackParametrization<value_T>::propagateParamTo(value_t xk, const di
291291

292292
// Calculate the track parameters
293293
t = 1.f / gpu::CAMath::Sqrt(vecLab[3] * vecLab[3] + vecLab[4] * vecLab[4]);
294-
mX = x;
294+
mX = xk;
295295
mP[kY] = y;
296296
mP[kZ] = z;
297297
mP[kSnp] = vecLab[4] * t;

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, cons
568568

569569
// Calculate the track parameters
570570
t = 1.f / gpu::CAMath::Sqrt(vecLab[3] * vecLab[3] + vecLab[4] * vecLab[4]);
571-
this->setX(x);
571+
this->setX(xk);
572572
this->setY(y);
573573
this->setZ(z);
574574
this->setSnp(vecLab[4] * t);

Detectors/Base/src/Propagator.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ GPUd() bool Propagator::PropagateToXBxByBz(o2::track::TrackParCov& track, float
163163
}
164164
dx = xToGo - track.getX();
165165
}
166+
track.setX(xToGo);
166167
return true;
167168
}
168169

@@ -221,6 +222,7 @@ GPUd() bool Propagator::PropagateToXBxByBz(o2::track::TrackPar& track, float xTo
221222
}
222223
dx = xToGo - track.getX();
223224
}
225+
track.setX(xToGo);
224226
return true;
225227
}
226228

@@ -279,6 +281,7 @@ GPUd() bool Propagator::propagateToX(o2::track::TrackParCov& track, float xToGo,
279281
}
280282
dx = xToGo - track.getX();
281283
}
284+
track.setX(xToGo);
282285
return true;
283286
}
284287

@@ -337,6 +340,7 @@ GPUd() bool Propagator::propagateToX(o2::track::TrackPar& track, float xToGo, fl
337340
}
338341
dx = xToGo - track.getX();
339342
}
343+
track.setX(xToGo);
340344
return true;
341345
}
342346

0 commit comments

Comments
 (0)