File indexing completed on 2026-09-20 08:20:00
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/MultiComponentTrackParameters.hpp"
0012 #include "Acts/EventData/MultiTrajectory.hpp"
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0015 #include "Acts/Propagator/PropagatorOptions.hpp"
0016 #include "Acts/TrackFitting/GsfComponent.hpp"
0017 #include "Acts/TrackFitting/detail/VoidFitterComponents.hpp"
0018 #include "Acts/Utilities/CalibrationContext.hpp"
0019 #include "Acts/Utilities/Delegate.hpp"
0020 #include "Acts/Utilities/Logger.hpp"
0021
0022 namespace Acts {
0023
0024
0025
0026
0027
0028
0029
0030
0031 enum class ComponentMergeMethod { eMean, eMaxWeight };
0032
0033
0034
0035 namespace GsfConstants {
0036
0037 constexpr std::string_view kFinalMultiComponentStateColumn =
0038 "gsf-final-multi-component-state";
0039
0040 using FinalMultiComponentState =
0041 std::optional<MultiComponentBoundTrackParameters>;
0042
0043 constexpr std::string_view kFwdSumMaterialXOverX0 =
0044 "gsf-fwd-sum-material-x-over-x0";
0045
0046 constexpr std::string_view kFwdMaxMaterialXOverX0 =
0047 "gsf-fwd-max-material-x-over-x0";
0048 }
0049
0050
0051 template <typename traj_t>
0052 struct GsfExtensions {
0053
0054 using TrackStateProxy = typename traj_t::TrackStateProxy;
0055
0056 using ConstTrackStateProxy = typename traj_t::ConstTrackStateProxy;
0057
0058
0059 using Calibrator =
0060 Delegate<void(const GeometryContext &, const CalibrationContext &,
0061 const SourceLink &, TrackStateProxy)>;
0062
0063
0064 using Updater = Delegate<Result<void>(const GeometryContext &,
0065 TrackStateProxy, const Logger &)>;
0066
0067
0068 using OutlierFinder = Delegate<bool(ConstTrackStateProxy)>;
0069
0070
0071
0072 using ComponentReducer =
0073 Delegate<void(std::vector<GsfComponent> &, std::size_t, const Surface &)>;
0074
0075
0076
0077
0078
0079 Calibrator calibrator;
0080
0081
0082 Updater updater;
0083
0084
0085
0086 OutlierFinder outlierFinder;
0087
0088
0089 SourceLinkSurfaceAccessor surfaceAccessor;
0090
0091
0092 ComponentReducer mixtureReducer;
0093
0094
0095 GsfExtensions() {
0096 calibrator.template connect<&detail::voidFitterCalibrator<traj_t>>();
0097 updater.template connect<&detail::voidFitterUpdater<traj_t>>();
0098 outlierFinder.template connect<&detail::voidOutlierFinder<traj_t>>();
0099 surfaceAccessor.connect<&detail::voidSurfaceAccessor>();
0100 mixtureReducer
0101 .template connect<&detail::voidComponentReducer<GsfComponent>>();
0102 }
0103 };
0104
0105
0106 template <typename traj_t>
0107 struct GsfOptions {
0108
0109 std::reference_wrapper<const GeometryContext> geoContext;
0110
0111 std::reference_wrapper<const MagneticFieldContext> magFieldContext;
0112
0113 std::reference_wrapper<const CalibrationContext> calibrationContext;
0114
0115
0116 GsfExtensions<traj_t> extensions;
0117
0118
0119 PropagatorPlainOptions propagatorPlainOptions;
0120
0121
0122 const Surface *referenceSurface = nullptr;
0123
0124
0125 std::size_t maxComponents = 4;
0126
0127
0128 double weightCutoff = 1.e-4;
0129
0130
0131 bool abortOnError = false;
0132
0133
0134 bool disableAllMaterialHandling = false;
0135
0136
0137
0138
0139 double reverseFilteringCovarianceScaling = 100.0;
0140
0141
0142
0143 bool useExternalSurfaces = true;
0144
0145
0146 std::string_view finalMultiComponentStateColumn = "";
0147
0148
0149 ComponentMergeMethod componentMergeMethod = ComponentMergeMethod::eMaxWeight;
0150
0151
0152
0153
0154
0155 GsfOptions(const GeometryContext &geoCtxt,
0156 const MagneticFieldContext &magFieldCtxt,
0157 const CalibrationContext &calibCtxt)
0158 : geoContext(geoCtxt),
0159 magFieldContext(magFieldCtxt),
0160 calibrationContext(calibCtxt),
0161 propagatorPlainOptions(geoCtxt, magFieldCtxt) {}
0162 };
0163
0164
0165
0166 }