Skip to content

Commit b669bad

Browse files
committed
ITS: fix zero field seeding
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 7b78b46 commit b669bad

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,9 @@ track::TrackParCov TrackerTraits<nLayers>::buildTrackSeed(const Cluster& cluster
12781278

12791279
float snp, q2pt, q2pt2;
12801280
if (mIsZeroField) {
1281-
const float tgp = o2::gpu::CAMath::ATan2(y3 - y1, x3 - x1);
1282-
snp = sign * tgp / o2::gpu::CAMath::Sqrt(1.f + tgp * tgp);
1281+
const float dx = x3 - x1;
1282+
const float dy = y3 - y1;
1283+
snp = sign * dy / o2::gpu::CAMath::Hypot(dx, dy);
12831284
q2pt = sign / track::kMostProbablePt;
12841285
q2pt2 = 1.f;
12851286
} else {

0 commit comments

Comments
 (0)