Skip to content

Commit 78001ed

Browse files
committed
ITS: adjust printing and use mask
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent c7d5958 commit 78001ed

5 files changed

Lines changed: 23 additions & 14 deletions

File tree

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ void TrackerTraitsGPU<NLayers>::findRoads(const int iteration)
309309
bounded_vector<TrackSeed<NLayers>> trackSeeds(this->getMemoryPool().get());
310310
for (int startCellTopologyId{0}; startCellTopologyId < hostTopology.nCells; ++startCellTopologyId) {
311311
const int startLayer = hostTopology.getCell(startCellTopologyId).hitLayerMask.last();
312-
if ((this->mTrkParams[iteration].StartLayerMask & (1 << startLayer)) == 0 ||
313-
mTimeFrameGPU->getNCells()[startCellTopologyId] == 0) {
312+
if (!(this->mTrkParams[iteration].StartLayerMask.has(startLayer)) || mTimeFrameGPU->getNCells()[startCellTopologyId] == 0) {
314313
continue;
315314
}
316315
processNeighboursHandler<NLayers>(startLevel,

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "CommonUtils/EnumFlags.h"
2727
#include "DetectorsBase/Propagator.h"
2828
#include "ITStracking/Constants.h"
29+
#include "ITStracking/LayerMask.h"
2930

3031
namespace o2::its
3132
{
@@ -70,10 +71,9 @@ struct TrackingParameters {
7071
float DiamondCov[6] = {25.e-6f, 0.f, 0.f, 25.e-6f, 0.f, 36.f};
7172

7273
/// General parameters
73-
int ClusterSharing = 0;
7474
int MinTrackLength = 7;
7575
int MaxHoles = 0;
76-
uint16_t HoleLayerMask = 0;
76+
LayerMask HoleLayerMask = 0;
7777
float NSigmaCut = 5;
7878
float PVres = 1.e-2f;
7979
/// Trackleting cuts
@@ -86,7 +86,7 @@ struct TrackingParameters {
8686
float MaxChi2NDF = 30.f;
8787
int ReseedIfShorter = 6; // reseed for the final fit track with the length shorter than this
8888
std::vector<float> MinPt = {0.f, 0.f, 0.f, 0.f};
89-
uint16_t StartLayerMask = 0x7F;
89+
LayerMask StartLayerMask = 0x7F;
9090
bool RepeatRefitOut = false; // repeat outward refit using inward refit as a seed
9191
bool ShiftRefToCluster = true; // TrackFit: after update shift the linearization reference to cluster
9292
bool PerPrimaryVertexProcessing = false;
@@ -103,6 +103,7 @@ struct TrackingParameters {
103103
float SharedClusterMaxDeltaPhi = 0.05f; // For tracks sharing clusters, maximum allowed delta phi at the cluster position
104104
float SharedClusterMaxDeltaEta = 0.03f; // For tracks sharing clusters, maximum allowed delta eta at the cluster position
105105
bool SharedClusterOppositeSign = false; // For tracks sharing clusters, require opposite sign of the tracklets
106+
int SharedMaxClusters = 0; // Maximal allowed shared clusters (excluding first cluster)
106107
};
107108

108109
struct VertexingParameters {

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ using namespace o2::its;
2424

2525
std::string TrackingParameters::asString() const
2626
{
27-
std::string str = std::format("NZb:{} NPhB:{} PerVtx:{} DropFail:{} ClSh:{} TtklMinPt:{:.2f} MinCl:{} MaxHoles:{} HoleMask:{:#x}",
28-
ZBins, PhiBins, PerPrimaryVertexProcessing, DropTFUponFailure, ClusterSharing, TrackletMinPt, MinTrackLength, MaxHoles, HoleLayerMask);
27+
std::string str = std::format("NZb:{} NPhB:{} PerVtx:{} DropFail:{} TtklMinPt:{:.2f} MinCl:{}", ZBins, PhiBins, PerPrimaryVertexProcessing, DropTFUponFailure, TrackletMinPt, MinTrackLength);
28+
auto isSet = [](auto e) { return e >= 0; };
29+
auto isAnySet = [&isSet](auto v) { return !v.empty() && std::any_of(v.begin(), v.end(), isSet); };
2930
bool first = true;
3031
for (int il = NLayers; il >= MinTrackLength; il--) {
3132
int slot = NLayers - il;
@@ -37,18 +38,27 @@ std::string TrackingParameters::asString() const
3738
str += std::format("L{}:{:.2f} ", il, MinPt[slot]);
3839
}
3940
}
40-
if (!SystErrorY2.empty() || !SystErrorZ2.empty()) {
41+
if (isAnySet(SystErrorY2) || isAnySet(SystErrorZ2)) {
4142
str += " SystErrY/Z:";
4243
for (size_t i = 0; i < SystErrorY2.size(); i++) {
4344
str += std::format("{:.2e}/{:.2e} ", SystErrorY2[i], SystErrorZ2[i]);
4445
}
4546
}
46-
if (!AddTimeError.empty()) {
47+
if (isAnySet(AddTimeError)) {
4748
str += " AddTimeError:";
4849
for (unsigned int i : AddTimeError) {
4950
str += std::format("{} ", i);
5051
}
5152
}
53+
if (SharedMaxClusters) {
54+
str += std::format(" ShaMaxCls:{} ", SharedMaxClusters);
55+
}
56+
if (AllowSharingFirstCluster) {
57+
str += std::format(" ShaClsDPhi:{} ShaClsDEta:{} ShaClsSign:{}", SharedClusterMaxDeltaPhi, SharedClusterMaxDeltaEta, SharedClusterOppositeSign);
58+
}
59+
if (MaxHoles) {
60+
str += std::format(" MaxHoles:{} HoleMask:{}", MaxHoles, HoleLayerMask.asString());
61+
}
5262
if (std::numeric_limits<size_t>::max() != MaxMemory) {
5363
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / constants::GB);
5464
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,7 @@ void TrackerTraits<NLayers>::findRoads(const int iteration)
681681
bounded_vector<TrackSeedN> trackSeeds(mMemoryPool.get());
682682
for (int startCellTopologyId{0}; startCellTopologyId < topology.nCells; ++startCellTopologyId) {
683683
const int startLayer = topology.getCell(startCellTopologyId).hitLayerMask.last();
684-
if ((mTrkParams[iteration].StartLayerMask & (1 << startLayer)) == 0 ||
685-
mTimeFrame->getCells()[startCellTopologyId].empty()) {
684+
if (!(mTrkParams[iteration].StartLayerMask.has(startLayer)) || mTimeFrame->getCells()[startCellTopologyId].empty()) {
686685
continue;
687686
}
688687

@@ -814,7 +813,7 @@ void TrackerTraits<NLayers>::acceptTracks(int iteration, bounded_vector<TrackITS
814813
}
815814

816815
/// do not account for the first cluster in the shared clusters number if it is allowed
817-
if (nShared - int(isFirstShared && mTrkParams[iteration].AllowSharingFirstCluster) > mTrkParams[iteration].ClusterSharing) {
816+
if (nShared - int(isFirstShared && mTrkParams[iteration].AllowSharingFirstCluster) > mTrkParams[iteration].SharedMaxClusters) {
818817
continue;
819818
}
820819

Detectors/Upgrades/ALICE3/GlobalReconstruction/workflow/src/TrackerSpec.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ std::vector<o2::its::TrackingParameters> TrackerDPL::createTrackingParamsFromCon
113113
if (paramConfig.contains("PhiBins")) {
114114
params.PhiBins = paramConfig["PhiBins"].get<int>();
115115
}
116-
if (paramConfig.contains("ClusterSharing")) {
117-
params.ClusterSharing = paramConfig["ClusterSharing"].get<int>();
116+
if (paramConfig.contains("SharedMaxClusters")) {
117+
params.SharedMaxClusters = paramConfig["SharedMaxClusters"].get<int>();
118118
}
119119
if (paramConfig.contains("MinTrackLength")) {
120120
params.MinTrackLength = paramConfig["MinTrackLength"].get<int>();

0 commit comments

Comments
 (0)