Skip to content

Commit

Permalink
refactor: Centralize Examples Track typedef (#1838)
Browse files Browse the repository at this point in the history
We want the examples to always write the same concrete track container to the white board
  • Loading branch information
paulgessinger authored Feb 10, 2023
1 parent 1de6551 commit 97a8458
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ class TrackFindingAlgorithm final : public BareAlgorithm {
using TrackFinderOptions =
Acts::CombinatorialKalmanFilterOptions<IndexSourceLinkAccessor::Iterator,
Acts::VectorMultiTrajectory>;
using TrackContainer =
Acts::TrackContainer<Acts::VectorTrackContainer,
Acts::VectorMultiTrajectory, std::shared_ptr>;
using TrackFinderResult =
Acts::Result<std::vector<TrackContainer::TrackProxy>>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class TrackFittingChi2Algorithm final : public BareAlgorithm {
using TrackFitterChi2Options =
Acts::Experimental::Chi2FitterOptions<Acts::VectorMultiTrajectory>;

using TrackContainer =
Acts::TrackContainer<Acts::VectorTrackContainer,
Acts::VectorMultiTrajectory, std::shared_ptr>;

using TrackFitterChi2Result = Acts::Result<TrackContainer::TrackProxy>;

/// Fit function that takes the above parameters and runs a fit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Acts/TrackFitting/GainMatrixSmoother.hpp"
#include "Acts/TrackFitting/GainMatrixUpdater.hpp"
#include "Acts/Utilities/Helpers.hpp"
#include "ActsExamples/EventData/Track.hpp"
#include "ActsExamples/MagneticField/MagneticField.hpp"
#include "ActsExamples/TrackFittingChi2/TrackFittingChi2Algorithm.hpp"

Expand All @@ -37,8 +38,7 @@ struct TrackFitterChi2FunctionImpl
const ActsExamples::TrackParameters& initialParameters,
const ActsExamples::TrackFittingChi2Algorithm::TrackFitterChi2Options&
options,
ActsExamples::TrackFittingChi2Algorithm::TrackContainer& trackContainer)
const override {
ActsExamples::TrackContainer& trackContainer) const override {
return trackFitterChi2.fit(sourceLinks.begin(), sourceLinks.end(),
initialParameters, options, trackContainer);
};
Expand Down
7 changes: 7 additions & 0 deletions Examples/Framework/include/ActsExamples/EventData/Track.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

#pragma once

#include "Acts/EventData/Track.hpp"
#include "Acts/EventData/TrackParameters.hpp"
#include "Acts/EventData/VectorMultiTrajectory.hpp"
#include "Acts/EventData/VectorTrackContainer.hpp"

#include <vector>

Expand All @@ -19,4 +22,8 @@ using TrackParameters = ::Acts::BoundTrackParameters;
/// Container of reconstructed track states for multiple tracks.
using TrackParametersContainer = std::vector<TrackParameters>;

using TrackContainer =
Acts::TrackContainer<Acts::VectorTrackContainer,
Acts::VectorMultiTrajectory, std::shared_ptr>;

} // namespace ActsExamples

0 comments on commit 97a8458

Please sign in to comment.