Skip to content

Commit 33f8ab7

Browse files
committed
getCircleParams treats as straight track with too small sagitta
If sagitta of between the beam-line and the middle of the TPC is <0.01cm, treat the track as straight line instead of circle in XY.
1 parent d85ec04 commit 33f8ab7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • DataFormats/Reconstruction/include/ReconstructionDataFormats

‎DataFormats/Reconstruction/include/ReconstructionDataFormats/Track.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ inline void TrackPar::getCircleParamsLoc(float bz, o2::utils::CircleXY& c) const
348348
{
349349
// get circle params in track local frame, for straight line just set to local coordinates
350350
c.rC = getCurvature(bz);
351-
if (std::abs(c.rC) > o2::constants::math::Almost0) {
351+
// treat as straight track if sagitta between the vertex and middle of TPC is below 0.01 cm
352+
constexpr float MinSagitta = 0.01, TPCMidR = 160., MinCurv = 8 * MinSagitta / (TPCMidR * TPCMidR);
353+
if (std::abs(c.rC) > MinCurv) {
352354
c.rC = 1.f / getCurvature(bz);
353355
float sn = getSnp(), cs = sqrtf((1. - sn) * (1. + sn));
354356
c.xC = getX() - sn * c.rC; // center in tracking

0 commit comments

Comments
 (0)