Skip to content

Commit

Permalink
other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Oct 2, 2024
1 parent fc0536d commit 9b37664
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
6 changes: 2 additions & 4 deletions Core/include/Acts/TrackFitting/KalmanFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "Acts/Utilities/Result.hpp"
#include "Acts/Utilities/TrackHelpers.hpp"

#include <algorithm>
#include <functional>
#include <limits>
#include <map>
Expand Down Expand Up @@ -485,9 +484,8 @@ class KalmanFitter {
result.fittedStates->applyBackwards(
result.lastMeasurementIndex, [&](auto trackState) {
auto fSurface = &trackState.referenceSurface();
if (std::ranges::none_of(
result.passedAgainSurfaces,
[=](const Surface* s) { return s == fSurface; })) {
if (!rangeContainsValue(result.passedAgainSurfaces,
fSurface)) {
// If reversed filtering missed this surface, then there is
// no smoothed parameter
trackState.unset(TrackStatePropMask::Smoothed);
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Geometry/Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Acts::Layer::compatibleSurfaces(
if (sensitive && options.resolveSensitive) {
return true;
}
// next option: it's a material surface and you want to have it
// next option: it's a material surface, and you want to have it
if (options.resolveMaterial && sf.surfaceMaterial() != nullptr) {
return true;
}
Expand Down
11 changes: 3 additions & 8 deletions Core/src/Vertexing/IterativeVertexFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ Acts::Result<void> Acts::IterativeVertexFinder::removeUsedCompatibleTracks(
}
// Find and remove track from seedTracks
auto foundSeedIter =
std::ranges::find_if(seedTracks, [&trackAtVtx](const auto& seedTrk) {
return trackAtVtx.originalParams == seedTrk;
});
std::ranges::find(seedTracks, trackAtVtx.originalParams);
if (foundSeedIter != seedTracks.end()) {
seedTracks.erase(foundSeedIter);
} else {
Expand All @@ -294,9 +292,7 @@ Acts::Result<void> Acts::IterativeVertexFinder::removeUsedCompatibleTracks(

// Find and remove track from tracksToFit
auto foundFitIter =
std::ranges::find_if(tracksToFit, [&trackAtVtx](const auto& fitTrk) {
return trackAtVtx.originalParams == fitTrk;
});
std::ranges::find(tracksToFit, trackAtVtx.originalParams);
if (foundFitIter != tracksToFit.end()) {
tracksToFit.erase(foundFitIter);
} else {
Expand Down Expand Up @@ -331,8 +327,7 @@ Acts::Result<void> Acts::IterativeVertexFinder::removeUsedCompatibleTracks(
// check if sufficiently compatible with last fitted vertex
// (quite loose constraint)
if (chi2 < m_cfg.maximumChi2cutForSeeding) {
auto foundIter = std::ranges::find_if(
seedTracks, [&trk](const auto& seedTrk) { return trk == seedTrk; });
auto foundIter = std::ranges::find(seedTracks, trk);
if (foundIter != seedTracks.end()) {
// Remove track from seed tracks
seedTracks.erase(foundIter);
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Detray/src/DetrayGeometryConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <algorithm>

#include "detray/io/frontend/detector_writer.hpp"
#include <detray/io/frontend/detector_writer.hpp>

using namespace detray;

Expand Down

0 comments on commit 9b37664

Please sign in to comment.