Skip to content

Commit

Permalink
adding check for empty source link recommended my code rabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Jan 15, 2025
1 parent ae8cd35 commit b5a1ded
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Examples/Algorithms/TrackFinding/src/GbtsSeedingAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,20 @@ ActsExamples::ProcessCode ActsExamples::GbtsSeedingAlgorithm::execute(
MakeGbtsSpacePoints(ctx, m_cfg.ActsGbtsMap);

for (auto sp : GbtsSpacePoints) {
ACTS_DEBUG("Gbts space points: " << " Gbts_id: " << sp.gbtsID
<< " z: " << sp.SP->z() << " r: " << sp.r()
<< " ACTS volume: "
<< sp.SP->sourceLinks()
.front()
.get<IndexSourceLink>()
.geometryId()
.volume()
<< "\n");
const auto& links = sp.SP->sourceLinks();
if (!links.empty()) {
const auto& frontLink = links.front();
if (frontLink.template has<IndexSourceLink>()) {
ACTS_DEBUG("Gbts space points: " << " Gbts_id: " << sp.gbtsID
<< " z: " << sp.SP->z() << " r: " << sp.r()
<< " ACTS volume: "
<< frontLink.template get<IndexSourceLink>()
.geometryId()
.volume()
<< "\n");
}
}
}

// this is now calling on a core algorithm
Acts::SeedFinderGbts<SimSpacePoint> finder(
m_cfg.seedFinderConfig, *m_gbtsGeo,
Expand Down

0 comments on commit b5a1ded

Please sign in to comment.