File indexing completed on 2025-08-06 08:09:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/GenericBoundTrackParameters.hpp"
0012 #include "Acts/EventData/TrackParametersConcept.hpp"
0013 #include "Acts/Surfaces/CurvilinearSurface.hpp"
0014
0015 namespace Acts {
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 template <typename particle_hypothesis_t>
0028 class GenericCurvilinearTrackParameters
0029 : public GenericBoundTrackParameters<particle_hypothesis_t> {
0030 using Base = GenericBoundTrackParameters<particle_hypothesis_t>;
0031
0032 public:
0033 using Scalar = ActsScalar;
0034 using ParametersVector = BoundVector;
0035 using CovarianceMatrix = BoundSquareMatrix;
0036 using ParticleHypothesis = particle_hypothesis_t;
0037
0038
0039
0040
0041
0042
0043
0044
0045 GenericCurvilinearTrackParameters(const Vector4& pos4, const Vector3& dir,
0046 Scalar qOverP,
0047 std::optional<CovarianceMatrix> cov,
0048 ParticleHypothesis particleHypothesis)
0049 : Base(CurvilinearSurface(pos4.segment<3>(ePos0), dir).surface(),
0050 transformFreeToCurvilinearParameters(pos4[eTime], dir, qOverP),
0051 std::move(cov), std::move(particleHypothesis)) {}
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 GenericCurvilinearTrackParameters(const Vector4& pos4, Scalar phi,
0062 Scalar theta, Scalar qOverP,
0063 std::optional<CovarianceMatrix> cov,
0064 ParticleHypothesis particleHypothesis)
0065 : Base(CurvilinearSurface(pos4.segment<3>(ePos0),
0066 makeDirectionFromPhiTheta(phi, theta))
0067 .surface(),
0068 transformFreeToCurvilinearParameters(pos4[eTime], phi, theta,
0069 qOverP),
0070 std::move(cov), std::move(particleHypothesis)) {}
0071
0072
0073 template <typename other_particle_hypothesis_t>
0074 GenericCurvilinearTrackParameters(
0075 const GenericCurvilinearTrackParameters<other_particle_hypothesis_t>&
0076 other)
0077 : GenericCurvilinearTrackParameters(other.fourPosition(),
0078 other.particleHypothesis(),
0079 other.covariance()) {}
0080
0081
0082 template <typename other_track_parameter_t>
0083 static GenericCurvilinearTrackParameters create(
0084 const other_track_parameter_t& other) {
0085 static_assert(
0086 Concepts::BoundTrackParametersConcept<other_track_parameter_t>);
0087
0088 return GenericCurvilinearTrackParameters(
0089 other.fourPosition(), other.particleHypothesis(), other.covariance());
0090 }
0091
0092
0093 GenericCurvilinearTrackParameters() = delete;
0094 GenericCurvilinearTrackParameters(const GenericCurvilinearTrackParameters&) =
0095 default;
0096 GenericCurvilinearTrackParameters(GenericCurvilinearTrackParameters&&) =
0097 default;
0098 ~GenericCurvilinearTrackParameters() = default;
0099 GenericCurvilinearTrackParameters& operator=(
0100 const GenericCurvilinearTrackParameters&) = default;
0101 GenericCurvilinearTrackParameters& operator=(
0102 GenericCurvilinearTrackParameters&&) = default;
0103
0104 using GenericBoundTrackParameters<ParticleHypothesis>::fourPosition;
0105 using GenericBoundTrackParameters<ParticleHypothesis>::position;
0106
0107
0108 Vector4 fourPosition() const {
0109 return GenericBoundTrackParameters<ParticleHypothesis>::fourPosition({});
0110 }
0111
0112 Vector3 position() const {
0113 return GenericBoundTrackParameters<ParticleHypothesis>::position({});
0114 }
0115 };
0116
0117 }