File indexing completed on 2026-05-23 07:34:27
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 enum class ComponentMergeMethod { eMean, eMaxWeight };
0031
0032 namespace GsfConstants {
0033 constexpr std::string_view kFinalMultiComponentStateColumn =
0034 "gsf-final-multi-component-state";
0035 using FinalMultiComponentState =
0036 std::optional<MultiComponentBoundTrackParameters>;
0037 constexpr std::string_view kFwdSumMaterialXOverX0 =
0038 "gsf-fwd-sum-material-x-over-x0";
0039 constexpr std::string_view kFwdMaxMaterialXOverX0 =
0040 "gsf-fwd-max-material-x-over-x0";
0041 }
0042
0043
0044 template <typename traj_t>
0045 struct GsfExtensions {
0046
0047 using TrackStateProxy = typename traj_t::TrackStateProxy;
0048
0049 using ConstTrackStateProxy = typename traj_t::ConstTrackStateProxy;
0050
0051
0052 using Calibrator =
0053 Delegate<void(const GeometryContext &, const CalibrationContext &,
0054 const SourceLink &, TrackStateProxy)>;
0055
0056
0057 using Updater = Delegate<Result<void>(const GeometryContext &,
0058 TrackStateProxy, const Logger &)>;
0059
0060
0061 using OutlierFinder = Delegate<bool(ConstTrackStateProxy)>;
0062
0063
0064 using ComponentReducer =
0065 Delegate<void(std::vector<GsfComponent> &, std::size_t, const Surface &)>;
0066
0067
0068
0069
0070 Calibrator calibrator;
0071
0072
0073 Updater updater;
0074
0075
0076
0077 OutlierFinder outlierFinder;
0078
0079
0080 SourceLinkSurfaceAccessor surfaceAccessor;
0081
0082
0083 ComponentReducer mixtureReducer;
0084
0085
0086 GsfExtensions() {
0087 calibrator.template connect<&detail::voidFitterCalibrator<traj_t>>();
0088 updater.template connect<&detail::voidFitterUpdater<traj_t>>();
0089 outlierFinder.template connect<&detail::voidOutlierFinder<traj_t>>();
0090 surfaceAccessor.connect<&detail::voidSurfaceAccessor>();
0091 mixtureReducer
0092 .template connect<&detail::voidComponentReducer<GsfComponent>>();
0093 }
0094 };
0095
0096
0097 template <typename traj_t>
0098 struct GsfOptions {
0099
0100 std::reference_wrapper<const GeometryContext> geoContext;
0101
0102 std::reference_wrapper<const MagneticFieldContext> magFieldContext;
0103
0104 std::reference_wrapper<const CalibrationContext> calibrationContext;
0105
0106
0107 GsfExtensions<traj_t> extensions;
0108
0109
0110 PropagatorPlainOptions propagatorPlainOptions;
0111
0112
0113 const Surface *referenceSurface = nullptr;
0114
0115
0116 std::size_t maxComponents = 4;
0117
0118
0119 double weightCutoff = 1.e-4;
0120
0121
0122 bool abortOnError = false;
0123
0124
0125 bool disableAllMaterialHandling = false;
0126
0127
0128
0129
0130 double reverseFilteringCovarianceScaling = 100.0;
0131
0132
0133
0134 bool useExternalSurfaces = true;
0135
0136
0137 std::string_view finalMultiComponentStateColumn = "";
0138
0139
0140 ComponentMergeMethod componentMergeMethod = ComponentMergeMethod::eMaxWeight;
0141
0142
0143
0144
0145
0146 GsfOptions(const GeometryContext &geoCtxt,
0147 const MagneticFieldContext &magFieldCtxt,
0148 const CalibrationContext &calibCtxt)
0149 : geoContext(geoCtxt),
0150 magFieldContext(magFieldCtxt),
0151 calibrationContext(calibCtxt),
0152 propagatorPlainOptions(geoCtxt, magFieldCtxt) {}
0153 };
0154
0155
0156
0157 }