40 #include <tbb/combinable.h>
43 class MagneticFieldProvider;
47 namespace ActsExamples {
48 struct AlgorithmContext;
77 std::shared_ptr<const Acts::MagneticFieldProvider>
magneticField,
121 template <
typename source_link_accessor_container_t>
132 "InputMeasurements"};
134 this,
"InputSourceLinks"};
137 this,
"InputInitialTrackParameters"};
144 mutable tbb::combinable<Acts::VectorMultiTrajectory::Statistics>
146 auto mtj = std::make_shared<Acts::VectorMultiTrajectory>();
147 return mtj->statistics();
153 template <
typename source_link_accessor_container_t>
155 const source_link_accessor_container_t& sourceLinks,
161 std::vector<std::size_t> firstTrackOnTheHit(
162 sourceLinks.size(), std::numeric_limits<std::size_t>::max());
163 std::vector<std::size_t> firstStateOnTheHit(
164 sourceLinks.size(), std::numeric_limits<std::size_t>::max());
166 for (
auto track : tracks) {
167 for (
auto state : track.trackStatesReversed()) {
172 std::size_t hitIndex =
state.getUncalibratedSourceLink()
173 .template get<IndexSourceLink>()
177 if (firstTrackOnTheHit.at(hitIndex) ==
178 std::numeric_limits<std::size_t>::max()) {
179 firstTrackOnTheHit.at(hitIndex) = track.index();
180 firstStateOnTheHit.at(hitIndex) =
state.index();
186 int indexFirstTrack = firstTrackOnTheHit.at(hitIndex);
187 int indexFirstState = firstStateOnTheHit.at(hitIndex);
189 auto firstState = tracks.getTrack(indexFirstTrack)
191 .trackStateContainer()
192 .getTrackState(indexFirstState);
193 if (not firstState.typeFlags().test(