File indexing completed on 2026-07-26 08:21:58
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010
0011 #include "traccc/definitions/qualifiers.hpp"
0012 #include "traccc/edm/track_constituent_link.hpp"
0013 #include "traccc/edm/track_fit_outcome.hpp"
0014 #include "traccc/edm/track_parameters.hpp"
0015
0016
0017 #include <detray/definitions/algebra.hpp>
0018
0019
0020 #include <vecmem/edm/container.hpp>
0021
0022
0023 #include <ostream>
0024
0025 namespace traccc::edm {
0026
0027
0028
0029
0030
0031
0032
0033 template <typename BASE>
0034 class track : public BASE {
0035 public:
0036
0037
0038
0039
0040 using BASE::BASE;
0041
0042 using BASE::operator=;
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 TRACCC_HOST_DEVICE
0054 auto& fit_outcome() { return BASE::template get<0>(); }
0055
0056
0057
0058
0059 TRACCC_HOST_DEVICE
0060 const auto& fit_outcome() const { return BASE::template get<0>(); }
0061
0062
0063
0064
0065
0066 TRACCC_HOST_DEVICE
0067 auto& params() { return BASE::template get<1>(); }
0068
0069
0070
0071
0072 TRACCC_HOST_DEVICE
0073 const auto& params() const { return BASE::template get<1>(); }
0074
0075
0076
0077
0078
0079 TRACCC_HOST_DEVICE
0080 auto& ndf() { return BASE::template get<2>(); }
0081
0082
0083
0084
0085 TRACCC_HOST_DEVICE
0086 const auto& ndf() const { return BASE::template get<2>(); }
0087
0088
0089
0090
0091
0092 TRACCC_HOST_DEVICE
0093 auto& chi2() { return BASE::template get<3>(); }
0094
0095
0096
0097
0098 TRACCC_HOST_DEVICE
0099 const auto& chi2() const { return BASE::template get<3>(); }
0100
0101
0102
0103
0104
0105 TRACCC_HOST_DEVICE
0106 auto& pval() { return BASE::template get<4>(); }
0107
0108
0109
0110
0111 TRACCC_HOST_DEVICE
0112 const auto& pval() const { return BASE::template get<4>(); }
0113
0114
0115
0116
0117
0118 TRACCC_HOST_DEVICE
0119 auto& nholes() { return BASE::template get<5>(); }
0120
0121
0122
0123
0124 TRACCC_HOST_DEVICE
0125 const auto& nholes() const { return BASE::template get<5>(); }
0126
0127
0128
0129
0130
0131 TRACCC_HOST_DEVICE
0132 auto& constituent_links() { return BASE::template get<6>(); }
0133
0134
0135
0136
0137 TRACCC_HOST_DEVICE
0138 const auto& constituent_links() const { return BASE::template get<6>(); }
0139
0140
0141
0142
0143
0144
0145
0146 TRACCC_HOST_DEVICE
0147 void reset_quality();
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157 template <typename T>
0158 TRACCC_HOST_DEVICE bool operator==(const track<T>& other) const;
0159
0160
0161
0162 private:
0163
0164 TRACCC_HOST
0165 friend std::ostream& operator<<(std::ostream& os, const track& t) {
0166 os << "Track: [states: " << t.constituent_links().size()
0167 << ", holes: " << t.nholes() << ", chi2 sum: " << t.chi2()
0168 << ", ndf: " << t.ndf() << ", pval: " << t.pval() << ", fit res. "
0169 << fit_outcome_debug_msg{t.fit_outcome()}() << ", seed:\n " << t.params()
0170 << "\n]";
0171
0172 return os;
0173 }
0174
0175 };
0176
0177
0178
0179
0180
0181 template <detray::concepts::algebra ALGEBRA>
0182 using track_collection = vecmem::edm::container<
0183 track,
0184
0185 vecmem::edm::type::vector<track_fit_outcome>,
0186
0187 vecmem::edm::type::vector<bound_track_parameters<ALGEBRA>>,
0188
0189 vecmem::edm::type::vector<detray::dscalar<ALGEBRA>>,
0190
0191 vecmem::edm::type::vector<detray::dscalar<ALGEBRA>>,
0192
0193 vecmem::edm::type::vector<detray::dscalar<ALGEBRA>>,
0194
0195 vecmem::edm::type::vector<unsigned int>,
0196
0197 vecmem::edm::type::jagged_vector<track_constituent_link>>;
0198
0199 }
0200
0201
0202 #include "traccc/edm/impl/track_collection.ipp"