Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ struct IterationParameters {
{
return getMinSeedingClusters() - ClustersPerCell + 1;
}
int NeighboursPerRoad() const noexcept { return getNSeedingLayers() - 3; }
int CellsPerRoad() const noexcept { return getNSeedingLayers() - 2; }
int TrackletsPerRoad() const noexcept { return getNSeedingLayers() - 1; }
IterationSteps PassFlags{IterationStep::FirstPass, IterationStep::RebuildClusterLUT};
int NLayers = tracking::ITSNLayers;
bool UseDiamond = false;
Expand Down Expand Up @@ -147,11 +144,6 @@ struct IterationParameters {
bool PerPrimaryVertexProcessing = false;
bool DoUPCIteration = false;
bool CreateArtefactLabels{false};
// Reserved compatibility storage; top/bottom followers are unused by the common tracker.
float TrackFollowerNSigmaCutZ = 1.f;
float TrackFollowerNSigmaCutPhi = 1.f;
int TrackFollowerMaxHypotheses = 1;

// Track-sharing selections.
bool AllowSharingFirstCluster = false;
float SharedClusterMaxDeltaPhi = 0.05f; // Maximum delta phi at a shared cluster.
Expand Down Expand Up @@ -274,45 +266,6 @@ TrackingPlan getTrackingPlan(o2::detectors::DetID::ID detId, Type mode);

} // namespace TrackingMode

struct VertexingParameters {
std::string asString() const;

IterationSteps PassFlags{IterationStep::FirstPass, IterationStep::ResetVertices};
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};
std::vector<float> LayerRadii = {2.33959f, 3.14076f, 3.91924f, 19.6213f, 24.5597f, 34.388f, 39.3329f};
int vertPerRofThreshold = 0; // Vertices per ROF that trigger a second round.
int ColBins = 1;
int RowBins = 128;
float zCut = -1.f;
float phiCut = -1.f;
float pairCut = -1.f;
float clusterCut = -1.f;
float coarseZWindow = -1.f;
float seedDedupZCut = -1.f;
float refitDedupZCut = -1.f;
float duplicateZCut = -1.f;
float finalSelectionZCut = -1.f;
float duplicateDistance2Cut = -1.f;
float tanLambdaCut = -1.f;
float NSigmaCut = -1;
float maxZPositionAllowed = -1.f;
int clusterContributorsCut = -1;
int suppressLowMultDebris = -1;
int seedMemberRadiusTime = -1;
int seedMemberRadiusZ = -1;
int maxTrackletsPerCluster = -1;
int phiSpan = -1;
int zSpan = -1;
bool SaveTimeBenchmarks = false;

bool useTruthSeeding = false; // Replace found vertices with MC events.

int nThreads = 1;
bool PrintMemory = false; // Print allocator usage in the epilog report.
size_t MaxMemory = std::numeric_limits<size_t>::max();
bool DropTFUponFailure = false;
};

} // namespace o2::itsmft

namespace o2::itsmft::tracking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ struct GenericTrack {
struct TrackingCandidate {
TrackSeed seed;
GenericTrack track{};
float phi{0.f};
float eta{0.f};
double charge{0.};

int getNumberOfClusters() const noexcept { return seed.getActiveLayerCount(); }
int getClusterIndex(int position) const noexcept { return seed.getCluster(position); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ class Propagator
material::MaterialTraversalDirection direction,
bool chi2GateEnabled, float maxChi2, float& chi2) noexcept;

// Compatibility chi2 for two states in the same surface convention. The
// coordinate convention is selected from the states, never by the caller.
static bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate,
float& chi2) noexcept;

// Propagate in the state’s current surface convention to its target
// reference coordinate. Disk transport uses helix propagation for
// |bz| > 0.01f and linear transport otherwise. Both objects are unchanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,14 @@ class TrackerTraits
bool buildTrackSeed(IterationContext& context, int cellPathId,
const CellSeed& cell, TrackSeed& output) const;

struct RoadSeedEmission;

// Neighbour processing helper; it does not encode a detector layer count.
template <typename InputSeed>
void processNeighbours(IterationContext& context, int iteration, CellPathId startingPath,
int defaultCellPathId, int startLevel, int currentLevel,
const bounded_vector<InputSeed>& currentCellSeed,
const bounded_vector<int>& currentCellId,
const bounded_vector<int>& currentCellPathId,
bounded_vector<TrackSeed>& updatedCellSeed,
bounded_vector<int>& updatedCellId,
bounded_vector<int>& updatedCellPathIds,
bounded_vector<RoadSeedEmission>& updatedCells,
const TrackingKernelParameters& params);

std::shared_ptr<tbb::task_arena> mTaskArena;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ bool rotate(SurfaceTrackState& state, float targetAlpha) noexcept;
bool propagate(SurfaceTrackState& state, float targetX, float bz) noexcept;
bool predictedChi2(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept;

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

#ifndef GPUCA_GPUCODE
bool shiftReferenceToMeasurement(SurfaceTrackParameters& linRef, const SurfaceMeasurement& measurement) noexcept;
Expand Down
10 changes: 0 additions & 10 deletions Detectors/ITSMFT/common/tracking/src/Configuration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ std::string TrackingParameters::asString() const
return str;
}

std::string VertexingParameters::asString() const
{
std::string str = std::format("NColB:{} NRowB:{} MinVtxCont:{} SupLowMultDebris:{} MaxTrkltCls:{} ZCut:{} PhCut:{} PairCut:{} ClCut:{} SeedRad:{}x{}",
ColBins, RowBins, clusterContributorsCut, suppressLowMultDebris, maxTrackletsPerCluster, zCut, phiCut, pairCut, clusterCut, seedMemberRadiusTime, seedMemberRadiusZ);
if (std::numeric_limits<size_t>::max() != MaxMemory) {
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / (1024.f * 1024.f * 1024.f));
}
return str;
}

void resetDetectorDefaults(TrackingParameters& p, detectors::DetID::ID detId)
{
if (detId == detectors::DetID::ITS) {
Expand Down
16 changes: 0 additions & 16 deletions Detectors/ITSMFT/common/tracking/src/Propagator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -389,22 +389,6 @@ bool Propagator::attachMeasurement(SurfaceTrackState& state, const SurfaceDescri
return true;
}

bool Propagator::stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate,
float& chi2) noexcept
{
if (reference.kind != candidate.kind) {
return false;
}
if (reference.kind == SurfaceKind::Cylinder) {
return detail::barrel::stateChi2(reference, candidate, chi2);
}
if (reference.kind == SurfaceKind::Disk) {
return detail::forward::stateChi2(reference, candidate, chi2);
}

return false;
}

bool Propagator::propagateToReference(SurfaceTrackState& state, float targetReferenceCoordinate, float bz) noexcept
{
if (state.kind == SurfaceKind::Cylinder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <cstdint>

#include "CommonConstants/MathConstants.h"
#include "GPUROOTSMatrixFwd.h"
#include <Math/SMatrix.h>

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

using DenseMatrix5 = float[5][5];

// Packed symmetric 5x5 covariance for stateChi2. MatRepSym::offset() matches
// packedCovarianceIndex exactly, so the combined covariance is built directly
// in packed storage.
using CombinedCovariance = o2::math_utils::SMatrix<float, 5, 5, o2::math_utils::MatRepSym<float, 5>>;
static_assert(o2::math_utils::MatRepSym<float, 5>::kSize == 15, "packed symmetric 5x5 representation must hold exactly 15 floats");
static_assert(sizeof(CombinedCovariance) == 15 * sizeof(float), "combined covariance must occupy exactly 15 floats");

// sanitizeCovariance() upper bounds in (Y, Z, Snp, Tgl, Q2Pt) order. These
// match the barrel limits used by Propagator::correctForMaterial().
constexpr float kBarrelMaxDiagonal[5] = {o2::track::kCY2max, o2::track::kCZ2max, o2::track::kCSnp2max,
Expand Down Expand Up @@ -311,44 +302,6 @@ bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, flo
return true;
}

bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept
{
if (reference.kind != SurfaceKind::Cylinder || candidate.kind != SurfaceKind::Cylinder) {
return false;
}
if (std::abs(reference.alpha - candidate.alpha) > o2::constants::math::Epsilon) {
return false;
}
if (std::abs(reference.referenceCoordinate - candidate.referenceCoordinate) > o2::constants::math::Epsilon) {
return false;
}

CombinedCovariance combined;
float* packed = combined.Array();
for (uint8_t i = 0; i < 15; ++i) {
packed[i] = reference.covariance[i] + candidate.covariance[i];
}
if (!combined.Invert()) {
return false;
}

float diff[5];
for (uint8_t i = 0; i < 5; ++i) {
diff[i] = reference.parameters[i] - candidate.parameters[i];
}
float chi2diag = 0.f;
float chi2ndiag = 0.f;
for (uint8_t i = 0; i < 5; ++i) {
chi2diag += diff[i] * diff[i] * packed[packedCovarianceIndex(i, i)];
for (uint8_t j = 0; j < i; ++j) {
chi2ndiag += diff[i] * diff[j] * packed[packedCovarianceIndex(i, j)];
}
}
const float scratchChi2 = chi2diag + 2.f * chi2ndiag;
chi2 = scratchChi2;
return true;
}

#ifndef GPUCA_GPUCODE

namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <limits>

#include "CommonConstants/MathConstants.h"
#include "GPUROOTSMatrixFwd.h"
#include <Math/SMatrix.h>

namespace o2::itsmft::tracking::detail::forward
{
Expand All @@ -27,12 +25,6 @@ namespace

using DenseMatrix5 = float[5][5];

// Packed symmetric 5x5 covariance for stateChi2. MatRepSym::offset matches
// packedCovarianceIndex (row*(row+1)/2+column), enabling direct construction.
using CombinedCovariance = o2::math_utils::SMatrix<float, 5, 5, o2::math_utils::MatRepSym<float, 5>>;
static_assert(o2::math_utils::MatRepSym<float, 5>::kSize == 15, "packed symmetric 5x5 representation must hold exactly 15 floats");
static_assert(sizeof(CombinedCovariance) == 15 * sizeof(float), "combined covariance must occupy exactly 15 floats");

// Forward diagonals have no finite ceiling; non-negativity and correlations
// are still checked.
constexpr float kForwardNoRangeLimit = std::numeric_limits<float>::max();
Expand Down Expand Up @@ -332,42 +324,6 @@ bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, flo
return true;
}

bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept
{
if (reference.kind != SurfaceKind::Disk || candidate.kind != SurfaceKind::Disk) {
return false;
}
if (std::abs(reference.referenceCoordinate - candidate.referenceCoordinate) > o2::constants::math::Epsilon) {
return false;
}

CombinedCovariance combined;
float* packed = combined.Array();
for (uint8_t i = 0; i < 15; ++i) {
packed[i] = reference.covariance[i] + candidate.covariance[i];
}
if (!combined.Invert()) {
return false;
}

// Use direct (unwrapped) differences of (X, Y, Phi, Tanl, InvQPt).
float diff[5];
for (uint8_t i = 0; i < 5; ++i) {
diff[i] = reference.parameters[i] - candidate.parameters[i];
}
float chi2diag = 0.f;
float chi2ndiag = 0.f;
for (uint8_t i = 0; i < 5; ++i) {
chi2diag += diff[i] * diff[i] * packed[packedCovarianceIndex(i, i)];
for (uint8_t j = 0; j < i; ++j) {
chi2ndiag += diff[i] * diff[j] * packed[packedCovarianceIndex(i, j)];
}
}
const float scratchChi2 = chi2diag + 2.f * chi2ndiag;
chi2 = scratchChi2;
return true;
}

#ifndef GPUCA_GPUCODE

namespace
Expand Down
Loading
Loading