File indexing completed on 2025-08-05 08:09:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/Common.hpp"
0013 #include "Acts/Definitions/Direction.hpp"
0014 #include "Acts/Geometry/GeometryIdentifier.hpp"
0015 #include "Acts/Propagator/ConstrainedStep.hpp"
0016 #include "Acts/Propagator/Propagator.hpp"
0017 #include "Acts/Surfaces/Surface.hpp"
0018 #include "Acts/Utilities/Logger.hpp"
0019
0020 #include <memory>
0021 #include <vector>
0022
0023 namespace Acts {
0024
0025 class Surface;
0026
0027 namespace detail {
0028
0029
0030
0031
0032
0033
0034 struct Step {
0035 ConstrainedStep stepSize;
0036 Direction navDir;
0037 Vector3 position = Vector3(0., 0., 0.);
0038 Vector3 momentum = Vector3(0., 0., 0.);
0039 std::shared_ptr<const Surface> surface = nullptr;
0040 GeometryIdentifier geoID = 0;
0041 };
0042
0043
0044
0045
0046 struct SteppingLogger {
0047
0048 struct this_result {
0049 std::vector<Step> steps;
0050 };
0051
0052 using result_type = this_result;
0053
0054
0055 bool sterile = false;
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 template <typename propagator_state_t, typename stepper_t,
0068 typename navigator_t>
0069 void operator()(propagator_state_t& state, const stepper_t& stepper,
0070 const navigator_t& navigator, result_type& result,
0071 const Logger& ) const {
0072
0073 if (sterile || state.stage == PropagatorStage::postPropagation) {
0074 return;
0075 }
0076
0077
0078 Step step;
0079 step.stepSize = state.stepping.stepSize;
0080 step.navDir = state.options.direction;
0081 step.position = stepper.position(state.stepping);
0082 step.momentum = stepper.momentum(state.stepping);
0083
0084
0085 if (navigator.currentSurface(state.navigation) != nullptr) {
0086 step.surface = navigator.currentSurface(state.navigation)->getSharedPtr();
0087 step.geoID = step.surface->geometryId();
0088 } else if (navigator.currentVolume(state.navigation) != nullptr) {
0089
0090 step.geoID = navigator.currentVolume(state.navigation)->geometryId();
0091 }
0092 result.steps.push_back(std::move(step));
0093 }
0094 };
0095
0096 }
0097 }