Project
Loading...
Searching...
No Matches
Propagator.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_ITSMFT_TRACKING_PROPAGATOR_H_
13#define ALICEO2_ITSMFT_TRACKING_PROPAGATOR_H_
14
15#include "GPUCommonDef.h"
16
17#ifndef GPUCA_GPUCODE
18
23
24// Descriptor-driven propagation using the material and kind resolved from
25// SurfaceDescriptor and SurfaceCatalogView.
27{
28
30{
31 public:
32 // Convert to the target descriptor's convention, then propagate, apply its
33 // material, gate the residual and update using the nonlinear seed fit.
34 // State and chi2 are committed only after complete success.
35 static bool attachMeasurement(SurfaceTrackState& state, const SurfaceDescriptor& targetSurface,
36 const SurfaceMeasurement& measurement, float bz,
38 bool chi2GateEnabled, float maxChi2, float& chi2) noexcept;
39
40 // Propagate in the state’s current surface convention to its target
41 // reference coordinate. Disk transport uses helix propagation for
42 // |bz| > 0.01f and linear transport otherwise. Both objects are unchanged
43 // on failure when a linearization reference is supplied.
44 static bool propagateToReference(SurfaceTrackState& state, float targetReferenceCoordinate, float bz) noexcept;
46 float targetReferenceCoordinate, float bz) noexcept;
47
48 // Re-express the state on the fixed target plane through its nominal point:
49 // fixed z for Disk, fixed local x and radial alpha for Cylinder. Transport
50 // the covariance with the surface-intersection Jacobian, including the
51 // direction variation in bz. A matching kind is a no-op.
52 //
53 // Preserves absCharge, PID, and all fields outside the parameter convention.
54 // Rejects tangent/unsupported directions and non-finite conversions without
55 // changing the state. Cylinder targets require an outward radial direction.
56 static bool convertKind(SurfaceTrackState& state, SurfaceKind targetKind, float bz) noexcept;
57
58 // Propagate to a measurement, converting the state to the target surface
59 // kind when needed, then applying material, the chi2 gate, and the update.
60 // State, reference, and chi2 are committed only after complete success.
61 //
62 // The incoming chi2 must be finite and non-negative. maxChi2 is validated
63 // the same way when the gate is enabled.
65 const SurfaceDescriptor& targetSurface, const SurfaceMeasurement& targetMeasurement,
66 float bz, material::MaterialTraversalDirection direction,
67 bool chi2GateEnabled, float maxChi2, float& chi2,
68 bool shiftReferenceToMeasurement) noexcept;
69
70 // Coordinate-family operations also used by the descriptor/state API.
71 static bool rotateBarrel(SurfaceTrackState& state, float targetAlpha) noexcept;
72 static bool rotateBarrel(SurfaceTrackState& state, SurfaceTrackParameters& linRef, float targetAlpha, float bz) noexcept;
73 static bool propagateBarrel(SurfaceTrackState& state, float targetX, float bz) noexcept;
74 static bool propagateBarrel(SurfaceTrackState& state, SurfaceTrackParameters& linRef, float targetX, float bz) noexcept;
75 static bool predictedChi2Barrel(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
76 static bool updateBarrel(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
77 static bool shiftReferenceToMeasurementBarrel(SurfaceTrackParameters& linRef, const SurfaceMeasurement& measurement) noexcept;
78
79 static bool propagateForward(SurfaceTrackState& state, float targetZ, float bz) noexcept;
81 float targetZ, float bz) noexcept;
82 static bool predictedChi2Forward(const SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
83 static bool updateForward(SurfaceTrackState& state, const SurfaceMeasurement& measurement, float& chi2) noexcept;
84 static bool shiftReferenceToMeasurementForward(SurfaceTrackParameters& linRef, const SurfaceMeasurement& measurement) noexcept;
85
86 private:
87 // Called only after propagation validates matching Cylinder/Disk kinds for
88 // the state and incidence reference. Select material formulas from state.kind.
89 static bool correctForMaterial(SurfaceTrackState& state, SurfaceTrackParameters& incidenceReference,
91 material::MaterialTraversalDirection direction) noexcept;
92};
93
94} // namespace o2::itsmft::tracking
95
96#endif // GPUCA_GPUCODE
97
98#endif /* ALICEO2_ITSMFT_TRACKING_PROPAGATOR_H_ */
SurfaceTrackState state
float chi2
static bool updateBarrel(SurfaceTrackState &state, const SurfaceMeasurement &measurement, float &chi2) noexcept
static bool predictedChi2Barrel(const SurfaceTrackState &state, const SurfaceMeasurement &measurement, float &chi2) noexcept
static bool convertKind(SurfaceTrackState &state, SurfaceKind targetKind, float bz) noexcept
static bool propagateToMeasurement(SurfaceTrackState &state, SurfaceTrackParameters &linRef, const SurfaceDescriptor &targetSurface, const SurfaceMeasurement &targetMeasurement, float bz, material::MaterialTraversalDirection direction, bool chi2GateEnabled, float maxChi2, float &chi2, bool shiftReferenceToMeasurement) noexcept
static bool updateForward(SurfaceTrackState &state, const SurfaceMeasurement &measurement, float &chi2) noexcept
static bool attachMeasurement(SurfaceTrackState &state, const SurfaceDescriptor &targetSurface, const SurfaceMeasurement &measurement, float bz, material::MaterialTraversalDirection direction, bool chi2GateEnabled, float maxChi2, float &chi2) noexcept
static bool shiftReferenceToMeasurementForward(SurfaceTrackParameters &linRef, const SurfaceMeasurement &measurement) noexcept
static bool propagateBarrel(SurfaceTrackState &state, float targetX, float bz) noexcept
static bool propagateForward(SurfaceTrackState &state, float targetZ, float bz) noexcept
static bool rotateBarrel(SurfaceTrackState &state, float targetAlpha) noexcept
static bool propagateToReference(SurfaceTrackState &state, float targetReferenceCoordinate, float bz) noexcept
static bool shiftReferenceToMeasurementBarrel(SurfaceTrackParameters &linRef, const SurfaceMeasurement &measurement) noexcept
static bool predictedChi2Forward(const SurfaceTrackState &state, const SurfaceMeasurement &measurement, float &chi2) noexcept