File indexing completed on 2025-01-18 09:10:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/TrackParametrization.hpp"
0013 #include "Acts/EventData/detail/CorrectedTransformationFreeToBound.hpp"
0014 #include "Acts/Propagator/ConstrainedStep.hpp"
0015 #include "Acts/Surfaces/BoundaryTolerance.hpp"
0016 #include "Acts/Surfaces/Surface.hpp"
0017 #include "Acts/Utilities/Concepts.hpp"
0018 #include "Acts/Utilities/Logger.hpp"
0019
0020 namespace Acts {
0021 namespace Concepts {
0022
0023
0024 template <typename Stepper, typename State = typename Stepper::State>
0025 concept CommonStepper = requires {
0026 typename Stepper::State;
0027 typename Stepper::Jacobian;
0028 typename Stepper::Covariance;
0029 typename Stepper::BoundState;
0030 typename Stepper::CurvilinearState;
0031
0032 requires requires(const Stepper& s, State& t) {
0033 { s.transportCovarianceToCurvilinear(t) } -> std::same_as<void>;
0034
0035 requires requires(const BoundVector& bv, const BoundSquareMatrix& bm,
0036 const Surface& sf, const double d) {
0037 { s.resetState(t, bv, bm, sf, d) } -> std::same_as<void>;
0038 };
0039
0040 requires requires(const Surface& sf, bool b,
0041 const FreeToBoundCorrection& corr) {
0042 {
0043 s.boundState(t, sf, b, corr)
0044 } -> std::same_as<Result<typename Stepper::BoundState>>;
0045 { s.transportCovarianceToBound(t, sf, corr) } -> std::same_as<void>;
0046 };
0047
0048 requires requires(bool b) {
0049 {
0050 s.curvilinearState(t, b)
0051 } -> std::same_as<typename Stepper::CurvilinearState>;
0052 };
0053
0054 requires requires(const Surface& sf, std::uint8_t ui, Direction d,
0055 const BoundaryTolerance& bt, double sc,
0056 ConstrainedStep::Type st, const Logger& l) {
0057 { s.updateSurfaceStatus(t, sf, ui, d, bt, sc, st, l) };
0058 };
0059
0060 requires requires(const ConstrainedStep::Type st) {
0061 { s.releaseStepSize(t, st) } -> std::same_as<void>;
0062
0063 requires requires(double d) {
0064 { s.updateStepSize(t, d, st) } -> std::same_as<void>;
0065 };
0066 };
0067 };
0068
0069 requires requires(const Stepper& s, const State& t) {
0070 { s.position(t) } -> std::same_as<Vector3>;
0071 { s.direction(t) } -> std::same_as<Vector3>;
0072 { s.qOverP(t) } -> std::same_as<double>;
0073 { s.absoluteMomentum(t) } -> std::same_as<double>;
0074 { s.momentum(t) } -> std::same_as<Vector3>;
0075 { s.charge(t) } -> std::same_as<double>;
0076 { s.time(t) } -> std::same_as<double>;
0077 { s.outputStepSize(t) } -> std::same_as<std::string>;
0078
0079 requires requires(const ConstrainedStep::Type st) {
0080 { s.getStepSize(t, st) } -> std::same_as<double>;
0081 };
0082 };
0083 };
0084
0085
0086 template <typename Stepper, typename State = typename Stepper::State>
0087 concept SingleStepper =
0088 CommonStepper<Stepper, State> && requires(const Stepper& s, State& t) {
0089 requires requires(const FreeVector& fv, const BoundVector& bv,
0090 const BoundSquareMatrix& bm, const Surface& sf) {
0091 { s.update(t, fv, bv, bm, sf) } -> std::same_as<void>;
0092 };
0093
0094 requires requires(const Vector3& v1, const Vector3& v2, double d1,
0095 double d2) {
0096 { s.update(t, v1, v2, d1, d2) } -> std::same_as<void>;
0097 { s.getField(t, v1) } -> std::same_as<Result<Vector3>>;
0098 };
0099 };
0100
0101
0102 template <typename Stepper, typename State = typename Stepper::State>
0103 concept MultiStepper = CommonStepper<Stepper, State> && requires {
0104
0105 typename Stepper::ComponentProxy;
0106
0107
0108
0109 typename Stepper::ConstComponentProxy;
0110
0111 requires requires(const Stepper& s, State& t) {
0112 { s.numberComponents(t) } -> std::same_as<std::size_t>;
0113 { s.clearComponents(t) } -> std::same_as<void>;
0114 { s.removeMissedComponents(t) } -> std::same_as<void>;
0115 };
0116 };
0117 }
0118
0119
0120 template <typename _Stepper, typename State = typename _Stepper::State>
0121 concept StepperConcept = Concepts::SingleStepper<_Stepper, State> ||
0122 Concepts::MultiStepper<_Stepper, State>;
0123
0124
0125 template <typename State>
0126 concept StepperStateConcept = requires(const State& t) {
0127 { t.covTransport } -> Concepts::decayed_same_as<const bool&>;
0128 { t.pathAccumulated } -> Concepts::decayed_same_as<const double&>;
0129 };
0130
0131 }