Skip to content

Commit

Permalink
pr feedback; cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Apr 5, 2024
1 parent 87b9e5f commit b1de25d
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute(

auto& firstTracksForSeed = firstResult.value();
for (auto& firstTrack : firstTracksForSeed) {
// TODO select track

auto firstSmoothingResult =
Acts::smoothTrack(ctx.geoContext, firstTrack, logger());
if (!firstSmoothingResult.ok()) {
Expand Down Expand Up @@ -234,10 +232,13 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute(

auto& secondTracksForSeed = secondResult.value();
for (auto& secondTrack : secondTracksForSeed) {
// TODO select track
if (secondTrack.nTrackStates() < 2) {
continue;
}
if (!secondTrack.hasReferenceSurface()) {
ACTS_WARNING("Second track has no reference surface");
continue;
}

secondTrack.reverseTrackStates(true);
seedNumber(secondTrack) = nSeed - 1;
Expand All @@ -249,22 +250,6 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute(

Acts::calculateTrackQuantities(secondTrack);

// TODO this extrapolation should not be necessary as the CKF will
// target this surface anyway and could communicate the parameters
auto secondExtrapolationResult =
Acts::extrapolateTrackToReferenceSurface(
secondTrack, *pSurface, extrapolator,
extrapolationOptions, m_cfg.extrapolationStrategy,
logger());
if (!secondExtrapolationResult.ok()) {
m_nFailedExtrapolation++;
ACTS_ERROR("Second extrapolation for seed "
<< iSeed << " and track " << secondTrack.index()
<< " failed with error "
<< secondExtrapolationResult.error());
continue;
}

if (!m_trackSelector.has_value() ||
m_trackSelector->isValidTrack(secondTrack)) {
auto destProxy = tracks.makeTrack();
Expand Down

0 comments on commit b1de25d

Please sign in to comment.