17 #include <unordered_map>
21 namespace MultiTrajectoryHelpers {
37 std::unordered_map<GeometryIdentifier::Value, TrajectoryState>;
47 template <
typename source_link_t>
50 const size_t& entryIndex) {
54 trajState.
chi2Sum += state.chi2();
55 trajState.
NDF += state.calibratedSize();
56 auto typeFlags = state.typeFlags();
79 template <
typename source_link_t>
82 const size_t& entryIndex,
83 const std::vector<GeometryIdentifier::Value>& volumeIds) {
87 const auto& geoID = state.referenceSurface().geometryId();
88 const auto&
volume = geoID.volume();
90 auto it = std::find(volumeIds.begin(), volumeIds.end(),
volume);
91 if (
it == volumeIds.end()) {
95 auto& trajState = trajStateContainer[
volume];
97 trajState.chi2Sum += state.chi2();
98 trajState.NDF += state.calibratedSize();
99 auto typeFlags = state.typeFlags();
101 trajState.nMeasurements++;
103 trajState.nOutliers++;
109 return trajStateContainer;
120 template <
typename track_state_proxy_t>
122 const track_state_proxy_t& trackStateProxy) {
124 trackStateProxy.referenceSurface(),
gctx, trackStateProxy.filtered());
135 template <
typename track_state_proxy_t>
137 const track_state_proxy_t& trackStateProxy) {
139 trackStateProxy.referenceSurface(),
gctx, trackStateProxy.smoothed());