Skip to content

Commit df88a77

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

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
@@ -167,11 +167,12 @@ GPUdi() bool fitTrack(TrackITSInternal<NLayers>& trk,
167167
o2::track::TrackPar* linRef = nullptr)
168168
{
169169
for (int iLayer{start}; iLayer != end; iLayer += step) {
170-
if (trk.getClusterIndex(iLayer) == constants::UnusedIndex) {
170+
const int clsIdx = trk.getClusterIndex(iLayer);
171+
if (clsIdx == constants::UnusedIndex) {
171172
continue;
172173
}
173174

174-
const TrackingFrameInfo& trackingHit = ctx.tfInfos[iLayer][trk.getClusterIndex(iLayer)];
175+
const TrackingFrameInfo& trackingHit = ctx.tfInfos[iLayer][clsIdx];
175176
if (linRef) {
176177
if (!param.o2::track::TrackParCovF::rotate(trackingHit.alphaTrackingFrame, *linRef, ctx.bz)) {
177178
return false;

0 commit comments

Comments
 (0)