Skip to content

Commit 80d6165

Browse files
committed
ITS: TrackExtension allow steering of cuts&directions
1 parent ea6505b commit 80d6165

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,17 @@ struct TrackingParameters {
9494
unsigned long MaxMemory = 12000000000UL;
9595
float MaxChi2ClusterAttachment = 60.f;
9696
float MaxChi2NDF = 30.f;
97-
bool UseTrackFollower = false;
9897
bool FindShortTracks = false;
9998
bool PerPrimaryVertexProcessing = false;
10099
bool SaveTimeBenchmarks = false;
101100
bool DoUPCIteration = false;
101+
/// Cluster attachment
102+
bool UseTrackFollower = false;
103+
bool UseTrackFollowerTop = false;
104+
bool UseTrackFollowerBot = false;
105+
bool UseTrackFollowerMix = false;
106+
float TrackFollowerNSigmaCutZ = 1.f;
107+
float TrackFollowerNSigmaCutPhi = 1.f;
102108
};
103109

104110
inline int TrackingParameters::CellMinimumLevel()

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
7272
float diamondPos[3] = {0.f, 0.f, 0.f};
7373
bool useDiamond = false;
7474
unsigned long maxMemory = 0;
75-
int useTrackFollower = -1;
75+
int useTrackFollower = -1; // bit 0: allow mixing implies bits 1&2; bit 1: topwards; bit2: downwards; => 0 off
76+
float trackFollowerNSigmaZ = 1.f; // sigma in z-cut for track-following search rectangle
77+
float trackFollowerNSigmaPhi = 1.f; // sigma in phi-cut for track-following search rectangle
7678
float cellsPerClusterLimit = -1.f;
7779
float trackletsPerClusterLimit = -1.f;
7880
int findShortTracks = -1;

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,16 @@ void Tracker::getGlobalConfiguration()
502502
if (tc.maxMemory) {
503503
params.MaxMemory = tc.maxMemory;
504504
}
505-
if (tc.useTrackFollower >= 0) {
506-
params.UseTrackFollower = tc.useTrackFollower;
505+
if (tc.useTrackFollower > 0) {
506+
params.UseTrackFollower = true;
507+
// Bit 0: Allow for mixing of top&bot extension --> implies Bits 1&2 set
508+
// Bit 1: Allow for top extension
509+
// Bit 2: Allow for bot extension
510+
params.UseTrackFollowerMix = ((tc.useTrackFollower & (1 << 0)) != 0);
511+
params.UseTrackFollowerTop = ((tc.useTrackFollower & (1 << 1)) != 0);
512+
params.UseTrackFollowerBot = ((tc.useTrackFollower & (1 << 2)) != 0);
513+
params.TrackFollowerNSigmaCutZ = tc.trackFollowerNSigmaZ;
514+
params.TrackFollowerNSigmaCutPhi = tc.trackFollowerNSigmaPhi;
507515
}
508516
if (tc.cellsPerClusterLimit >= 0) {
509517
params.CellsPerClusterLimit = tc.cellsPerClusterLimit;

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -679,10 +679,11 @@ void TrackerTraits::extendTracks(const int iteration)
679679
for (auto& track : mTimeFrame->getTracks(rof)) {
680680
auto backup{track};
681681
bool success{false};
682-
if (track.getLastClusterLayer() != mTrkParams[iteration].NLayers - 1) {
682+
// the order here biases towards top extension, tracks should probably be fitted separately in the directions and then compared.
683+
if ((mTrkParams[iteration].UseTrackFollowerMix || mTrkParams[iteration].UseTrackFollowerTop) && track.getLastClusterLayer() != mTrkParams[iteration].NLayers - 1) {
683684
success = success || trackFollowing(&track, rof, true, iteration);
684685
}
685-
if (track.getFirstClusterLayer() != 0) {
686+
if ((mTrkParams[iteration].UseTrackFollowerMix || (mTrkParams[iteration].UseTrackFollowerBot && !success)) && track.getFirstClusterLayer() != 0) {
686687
success = success || trackFollowing(&track, rof, false, iteration);
687688
}
688689
if (success) {
@@ -888,7 +889,7 @@ bool TrackerTraits::trackFollowing(TrackITSExt* track, int rof, bool outward, co
888889
const float ePhi{o2::gpu::CAMath::Sqrt(hypoParam.getSigmaSnp2() / hypoParam.getCsp2())};
889890
const float z{hypoParam.getZ()};
890891
const float eZ{o2::gpu::CAMath::Sqrt(hypoParam.getSigmaZ2())};
891-
const int4 selectedBinsRect{getBinsRect(iLayer, phi, mTrkParams[iteration].NSigmaCut * ePhi, z, mTrkParams[iteration].NSigmaCut * eZ)};
892+
const int4 selectedBinsRect{getBinsRect(iLayer, phi, mTrkParams[iteration].TrackFollowerNSigmaCutPhi * ePhi, z, mTrkParams[iteration].TrackFollowerNSigmaCutZ * eZ)};
892893
if (selectedBinsRect.x == 0 && selectedBinsRect.y == 0 && selectedBinsRect.z == 0 && selectedBinsRect.w == 0) {
893894
continue;
894895
}
@@ -905,7 +906,6 @@ bool TrackerTraits::trackFollowing(TrackITSExt* track, int rof, bool outward, co
905906
}
906907

907908
// check all clusters in search windows for possible new hypotheses
908-
#pragma omp parallel for num_threads(mNThreads) shared(hypotheses)
909909
for (int iPhiCount = 0; iPhiCount < phiBinsNum; iPhiCount++) {
910910
int iPhiBin = (selectedBinsRect.y + iPhiCount) % mTrkParams[iteration].PhiBins;
911911
const int firstBinIndex{mTimeFrame->mIndexTableUtils.getBinIndex(selectedBinsRect.x, iPhiBin)};
@@ -946,10 +946,7 @@ bool TrackerTraits::trackFollowing(TrackITSExt* track, int rof, bool outward, co
946946
}
947947
tbupdated.setChi2(tbupdated.getChi2() + predChi2); /// This is wrong for outward propagation as the chi2 refers to inward parameters
948948
tbupdated.setExternalClusterIndex(iLayer, nextCluster.clusterId, true);
949-
#pragma omp critical
950-
{
951-
hypotheses.emplace_back(tbupdated);
952-
}
949+
hypotheses.emplace_back(tbupdated);
953950
}
954951
}
955952
}

0 commit comments

Comments
 (0)