File indexing completed on 2025-01-18 09:27:52
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/TrackParametrization.hpp"
0012 #include "Acts/EventData/Measurement.hpp"
0013 #include "Acts/EventData/MeasurementHelpers.hpp"
0014 #include "Acts/EventData/MultiTrajectory.hpp"
0015 #include "Acts/EventData/TrackParameters.hpp"
0016 #include "Acts/Geometry/GeometryHierarchyMap.hpp"
0017 #include "Acts/Geometry/GeometryIdentifier.hpp"
0018 #include "Acts/TrackFinding/CombinatorialKalmanFilterError.hpp"
0019 #include "Acts/Utilities/Logger.hpp"
0020 #include "Acts/Utilities/Result.hpp"
0021 #include "Acts/Utilities/TypeTraits.hpp"
0022
0023 #include <cassert>
0024 #include <cstddef>
0025 #include <iterator>
0026 #include <limits>
0027 #include <utility>
0028 #include <vector>
0029
0030 namespace Acts {
0031
0032
0033
0034
0035
0036
0037 struct MeasurementSelectorCuts {
0038
0039 std::vector<double> etaBins{};
0040
0041 std::vector<double> chi2CutOff{15};
0042
0043 std::vector<std::size_t> numMeasurementsCutOff{1};
0044 };
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 class MeasurementSelector {
0056 public:
0057
0058
0059
0060
0061
0062 using Config = Acts::GeometryHierarchyMap<MeasurementSelectorCuts>;
0063
0064
0065
0066
0067 MeasurementSelector();
0068
0069
0070
0071
0072 explicit MeasurementSelector(const MeasurementSelectorCuts& cuts);
0073
0074
0075
0076
0077 explicit MeasurementSelector(Config config);
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089 template <typename traj_t>
0090 Result<std::pair<
0091 typename std::vector<typename traj_t::TrackStateProxy>::iterator,
0092 typename std::vector<typename traj_t::TrackStateProxy>::iterator>>
0093 select(std::vector<typename traj_t::TrackStateProxy>& candidates,
0094 bool& isOutlier, const Logger& logger) const;
0095
0096 private:
0097 template <typename traj_t, typename cut_value_t>
0098 static cut_value_t getCut(
0099 const typename traj_t::TrackStateProxy& trackState,
0100 const Acts::MeasurementSelector::Config::Iterator selector,
0101 const std::vector<cut_value_t>& cuts, const Logger& logger);
0102
0103 double calculateChi2(
0104 const double* fullCalibrated, const double* fullCalibratedCovariance,
0105 TrackStateTraits<MultiTrajectoryTraits::MeasurementSizeMax,
0106 false>::Parameters predicted,
0107 TrackStateTraits<MultiTrajectoryTraits::MeasurementSizeMax,
0108 false>::Covariance predictedCovariance,
0109 TrackStateTraits<MultiTrajectoryTraits::MeasurementSizeMax,
0110 false>::Projector projector,
0111 unsigned int calibratedSize) const;
0112
0113 Config m_config;
0114 };
0115
0116 }
0117
0118 #include "MeasurementSelector.ipp"