Skip to content

Commit cc26a6d

Browse files
committed
Clenaup configuration and track parameter handling
1 parent c179073 commit cc26a6d

12 files changed

Lines changed: 41 additions & 248 deletions

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/Configuration.h‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ struct IterationParameters {
114114
{
115115
return getMinSeedingClusters() - ClustersPerCell + 1;
116116
}
117-
int NeighboursPerRoad() const noexcept { return getNSeedingLayers() - 3; }
118-
int CellsPerRoad() const noexcept { return getNSeedingLayers() - 2; }
119-
int TrackletsPerRoad() const noexcept { return getNSeedingLayers() - 1; }
120117
IterationSteps PassFlags{IterationStep::FirstPass, IterationStep::RebuildClusterLUT};
121118
int NLayers = tracking::ITSNLayers;
122119
bool UseDiamond = false;
@@ -147,11 +144,6 @@ struct IterationParameters {
147144
bool PerPrimaryVertexProcessing = false;
148145
bool DoUPCIteration = false;
149146
bool CreateArtefactLabels{false};
150-
// Reserved compatibility storage; top/bottom followers are unused by the common tracker.
151-
float TrackFollowerNSigmaCutZ = 1.f;
152-
float TrackFollowerNSigmaCutPhi = 1.f;
153-
int TrackFollowerMaxHypotheses = 1;
154-
155147
// Track-sharing selections.
156148
bool AllowSharingFirstCluster = false;
157149
float SharedClusterMaxDeltaPhi = 0.05f; // Maximum delta phi at a shared cluster.
@@ -274,44 +266,6 @@ TrackingPlan getTrackingPlan(o2::detectors::DetID::ID detId, Type mode);
274266

275267
} // namespace TrackingMode
276268

277-
struct VertexingParameters {
278-
std::string asString() const;
279-
280-
IterationSteps PassFlags{IterationStep::FirstPass, IterationStep::ResetVertices};
281-
std::vector<float> LayerZ = {16.333f + 1, 16.333f + 1, 16.333f + 1, 42.140f + 1, 42.140f + 1, 73.745f + 1, 73.745f + 1};
282-
std::vector<float> LayerRadii = {2.33959f, 3.14076f, 3.91924f, 19.6213f, 24.5597f, 34.388f, 39.3329f};
283-
int vertPerRofThreshold = 0; // Vertices per ROF that trigger a second round.
284-
int ColBins = 1;
285-
int RowBins = 128;
286-
float zCut = -1.f;
287-
float phiCut = -1.f;
288-
float pairCut = -1.f;
289-
float clusterCut = -1.f;
290-
float coarseZWindow = -1.f;
291-
float seedDedupZCut = -1.f;
292-
float refitDedupZCut = -1.f;
293-
float duplicateZCut = -1.f;
294-
float finalSelectionZCut = -1.f;
295-
float duplicateDistance2Cut = -1.f;
296-
float tanLambdaCut = -1.f;
297-
float NSigmaCut = -1;
298-
float maxZPositionAllowed = -1.f;
299-
int clusterContributorsCut = -1;
300-
int suppressLowMultDebris = -1;
301-
int seedMemberRadiusTime = -1;
302-
int seedMemberRadiusZ = -1;
303-
int maxTrackletsPerCluster = -1;
304-
int phiSpan = -1;
305-
int zSpan = -1;
306-
bool SaveTimeBenchmarks = false;
307-
308-
bool useTruthSeeding = false; // Replace found vertices with MC events.
309-
310-
int nThreads = 1;
311-
bool PrintMemory = false; // Print allocator usage in the epilog report.
312-
size_t MaxMemory = std::numeric_limits<size_t>::max();
313-
bool DropTFUponFailure = false;
314-
};
315269

316270
} // namespace o2::itsmft
317271

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/GenericTrack.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ struct GenericTrack {
6565
struct TrackingCandidate {
6666
TrackSeed seed;
6767
GenericTrack track{};
68-
float phi{0.f};
69-
float eta{0.f};
70-
double charge{0.};
7168

7269
int getNumberOfClusters() const noexcept { return seed.getActiveLayerCount(); }
7370
int getClusterIndex(int position) const noexcept { return seed.getCluster(position); }

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/Propagator.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ class Propagator
3737
material::MaterialTraversalDirection direction,
3838
bool chi2GateEnabled, float maxChi2, float& chi2) noexcept;
3939

40-
// Compatibility chi2 for two states in the same surface convention. The
41-
// coordinate convention is selected from the states, never by the caller.
42-
static bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate,
43-
float& chi2) noexcept;
44-
4540
// Propagate in the state’s current surface convention to its target
4641
// reference coordinate. Disk transport uses helix propagation for
4742
// |bz| > 0.01f and linear transport otherwise. Both objects are unchanged

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/TrackerTraits.h‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,14 @@ class TrackerTraits
9292
bool buildTrackSeed(IterationContext& context, int cellPathId,
9393
const CellSeed& cell, TrackSeed& output) const;
9494

95+
struct RoadSeedEmission;
96+
9597
// Neighbour processing helper; it does not encode a detector layer count.
9698
template <typename InputSeed>
9799
void processNeighbours(IterationContext& context, int iteration, CellPathId startingPath,
98100
int defaultCellPathId, int startLevel, int currentLevel,
99101
const bounded_vector<InputSeed>& currentCellSeed,
100-
const bounded_vector<int>& currentCellId,
101-
const bounded_vector<int>& currentCellPathId,
102-
bounded_vector<TrackSeed>& updatedCellSeed,
103-
bounded_vector<int>& updatedCellId,
104-
bounded_vector<int>& updatedCellPathIds,
102+
bounded_vector<RoadSeedEmission>& updatedCells,
105103
const TrackingKernelParameters& params);
106104

107105
std::shared_ptr<tbb::task_arena> mTaskArena;

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/detail/SurfaceStateOperations.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ bool rotate(SurfaceTrackState& state, float targetAlpha) noexcept;
2626
bool propagate(SurfaceTrackState& state, float targetX, float bz) noexcept;
2727
bool predictedChi2(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
2828
bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
29-
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept;
3029

3130
#ifndef GPUCA_GPUCODE
3231
bool rotate(SurfaceTrackState& state, SurfaceTrackParameters& linRef, float targetAlpha, float bz) noexcept;
@@ -42,7 +41,6 @@ bool propagate(SurfaceTrackState& state, SurfaceTrackParameters& linRef,
4241
float targetZ, float bz) noexcept;
4342
bool predictedChi2(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
4443
bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
45-
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept;
4644

4745
#ifndef GPUCA_GPUCODE
4846
bool shiftReferenceToMeasurement(SurfaceTrackParameters& linRef, const SurfaceMeasurement& measurement) noexcept;

‎Detectors/ITSMFT/common/tracking/src/Configuration.cxx‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ std::string TrackingParameters::asString() const
8787
return str;
8888
}
8989

90-
std::string VertexingParameters::asString() const
91-
{
92-
std::string str = std::format("NColB:{} NRowB:{} MinVtxCont:{} SupLowMultDebris:{} MaxTrkltCls:{} ZCut:{} PhCut:{} PairCut:{} ClCut:{} SeedRad:{}x{}",
93-
ColBins, RowBins, clusterContributorsCut, suppressLowMultDebris, maxTrackletsPerCluster, zCut, phiCut, pairCut, clusterCut, seedMemberRadiusTime, seedMemberRadiusZ);
94-
if (std::numeric_limits<size_t>::max() != MaxMemory) {
95-
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / (1024.f * 1024.f * 1024.f));
96-
}
97-
return str;
98-
}
99-
10090
void resetDetectorDefaults(TrackingParameters& p, detectors::DetID::ID detId)
10191
{
10292
if (detId == detectors::DetID::ITS) {

‎Detectors/ITSMFT/common/tracking/src/Propagator.cxx‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -389,22 +389,6 @@ bool Propagator::attachMeasurement(SurfaceTrackState& state, const SurfaceDescri
389389
return true;
390390
}
391391

392-
bool Propagator::stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate,
393-
float& chi2) noexcept
394-
{
395-
if (reference.kind != candidate.kind) {
396-
return false;
397-
}
398-
if (reference.kind == SurfaceKind::Cylinder) {
399-
return detail::barrel::stateChi2(reference, candidate, chi2);
400-
}
401-
if (reference.kind == SurfaceKind::Disk) {
402-
return detail::forward::stateChi2(reference, candidate, chi2);
403-
}
404-
405-
return false;
406-
}
407-
408392
bool Propagator::propagateToReference(SurfaceTrackState& state, float targetReferenceCoordinate, float bz) noexcept
409393
{
410394
if (state.kind == SurfaceKind::Cylinder) {

‎Detectors/ITSMFT/common/tracking/src/PropagatorBarrelOperations.cxx‎

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include <cstdint>
1717

1818
#include "CommonConstants/MathConstants.h"
19-
#include "GPUROOTSMatrixFwd.h"
20-
#include <Math/SMatrix.h>
2119

2220
// Provides covariance/curvature constants for device-visible operations;
2321
// no track object is constructed here.
@@ -30,13 +28,6 @@ namespace
3028

3129
using DenseMatrix5 = float[5][5];
3230

33-
// Packed symmetric 5x5 covariance for stateChi2. MatRepSym::offset() matches
34-
// packedCovarianceIndex exactly, so the combined covariance is built directly
35-
// in packed storage.
36-
using CombinedCovariance = o2::math_utils::SMatrix<float, 5, 5, o2::math_utils::MatRepSym<float, 5>>;
37-
static_assert(o2::math_utils::MatRepSym<float, 5>::kSize == 15, "packed symmetric 5x5 representation must hold exactly 15 floats");
38-
static_assert(sizeof(CombinedCovariance) == 15 * sizeof(float), "combined covariance must occupy exactly 15 floats");
39-
4031
// sanitizeCovariance() upper bounds in (Y, Z, Snp, Tgl, Q2Pt) order. These
4132
// match the barrel limits used by Propagator::correctForMaterial().
4233
constexpr float kBarrelMaxDiagonal[5] = {o2::track::kCY2max, o2::track::kCZ2max, o2::track::kCSnp2max,
@@ -311,44 +302,6 @@ bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, flo
311302
return true;
312303
}
313304

314-
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept
315-
{
316-
if (reference.kind != SurfaceKind::Cylinder || candidate.kind != SurfaceKind::Cylinder) {
317-
return false;
318-
}
319-
if (std::abs(reference.alpha - candidate.alpha) > o2::constants::math::Epsilon) {
320-
return false;
321-
}
322-
if (std::abs(reference.referenceCoordinate - candidate.referenceCoordinate) > o2::constants::math::Epsilon) {
323-
return false;
324-
}
325-
326-
CombinedCovariance combined;
327-
float* packed = combined.Array();
328-
for (uint8_t i = 0; i < 15; ++i) {
329-
packed[i] = reference.covariance[i] + candidate.covariance[i];
330-
}
331-
if (!combined.Invert()) {
332-
return false;
333-
}
334-
335-
float diff[5];
336-
for (uint8_t i = 0; i < 5; ++i) {
337-
diff[i] = reference.parameters[i] - candidate.parameters[i];
338-
}
339-
float chi2diag = 0.f;
340-
float chi2ndiag = 0.f;
341-
for (uint8_t i = 0; i < 5; ++i) {
342-
chi2diag += diff[i] * diff[i] * packed[packedCovarianceIndex(i, i)];
343-
for (uint8_t j = 0; j < i; ++j) {
344-
chi2ndiag += diff[i] * diff[j] * packed[packedCovarianceIndex(i, j)];
345-
}
346-
}
347-
const float scratchChi2 = chi2diag + 2.f * chi2ndiag;
348-
chi2 = scratchChi2;
349-
return true;
350-
}
351-
352305
#ifndef GPUCA_GPUCODE
353306

354307
namespace

‎Detectors/ITSMFT/common/tracking/src/PropagatorForwardOperations.cxx‎

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include <limits>
1818

1919
#include "CommonConstants/MathConstants.h"
20-
#include "GPUROOTSMatrixFwd.h"
21-
#include <Math/SMatrix.h>
2220

2321
namespace o2::itsmft::tracking::detail::forward
2422
{
@@ -27,12 +25,6 @@ namespace
2725

2826
using DenseMatrix5 = float[5][5];
2927

30-
// Packed symmetric 5x5 covariance for stateChi2. MatRepSym::offset matches
31-
// packedCovarianceIndex (row*(row+1)/2+column), enabling direct construction.
32-
using CombinedCovariance = o2::math_utils::SMatrix<float, 5, 5, o2::math_utils::MatRepSym<float, 5>>;
33-
static_assert(o2::math_utils::MatRepSym<float, 5>::kSize == 15, "packed symmetric 5x5 representation must hold exactly 15 floats");
34-
static_assert(sizeof(CombinedCovariance) == 15 * sizeof(float), "combined covariance must occupy exactly 15 floats");
35-
3628
// Forward diagonals have no finite ceiling; non-negativity and correlations
3729
// are still checked.
3830
constexpr float kForwardNoRangeLimit = std::numeric_limits<float>::max();
@@ -332,42 +324,6 @@ bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, flo
332324
return true;
333325
}
334326

335-
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept
336-
{
337-
if (reference.kind != SurfaceKind::Disk || candidate.kind != SurfaceKind::Disk) {
338-
return false;
339-
}
340-
if (std::abs(reference.referenceCoordinate - candidate.referenceCoordinate) > o2::constants::math::Epsilon) {
341-
return false;
342-
}
343-
344-
CombinedCovariance combined;
345-
float* packed = combined.Array();
346-
for (uint8_t i = 0; i < 15; ++i) {
347-
packed[i] = reference.covariance[i] + candidate.covariance[i];
348-
}
349-
if (!combined.Invert()) {
350-
return false;
351-
}
352-
353-
// Use direct (unwrapped) differences of (X, Y, Phi, Tanl, InvQPt).
354-
float diff[5];
355-
for (uint8_t i = 0; i < 5; ++i) {
356-
diff[i] = reference.parameters[i] - candidate.parameters[i];
357-
}
358-
float chi2diag = 0.f;
359-
float chi2ndiag = 0.f;
360-
for (uint8_t i = 0; i < 5; ++i) {
361-
chi2diag += diff[i] * diff[i] * packed[packedCovarianceIndex(i, i)];
362-
for (uint8_t j = 0; j < i; ++j) {
363-
chi2ndiag += diff[i] * diff[j] * packed[packedCovarianceIndex(i, j)];
364-
}
365-
}
366-
const float scratchChi2 = chi2diag + 2.f * chi2ndiag;
367-
chi2 = scratchChi2;
368-
return true;
369-
}
370-
371327
#ifndef GPUCA_GPUCODE
372328

373329
namespace

0 commit comments

Comments
 (0)