Skip to content

Commit da414ee

Browse files
committed
Start migration of propagation bits into Propagator
1 parent 122c0d8 commit da414ee

14 files changed

Lines changed: 229 additions & 580 deletions

‎Detectors/ITSMFT/common/tracking/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ o2_add_library(ITSMFTTracking
3636
src/PropagatorBarrelOperations.cxx
3737
src/PropagatorForwardOperations.cxx
3838
src/MaterialPhysics.cxx
39-
src/FamilyMaterialOperations.cxx
4039
src/IndexTableConfiguration.cxx
4140
src/TraversalTopology.cxx
4241
src/Tracker.cxx

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ struct IntegratedMaterialBudget {
3636
float arealDensityGPerCm2; ///< crossed length*density, g/cm^2
3737
};
3838

39-
// Detector-neutral, PID/absCharge-aware scalar material-physics kernel.
39+
// Scalar material-physics kernel for charged particles.
4040
// pid supplies the mass; absCharge supplies |q| for energy-loss and
41-
// scattering scale factors. It need not equal PID::getCharge(). For
42-
// absCharge == 0, validation still runs, then the operation succeeds with
43-
// unchanged momentum and zero material effects.
41+
// scattering scale factors. absCharge must be nonzero and need not equal
42+
// PID::getCharge().
4443
//
4544
// Validation precedence (first failure wins): invalid direction, negative
4645
// material, non-positive momentum, invalid PID, then a charged massless PID.

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ class Propagator
7171
float bz, material::MaterialTraversalDirection direction,
7272
bool chi2GateEnabled, float maxChi2, float& chi2,
7373
bool shiftReferenceToMeasurement) noexcept;
74+
75+
private:
76+
// Called only after propagation validates matching Cylinder/Disk kinds for
77+
// the state and incidence reference. Select material formulas from state.kind.
78+
static bool correctForMaterial(SurfaceTrackState& state, SurfaceTrackParameters& incidenceReference,
79+
material::IntegratedMaterialBudget materialBudget,
80+
material::MaterialTraversalDirection direction) noexcept;
7481
};
7582

7683
} // namespace o2::itsmft::tracking

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

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ namespace o2::itsmft::tracking
2828
// Barrel: (Y, Z, Snp, Tgl, Q2Pt), referenceCoordinate is local X, alpha is frame angle.
2929
// Forward: (X, Y, Phi, Tgl, Q2Pt), referenceCoordinate is global Z, alpha is unused (zero).
3030

31-
// Fitted surface state. The field order keeps the device-facing representation
31+
// Fitted surface state for charged particles; valid tracks have absCharge > 0.
32+
// The field order keeps the device-facing representation
3233
// compact while the parameter-only linearization state remains independent.
3334
struct SurfaceTrackState {
3435
float parameters[5]{};
@@ -40,22 +41,14 @@ struct SurfaceTrackState {
4041
uint8_t absCharge{0};
4142
o2::track::PID pid{o2::track::PID::Pion};
4243

44+
GPUhdi() float getP() const noexcept
45+
{
46+
return absCharge * std::sqrt(1.f + parameters[3] * parameters[3]) / std::abs(parameters[4]);
47+
}
48+
4349
GPUhdi() constexpr bool hasRecognizedKind() const noexcept { return isRecognizedSurfaceKind(kind); }
4450
};
4551

46-
static_assert(std::is_standard_layout_v<SurfaceTrackState>);
47-
static_assert(std::is_trivially_copyable_v<SurfaceTrackState>);
48-
static_assert(sizeof(SurfaceTrackState) == 92);
49-
static_assert(alignof(SurfaceTrackState) == 4);
50-
static_assert(offsetof(SurfaceTrackState, parameters) == 0);
51-
static_assert(offsetof(SurfaceTrackState, covariance) == 20);
52-
static_assert(offsetof(SurfaceTrackState, referenceCoordinate) == 80);
53-
static_assert(offsetof(SurfaceTrackState, alpha) == 84);
54-
static_assert(offsetof(SurfaceTrackState, kind) == 88);
55-
static_assert(offsetof(SurfaceTrackState, flags) == 89);
56-
static_assert(offsetof(SurfaceTrackState, absCharge) == 90);
57-
static_assert(offsetof(SurfaceTrackState, pid) == 91);
58-
5952
// Covariance-free surface parameters used as the propagation linearization
6053
// point paired with one SurfaceTrackState.
6154
struct SurfaceTrackParameters {
@@ -76,15 +69,6 @@ struct SurfaceTrackParameters {
7669
GPUhdi() constexpr bool hasRecognizedKind() const noexcept { return isRecognizedSurfaceKind(kind); }
7770
};
7871

79-
static_assert(std::is_standard_layout_v<SurfaceTrackParameters>);
80-
static_assert(std::is_trivially_copyable_v<SurfaceTrackParameters>);
81-
static_assert(sizeof(SurfaceTrackParameters) == 32);
82-
static_assert(alignof(SurfaceTrackParameters) == 4);
83-
static_assert(offsetof(SurfaceTrackParameters, parameters) == 0);
84-
static_assert(offsetof(SurfaceTrackParameters, referenceCoordinate) == 20);
85-
static_assert(offsetof(SurfaceTrackParameters, alpha) == 24);
86-
static_assert(offsetof(SurfaceTrackParameters, kind) == 28);
87-
8872
GPUhdi() constexpr uint8_t packedCovarianceIndex(uint8_t row, uint8_t column) noexcept
8973
{
9074
return row >= column ? row * (row + 1) / 2 + column : column * (column + 1) / 2 + row;

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifndef ALICEO2_ITSMFT_TRACKING_DETAIL_SURFACESTATEOPERATIONS_H_
1313
#define ALICEO2_ITSMFT_TRACKING_DETAIL_SURFACESTATEOPERATIONS_H_
1414

15-
#include "ITSMFTTracking/MaterialPhysics.h"
1615
#include "ITSMFTTracking/SurfaceTrackState.h"
1716
#include "ITSMFTTracking/SurfaceMeasurement.h"
1817

@@ -27,11 +26,6 @@ bool rotate(SurfaceTrackState& state, float targetAlpha) noexcept;
2726
bool propagate(SurfaceTrackState& state, float targetX, float bz) noexcept;
2827
bool predictedChi2(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
2928
bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
30-
bool correctForMaterial(SurfaceTrackState& state, material::IntegratedMaterialBudget materialBudget,
31-
material::MaterialTraversalDirection direction) noexcept;
32-
bool correctForMaterial(SurfaceTrackState& state, SurfaceTrackParameters& linRef,
33-
material::IntegratedMaterialBudget materialBudget,
34-
material::MaterialTraversalDirection direction) noexcept;
3529
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept;
3630

3731
#ifndef GPUCA_GPUCODE
@@ -48,17 +42,6 @@ bool propagate(SurfaceTrackState& state, SurfaceTrackParameters& linRef,
4842
float targetZ, float bz) noexcept;
4943
bool predictedChi2(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
5044
bool update(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
51-
constexpr float highlandTheta2(float inverseMomentum, float xOverX0) noexcept
52-
{
53-
const float theta = 0.0136f * inverseMomentum;
54-
return theta * theta * xOverX0;
55-
}
56-
bool correctForMaterial(SurfaceTrackState& state, float xOverX0) noexcept;
57-
bool correctForMaterial(SurfaceTrackState& state, material::IntegratedMaterialBudget materialBudget,
58-
material::MaterialTraversalDirection direction) noexcept;
59-
bool correctForMaterial(SurfaceTrackState& state, SurfaceTrackParameters& linRef,
60-
material::IntegratedMaterialBudget materialBudget,
61-
material::MaterialTraversalDirection direction) noexcept;
6245
bool stateChi2(const SurfaceTrackState& reference, const SurfaceTrackState& candidate, float& chi2) noexcept;
6346

6447
#ifndef GPUCA_GPUCODE

0 commit comments

Comments
 (0)