Skip to content

Commit

Permalink
return dca in fast propagator
Browse files Browse the repository at this point in the history
  • Loading branch information
noferini authored and shahor02 committed Apr 30, 2024
1 parent bac0ea0 commit 70c961f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Detectors/Base/include/DetectorsBase/Propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class PropagatorImpl
GPUd() void setNominalBz(value_type bz) { mNominalBz = bz; }
GPUd() bool hasMagFieldSet() const { return mField != nullptr; }

GPUd() void estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const;
GPUd() value_type estimateLTFast(o2::track::TrackLTIntegral& lt, const o2::track::TrackParametrization<value_type>& trc) const;
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;

#ifndef GPUCA_GPUCODE
Expand Down
6 changes: 4 additions & 2 deletions Detectors/Base/src/Propagator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ GPUd() float PropagatorImpl<value_T>::estimateLTIncrement(const o2::track::Track

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

//____________________________________________________________
Expand Down

0 comments on commit 70c961f

Please sign in to comment.