Skip to content

Commit 35db565

Browse files
committed
ITS: get cluster index only once
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 94dffff commit 35db565

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ GPUdi() bool fitTrack(TrackITSInternal<NLayers>& trk,
198198
o2::track::TrackPar* linRef = nullptr)
199199
{
200200
for (int iLayer{start}; iLayer != end; iLayer += step) {
201-
if (trk.getClusterIndex(iLayer) == constants::UnusedIndex) {
201+
const int clsIdx = trk.getClusterIndex(iLayer);
202+
if (clsIdx == constants::UnusedIndex) {
202203
continue;
203204
}
204205

205-
const TrackingFrameInfo& trackingHit = ctx.tfInfos[iLayer][trk.getClusterIndex(iLayer)];
206+
const TrackingFrameInfo& trackingHit = ctx.tfInfos[iLayer][clsIdx];
206207
if (linRef) {
207208
if (!param.o2::track::TrackParCovF::rotate(trackingHit.alphaTrackingFrame, *linRef, ctx.bz)) {
208209
return false;

0 commit comments

Comments
 (0)