Skip to content

Commit acf74f5

Browse files
authored
Merge pull request #1178 from krasznaa/TrackEDMUnification-main-20251104
Track EDM Unification, main branch (2025.11.04.)
1 parent d668f0f commit acf74f5

File tree

118 files changed

+1655
-2015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1655
-2015
lines changed

benchmarks/cpu/toy_detector_cpu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ BENCHMARK_DEFINE_F(ToyDetectorBenchmark, CPU)(benchmark::State& state) {
8080
vecmem::get_data(params));
8181

8282
// Track fitting with KF
83-
auto track_states =
84-
host_fitting(det, field,
85-
{vecmem::get_data(track_candidates),
86-
vecmem::get_data(measurements_per_event)});
83+
auto track_states = host_fitting(
84+
det, field,
85+
traccc::edm::track_container<
86+
traccc::default_algebra>::const_data(track_candidates));
8787
}
8888
}
8989

benchmarks/cuda/toy_detector_cuda.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,13 @@ BENCHMARK_DEFINE_F(ToyDetectorBenchmark, CUDA)(benchmark::State& state) {
117117
seeds_cuda_buffer, B);
118118

119119
// Run CKF track finding
120-
traccc::edm::track_candidate_collection<
121-
traccc::default_algebra>::buffer track_candidates_cuda_buffer =
120+
auto track_candidates_cuda_buffer =
122121
device_finding(det_buffer, field, measurements_cuda_buffer,
123122
params_cuda_buffer);
124123

125124
// Run track fitting
126-
traccc::edm::track_fit_container<traccc::default_algebra>::buffer
127-
track_states_cuda_buffer = device_fitting(
128-
det_buffer, field,
129-
{track_candidates_cuda_buffer, measurements_cuda_buffer});
125+
auto track_states_cuda_buffer =
126+
device_fitting(det_buffer, field, track_candidates_cuda_buffer);
130127

131128
// Create a temporary buffer that will receive the device memory.
132129
/*auto size = track_states_cuda_buffer.headers.size();

core/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ traccc_add_library( traccc_core core TYPE SHARED
3333
"include/traccc/edm/impl/spacepoint_collection.ipp"
3434
"include/traccc/edm/seed_collection.hpp"
3535
"include/traccc/edm/impl/seed_collection.ipp"
36-
"include/traccc/edm/track_candidate_collection.hpp"
37-
"include/traccc/edm/impl/track_candidate_collection.ipp"
38-
"include/traccc/edm/track_candidate_container.hpp"
3936
"include/traccc/edm/track_state_collection.hpp"
4037
"include/traccc/edm/impl/track_state_collection.ipp"
4138
"include/traccc/edm/track_state_helpers.hpp"
4239
"include/traccc/edm/impl/track_state_helpers.ipp"
4340
"include/traccc/edm/track_fit_outcome.hpp"
44-
"include/traccc/edm/track_fit_collection.hpp"
41+
"include/traccc/edm/track_constituent_link.hpp"
42+
"include/traccc/edm/track_collection.hpp"
43+
"include/traccc/edm/impl/track_collection.ipp"
44+
"include/traccc/edm/track_container.hpp"
4545
# Magnetic field description.
4646
"include/traccc/bfield/magnetic_field_types.hpp"
4747
"include/traccc/bfield/magnetic_field.hpp"

core/include/traccc/ambiguity_resolution/greedy_ambiguity_resolution_algorithm.hpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
// Project include(s).
1111
#include "traccc/ambiguity_resolution/ambiguity_resolution_config.hpp"
1212
#include "traccc/definitions/primitives.hpp"
13-
#include "traccc/edm/track_candidate_collection.hpp"
14-
#include "traccc/edm/track_candidate_container.hpp"
13+
#include "traccc/edm/track_container.hpp"
1514
#include "traccc/utils/algorithm.hpp"
1615
#include "traccc/utils/messaging.hpp"
1716

@@ -27,8 +26,8 @@ namespace traccc::host {
2726
/// greedy approach in the sense that it will remove the track which looks "most
2827
/// duplicate/fake"
2928
class greedy_ambiguity_resolution_algorithm
30-
: public algorithm<edm::track_candidate_collection<default_algebra>::host(
31-
const edm::track_candidate_container<default_algebra>::const_view&)>,
29+
: public algorithm<edm::track_container<default_algebra>::host(
30+
const edm::track_container<default_algebra>::const_view&)>,
3231
public messaging {
3332

3433
public:
@@ -44,11 +43,11 @@ class greedy_ambiguity_resolution_algorithm
4443

4544
/// Run the algorithm
4645
///
47-
/// @param track_candidates the container of found patterns
46+
/// @param tracks the container of found patterns
4847
/// @return the container without ambiguous tracks
4948
output_type operator()(
50-
const edm::track_candidate_container<default_algebra>::const_view&
51-
track_candidates) const override;
49+
const edm::track_container<default_algebra>::const_view& tracks)
50+
const override;
5251

5352
/// Get configuration
5453
config_type& get_config() { return m_config; }

core/include/traccc/ambiguity_resolution/legacy/greedy_ambiguity_resolution_algorithm.hpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424
// Project include(s).
2525
#include "traccc/definitions/qualifiers.hpp"
26-
#include "traccc/edm/track_candidate_collection.hpp"
27-
#include "traccc/edm/track_candidate_container.hpp"
26+
#include "traccc/edm/track_container.hpp"
2827
#include "traccc/utils/algorithm.hpp"
2928
#include "traccc/utils/messaging.hpp"
3029

@@ -46,8 +45,8 @@ namespace traccc::legacy {
4645
/// shared hits / hits).
4746
/// 4) Back to square 1.
4847
class greedy_ambiguity_resolution_algorithm
49-
: public algorithm<edm::track_candidate_collection<default_algebra>::host(
50-
const edm::track_candidate_container<default_algebra>::host&)>,
48+
: public algorithm<edm::track_container<default_algebra>::host(
49+
const edm::track_container<default_algebra>::host&)>,
5150
public messaging {
5251

5352
public:
@@ -108,9 +107,8 @@ class greedy_ambiguity_resolution_algorithm
108107
///
109108
/// @param track_states the container of the fitted track parameters
110109
/// @return the container without ambiguous tracks
111-
output_type operator()(
112-
const edm::track_candidate_container<default_algebra>::host&
113-
track_states) const override;
110+
output_type operator()(const edm::track_container<default_algebra>::host&
111+
tracks) const override;
114112

115113
/// Get configuration
116114
config_t& get_config() { return _config; }
@@ -120,13 +118,12 @@ class greedy_ambiguity_resolution_algorithm
120118
/// information that will later be used to accelerate the ambiguity
121119
/// resolution.
122120
///
123-
/// @param track_states The input track container (output of the fitting
124-
/// algorithm).
121+
/// @param tracks The input track container
125122
/// @param state An empty state object which is expected to be default
126123
/// constructed.
127-
void compute_initial_state(const edm::track_candidate_container<
128-
default_algebra>::host& track_states,
129-
state_t& state) const;
124+
void compute_initial_state(
125+
const edm::track_container<default_algebra>::host& tracks,
126+
state_t& state) const;
130127

131128
/// Updates the state iteratively by evicting one track after the other
132129
/// until the final state conditions are met.

core/include/traccc/edm/impl/track_candidate_collection.ipp

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/** TRACCC library, part of the ACTS project (R&D line)
2+
*
3+
* (c) 2022-2025 CERN for the benefit of the ACTS project
4+
*
5+
* Mozilla Public License Version 2.0
6+
*/
7+
8+
#pragma once
9+
10+
namespace traccc::edm {
11+
12+
template <typename BASE>
13+
TRACCC_HOST_DEVICE void track<BASE>::reset_quality() {
14+
15+
ndf() = {};
16+
chi2() = {};
17+
pval() = {};
18+
nholes() = {};
19+
}
20+
21+
template <typename BASE>
22+
template <typename T>
23+
TRACCC_HOST_DEVICE bool track<BASE>::operator==(const track<T>& other) const {
24+
25+
return ((fit_outcome() == other.fit_outcome()) &&
26+
(params() == other.params()) && (ndf() == other.ndf()) &&
27+
(chi2() == other.chi2()) && (pval() == other.pval()) &&
28+
(nholes() == other.nholes()) &&
29+
(constituent_links() == other.constituent_links()));
30+
}
31+
32+
} // namespace traccc::edm

core/include/traccc/edm/impl/track_fit_collection.ipp

Lines changed: 0 additions & 21 deletions
This file was deleted.

core/include/traccc/edm/track_candidate_collection.hpp

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)