diff --git a/Core/include/Acts/Vertexing/GaussianTrackDensity.hpp b/Core/include/Acts/Vertexing/GaussianTrackDensity.hpp index f30d03b789d8427b0e9d2e0fdcafeb4b673eee1e..6ac751d13f3851bfe2b0cdf590b59fe7b1d3efe8 100644 --- a/Core/include/Acts/Vertexing/GaussianTrackDensity.hpp +++ b/Core/include/Acts/Vertexing/GaussianTrackDensity.hpp @@ -50,9 +50,8 @@ class GaussianTrackDensity { /// @param state The GaussianTrackDensity state /// /// @return The z position of the maximum - double globalMaximum( - const std::vector<const Acts::BoundParameters>& trackList, - State& state) const; + double globalMaximum(const std::vector<Acts::BoundParameters>& trackList, + State& state) const; /// @brief Calculates the global maximum with width /// @@ -61,8 +60,7 @@ class GaussianTrackDensity { /// /// @return The z position of the maximum and its width std::pair<double, double> globalMaximumWithWidth( - const std::vector<const Acts::BoundParameters>& trackList, - State& state) const; + const std::vector<Acts::BoundParameters>& trackList, State& state) const; private: /// The configuration @@ -72,7 +70,7 @@ class GaussianTrackDensity { /// /// @param trackList The list of tracks /// @param state The GaussianTrackDensity state - void addTracks(const std::vector<const Acts::BoundParameters>& trackList, + void addTracks(const std::vector<Acts::BoundParameters>& trackList, State& state) const; }; } // namespace Acts diff --git a/Core/include/Acts/Vertexing/TrackDensity.hpp b/Core/include/Acts/Vertexing/TrackDensity.hpp index 574439ec52dcc95e7f859612c766590d3dc2206a..ad6d08cbeaf31fd883a692538bbc5dde995e797a 100644 --- a/Core/include/Acts/Vertexing/TrackDensity.hpp +++ b/Core/include/Acts/Vertexing/TrackDensity.hpp @@ -66,9 +66,9 @@ class TrackDensity { } }; - using TrackMap = std::map<BoundParameters, TrackEntry, predPerigee>; - using LowerMap = std::map<TrackEntry, BoundParameters, predEntryByMax>; - using UpperMap = std::map<TrackEntry, BoundParameters, predEntryByMin>; + using TrackMap = std::map<const BoundParameters, TrackEntry, predPerigee>; + using LowerMap = std::map<TrackEntry, const BoundParameters, predEntryByMax>; + using UpperMap = std::map<TrackEntry, const BoundParameters, predEntryByMin>; /// @brief The Config struct struct Config { @@ -82,7 +82,7 @@ class TrackDensity { double maxZRange = 0; // Maps to cache track information - std::set<BoundParameters, predPerigee> trackSet; + std::set<const BoundParameters, predPerigee> trackSet; LowerMap lowerMap; UpperMap upperMap; }; diff --git a/Core/include/Acts/Vertexing/TrackDensityVertexFinder.ipp b/Core/include/Acts/Vertexing/TrackDensityVertexFinder.ipp index d2e957f298c2330cfad55acc1cc067a1c9cfa023..ed26c5631246d27c29b91db7e21eb06bf8a19c13 100644 --- a/Core/include/Acts/Vertexing/TrackDensityVertexFinder.ipp +++ b/Core/include/Acts/Vertexing/TrackDensityVertexFinder.ipp @@ -13,7 +13,7 @@ auto Acts::TrackDensityVertexFinder<vfitter_t, track_density_t>::find( -> Result<std::vector<Vertex<InputTrack_t>>> { typename track_density_t::State densityState; - std::vector<const BoundParameters> trackList; + std::vector<BoundParameters> trackList; trackList.reserve(trackVector.size()); for (const auto& trk : trackVector) { diff --git a/Core/src/Vertexing/GaussianTrackDensity.cpp b/Core/src/Vertexing/GaussianTrackDensity.cpp index b36a85c37ddedca57128dd52ad6a6458715c61b1..44a080f9c945637531fdc0fb680df28c34058f2a 100644 --- a/Core/src/Vertexing/GaussianTrackDensity.cpp +++ b/Core/src/Vertexing/GaussianTrackDensity.cpp @@ -9,22 +9,19 @@ #include "Acts/Vertexing/GaussianTrackDensity.hpp" double Acts::GaussianTrackDensity::globalMaximum( - const std::vector<const Acts::BoundParameters>& trackList, - State& state) const { + const std::vector<Acts::BoundParameters>& trackList, State& state) const { addTracks(trackList, state); return state.trackDensity.globalMaximum(state.trackDensityState); } std::pair<double, double> Acts::GaussianTrackDensity::globalMaximumWithWidth( - const std::vector<const Acts::BoundParameters>& trackList, - State& state) const { + const std::vector<Acts::BoundParameters>& trackList, State& state) const { addTracks(trackList, state); return state.trackDensity.globalMaximumWithWidth(state.trackDensityState); } void Acts::GaussianTrackDensity::addTracks( - const std::vector<const Acts::BoundParameters>& trackList, - State& state) const { + const std::vector<Acts::BoundParameters>& trackList, State& state) const { const double d0SignificanceCut = m_cfg.d0MaxSignificance * m_cfg.d0MaxSignificance; const double z0SignificanceCut =