@@ -37,6 +37,7 @@ full_chain_algorithm::full_chain_algorithm(
3737 const spacepoint_grid_config& grid_config,
3838 const seedfilter_config& filter_config,
3939 const finding_algorithm::config_type& finding_config,
40+ const ambiguity_solving_algorithm::config_type& resolution_config,
4041 const fitting_algorithm::config_type& fitting_config,
4142 const silicon_detector_description::host& det_descr,
4243 const magnetic_field& field, host_detector_type* detector,
@@ -73,6 +74,9 @@ full_chain_algorithm::full_chain_algorithm(
7374 m_finding(finding_config,
7475 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
7576 m_stream, logger->cloneWithSuffix (" TrackFindingAlg" )),
77+ m_ambiguity_solving(
78+ resolution_config, memory_resource{*m_cached_device_mr, &m_host_mr},
79+ m_copy, m_stream, logger->cloneWithSuffix (" AmbiguityResolutionAlg" )),
7680 m_fitting(fitting_config,
7781 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
7882 m_stream, logger->cloneWithSuffix (" TrackFittingAlg" )),
@@ -81,6 +85,7 @@ full_chain_algorithm::full_chain_algorithm(
8185 m_grid_config(grid_config),
8286 m_filter_config(filter_config),
8387 m_finding_config(finding_config),
88+ m_resolution_config(resolution_config),
8489 m_fitting_config(fitting_config) {
8590
8691 // Tell the user what device is being used.
@@ -135,6 +140,10 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
135140 m_finding(parent.m_finding_config,
136141 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
137142 m_stream, parent.logger().cloneWithSuffix(" TrackFindingAlg" )),
143+ m_ambiguity_solving(
144+ parent.m_resolution_config,
145+ memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy, m_stream,
146+ parent.logger().cloneWithSuffix(" AmbiguityResolutionAlg" )),
138147 m_fitting(parent.m_fitting_config,
139148 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
140149 m_stream, parent.logger().cloneWithSuffix(" TrackFittingAlg" )),
@@ -143,6 +152,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
143152 m_grid_config(parent.m_grid_config),
144153 m_filter_config(parent.m_filter_config),
145154 m_finding_config(parent.m_finding_config),
155+ m_resolution_config(parent.m_resolution_config),
146156 m_fitting_config(parent.m_fitting_config) {
147157
148158 // Copy the detector (description) to the device.
@@ -183,9 +193,15 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()(
183193 const finding_algorithm::output_type track_candidates = m_finding (
184194 m_device_detector_view, m_field, measurements, track_params);
185195
196+ // Run the ambiguity solver (asynchronously).
197+ const ambiguity_solving_algorithm::output_type
198+ resolved_track_candidates =
199+ m_ambiguity_solving ({track_candidates, measurements});
200+
186201 // Run the track fitting (asynchronously).
187- const fitting_algorithm::output_type track_states = m_fitting (
188- m_device_detector_view, m_field, {track_candidates, measurements});
202+ const fitting_algorithm::output_type track_states =
203+ m_fitting (m_device_detector_view, m_field,
204+ {resolved_track_candidates, measurements});
189205
190206 // Copy a limited amount of result data back to the host.
191207 output_type result{&m_host_mr};
0 commit comments