Skip to content

Commit 8da0ed2

Browse files
committed
fix in getXatLabR for straight tracks
1 parent fb592dd commit 8da0ed2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,11 +682,11 @@ GPUd() bool TrackParametrization<value_T>::getXatLabR(value_t r, value_t& x, val
682682
t += t > 0.f ? -det : det; // chose the solution requiring the smalest step
683683
} else if (dir > 0) { // go in increasing mX direction. ( t+-det > 0)
684684
if (t >= -det) {
685-
t += -det; // take minimal step giving t>0
685+
t += det; // take minimal step giving t>0
686686
} else {
687687
return false; // both solutions have negative t
688688
}
689-
} else { // go in increasing mX direction. (t+-det < 0)
689+
} else { // go in decreasing mX direction. (t+-det < 0)
690690
if (t < det) {
691691
t -= det; // take minimal step giving t<0
692692
} else {

Detectors/Base/src/Propagator.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ GPUd() void PropagatorImpl<value_T>::estimateLTFast(o2::track::TrackLTIntegral&
614614
ydca = nrm * c.yC;
615615
auto v0x = trc.getX() - c.xC, v0y = trc.getY() - c.yC, v1x = xdca - c.xC, v1y = ydca - c.yC;
616616
auto angcos = (v0x * v1x + v0y * v1y) / (c.rC * c.rC);
617-
if (std::abs(angcos) < 1.f) {
617+
if (math_utils::detail::abs<value_type>(angcos) < 1.f) {
618618
auto ang = math_utils::detail::acos<value_type>(angcos);
619619
if ((trc.getSign() > 0.f) == (mBz > 0.f)) {
620620
ang = -ang; // we need signeg angle

0 commit comments

Comments
 (0)