Skip to content

Commit 238c87c

Browse files
committed
ITS: minor cleanup
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent a1aa338 commit 238c87c

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <algorithm>
1717
#include <iterator>
1818
#include <ranges>
19+
#include <cmath>
1920
#include <type_traits>
2021

2122
#include <oneapi/tbb/blocked_range.h>
@@ -33,8 +34,6 @@
3334
#include "ITStracking/Tracklet.h"
3435
#include "ReconstructionDataFormats/Track.h"
3536

36-
using o2::base::PropagatorF;
37-
3837
namespace o2::its
3938
{
4039

@@ -896,7 +895,7 @@ bool TrackerTraits<NLayers>::fitTrack(TrackITSExt& track, int start, int end, in
896895
}
897896
nCl++;
898897
}
899-
return std::abs(track.getQ2Pt()) < maxQoverPt && track.getChi2() < chi2ndfcut * (nCl * 2 - 5);
898+
return std::abs(track.getQ2Pt()) < maxQoverPt && track.getChi2() < chi2ndfcut * (float)((nCl * 2) - 5);
900899
}
901900

902901
// create a new seed either from the existing track inner param or reseed from the edgepointd and cluster in the middle
@@ -947,17 +946,17 @@ track::TrackParCov TrackerTraits<NLayers>::buildTrackSeed(const Cluster& cluster
947946
{
948947
const float sign = reverse ? -1.f : 1.f;
949948

950-
float ca, sa;
949+
float ca = NAN, sa = NAN;
951950
o2::gpu::CAMath::SinCos(tf3.alphaTrackingFrame, sa, ca);
952951

953-
const float x1 = cluster1.xCoordinate * ca + cluster1.yCoordinate * sa;
954-
const float y1 = -cluster1.xCoordinate * sa + cluster1.yCoordinate * ca;
955-
const float x2 = cluster2.xCoordinate * ca + cluster2.yCoordinate * sa;
956-
const float y2 = -cluster2.xCoordinate * sa + cluster2.yCoordinate * ca;
952+
const float x1 = (cluster1.xCoordinate * ca) + (cluster1.yCoordinate * sa);
953+
const float y1 = (-cluster1.xCoordinate * sa) + (cluster1.yCoordinate * ca);
954+
const float x2 = (cluster2.xCoordinate * ca) + (cluster2.yCoordinate * sa);
955+
const float y2 = (-cluster2.xCoordinate * sa) + (cluster2.yCoordinate * ca);
957956
const float x3 = tf3.xTrackingFrame;
958957
const float y3 = tf3.positionTrackingFrame[0];
959958

960-
float snp, q2pt, q2pt2;
959+
float snp = NAN, q2pt = NAN, q2pt2 = NAN;
961960
if (mIsZeroField) {
962961
const float dx = x3 - x1;
963962
const float dy = y3 - y1;

0 commit comments

Comments
 (0)