Skip to content

Commit 4c316f8

Browse files
authored
Adapt tracker to work with 8 layers for ITS3 (#11234)
CI failure unrelated, merging.
1 parent fbb8769 commit 4c316f8

6 files changed

Lines changed: 30 additions & 3 deletions

File tree

Detectors/ITSMFT/ITS/tracking/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
# see if its3 4-layer tracking option is enabled
13+
option(ENABLE_ITS3_4L "Enable its3 4-layer tracking option" OFF)
14+
if (ENABLE_ITS3_4L)
15+
MESSAGE(STATUS "Enable its3 4-layer tracking option")
16+
add_definitions(-DENABLE_ITS3_4L)
17+
endif()
18+
1219
o2_add_library(ITStracking
1320
TARGETVARNAME targetName
1421
SOURCES src/ClusterLines.cxx

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class IndexTableUtils
4848
int mNzBins = 0;
4949
int mNphiBins = 0;
5050
float mInversePhiBinSize = 0.f;
51-
float mLayerZ[7] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
52-
float mInverseZBinSize[7] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
51+
float mLayerZ[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
52+
float mInverseZBinSize[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
5353
};
5454

5555
template <class T>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ class Road final
6060
}
6161

6262
private:
63+
#ifndef ENABLE_ITS3_4L
6364
int mCellIds[maxRoadSize];
65+
#else
66+
int mCellIds[maxRoadSize + 1];
67+
#endif
6468
// int mLabel;
6569
unsigned char mRoadSize;
6670
bool mIsFakeRoad;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ class TimeFrame
202202
void addTrackingFrameInfoToLayer(int layer, T&&... args);
203203
void addClusterExternalIndexToLayer(int layer, const int idx);
204204

205+
void resizeVectors(int nLayers);
206+
205207
/// Debug and printing
206208
void checkTrackletLUTs();
207209
void printROFoffsets();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ inline const int4 TrackerTraits::getBinsRect(const Cluster& currentCluster, int
136136

137137
inline void TrackerTraits::initialiseTimeFrame(const int iteration)
138138
{
139-
mTimeFrame->initialise(iteration, mTrkParams[iteration], 7);
139+
mTimeFrame->initialise(iteration, mTrkParams[iteration], mTrkParams[iteration].NLayers);
140140
setIsGPU(false);
141141
}
142142

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,20 @@ void TimeFrame::checkTrackletLUTs()
455455
}
456456
}
457457

458+
void TimeFrame::resizeVectors(int nLayers)
459+
{
460+
mMinR.resize(nLayers, 10000.);
461+
mMaxR.resize(nLayers, -1.);
462+
mClusters.resize(nLayers);
463+
mUnsortedClusters.resize(nLayers);
464+
mTrackingFrameInfo.resize(nLayers);
465+
mClusterExternalIndices.resize(nLayers);
466+
mUsedClusters.resize(nLayers);
467+
mROframesClusters.resize(nLayers, {0});
468+
mNClustersPerROF.resize(nLayers);
469+
mTrackletsIndexROf.resize(2, {0});
470+
}
471+
458472
void TimeFrame::printTrackletLUTonLayer(int i)
459473
{
460474
std::cout << "--------" << std::endl

0 commit comments

Comments
 (0)