Skip to content

Commit 70c961f

Browse files
noferinishahor02
authored andcommitted
return dca in fast propagator
1 parent bac0ea0 commit 70c961f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Detectors/Base/include/DetectorsBase/Propagator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class PropagatorImpl
136136
GPUd() void setNominalBz(value_type bz) { mNominalBz = bz; }
137137
GPUd() bool hasMagFieldSet() const { return mField != nullptr; }
138138

139-
GPUd() void estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const;
139+
GPUd() value_type estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const;
140140
GPUd() float estimateLTIncrement(const o2::track::TrackParametrization<value_type>& trc, const o2::math_utils::Point3D<value_type>& postStart, const o2::math_utils::Point3D<value_type>& posEnd) const;
141141

142142
#ifndef GPUCA_GPUCODE

Detectors/Base/src/Propagator.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ GPUd() float PropagatorImpl<value_T>::estimateLTIncrement(const o2::track::Track
668668

669669
//____________________________________________________________
670670
template <typename value_T>
671-
GPUd() void PropagatorImpl<value_T>::estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const
671+
GPUd() value_T PropagatorImpl<value_T>::estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const
672672
{
673673
value_T xdca = 0., ydca = 0., length = 0.; // , zdca = 0. // zdca might be used in future
674674
o2::math_utils::CircleXY<value_T> c;
@@ -715,8 +715,10 @@ GPUd() void PropagatorImpl<value_T>::estimateLTFast(o2::track::TrackLTIntegral&
715715
length = straigh_line_approx();
716716
}
717717
// since we assume the track or its parent comes from the beam-line or decay, add XY(?) distance to it
718-
length += math_utils::detail::sqrt<value_type>(xdca * xdca + ydca * ydca);
718+
value_T dcaT = math_utils::detail::sqrt<value_type>(xdca * xdca + ydca * ydca);
719+
length += dcaT;
719720
lt.addStep(length, trc.getP2Inv());
721+
return dcaT;
720722
}
721723

722724
//____________________________________________________________

0 commit comments

Comments
 (0)