@@ -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, const bfield& field,
4243 host_detector_type* detector, std::unique_ptr<const traccc::Logger> logger)
@@ -72,6 +73,9 @@ full_chain_algorithm::full_chain_algorithm(
7273 m_finding(finding_config,
7374 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
7475 m_stream, logger->cloneWithSuffix (" TrackFindingAlg" )),
76+ m_ambiguity_solving(
77+ resolution_config, memory_resource{*m_cached_device_mr, &m_host_mr},
78+ m_copy, m_stream, logger->cloneWithSuffix (" AmbiguityResolutionAlg" )),
7579 m_fitting(fitting_config,
7680 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
7781 m_stream, logger->cloneWithSuffix (" TrackFittingAlg" )),
@@ -80,6 +84,7 @@ full_chain_algorithm::full_chain_algorithm(
8084 m_grid_config(grid_config),
8185 m_filter_config(filter_config),
8286 m_finding_config(finding_config),
87+ m_resolution_config(resolution_config),
8388 m_fitting_config(fitting_config) {
8489
8590 // Tell the user what device is being used.
@@ -134,6 +139,10 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
134139 m_finding(parent.m_finding_config,
135140 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
136141 m_stream, parent.logger().cloneWithSuffix(" TrackFindingAlg" )),
142+ m_ambiguity_solving(
143+ parent.m_resolution_config,
144+ memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy, m_stream,
145+ parent.logger().cloneWithSuffix(" AmbiguityResolutionAlg" )),
137146 m_fitting(parent.m_fitting_config,
138147 memory_resource{*m_cached_device_mr, &m_host_mr}, m_copy,
139148 m_stream, parent.logger().cloneWithSuffix(" TrackFittingAlg" )),
@@ -142,6 +151,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
142151 m_grid_config(parent.m_grid_config),
143152 m_filter_config(parent.m_filter_config),
144153 m_finding_config(parent.m_finding_config),
154+ m_resolution_config(parent.m_resolution_config),
145155 m_fitting_config(parent.m_fitting_config) {
146156
147157 // Copy the detector (description) to the device.
@@ -182,9 +192,15 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()(
182192 const finding_algorithm::output_type track_candidates = m_finding (
183193 m_device_detector_view, m_field, measurements, track_params);
184194
195+ // Run the ambiguity solver (asynchronously).
196+ const ambiguity_solving_algorithm::output_type
197+ resolved_track_candidates =
198+ m_ambiguity_solving ({track_candidates, measurements});
199+
185200 // Run the track fitting (asynchronously).
186- const fitting_algorithm::output_type track_states = m_fitting (
187- m_device_detector_view, m_field, {track_candidates, measurements});
201+ const fitting_algorithm::output_type track_states =
202+ m_fitting (m_device_detector_view, m_field,
203+ {resolved_track_candidates, measurements});
188204
189205 // Copy a limited amount of result data back to the host.
190206 output_type result{&m_host_mr};
0 commit comments