Skip to content

Commit

Permalink
properly works
Browse files Browse the repository at this point in the history
  • Loading branch information
cvarni committed Nov 2, 2024
1 parent 979f1e6 commit 319e1ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Core/include/Acts/Seeding/SeedFilter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ void SeedFilter<external_spacepoint_t>::filterSeeds_1SpFixed(
<< medium->index() << ", t=" << top->index()
<< "], quality=" << bestSeedQuality
<< ", vertexZ=" << zOrigin);

createAndStoreSeeds(outputCollection, *bottom, *medium, *top,
bestSeedQuality, zOrigin);
++numTotalSeeds;
}
ACTS_VERBOSE("Identified " << numTotalSeeds << " seeds");
Expand Down
23 changes: 8 additions & 15 deletions Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ auto SeedFinderOrthogonal<external_spacepoint_t>::createTree(
* linearly pass to the k-d tree constructor. That constructor will take
* care of sorting the pairs and splitting the space.
*/
for (const external_spacepoint_t sp : spacePoints) {
for (const external_spacepoint_t &sp : spacePoints) {
typename tree_t::coordinate_t point;

point[DimPhi] = sp.phi();
Expand Down Expand Up @@ -729,30 +729,23 @@ void SeedFinderOrthogonal<external_spacepoint_t>::createSeeds(
external_spacepoint_t>,
"Input container must contain external spacepoints.");

/*
* Sadly, for the time being, we will need to construct our internal space
* points on the heap. This adds some additional overhead and work. Here we
* take each external spacepoint, allocate a corresponding internal space
* point, and save it in a vector.
*/
Acts::Extent rRangeSPExtent;
std::vector<external_spacepoint_t> internal_sps;
internal_sps.reserve(spacePoints.size());

Acts::SpacePointMutableData mutableData;
mutableData.resize(spacePoints.size());

for (const external_spacepoint_t &p : spacePoints) {
// store x,y,z values in extent
rRangeSPExtent.extend({p.x(), p.y(), p.z()});
float minRange = std::numeric_limits<float>::max();
float maxRange = std::numeric_limits<float>::lowest();
for (external_spacepoint_t p : spacePoints) {
minRange = std::min(minRange, p.radius());
maxRange = std::max(maxRange, p.radius());
internal_sps.push_back(std::move(p));
}
// variable middle SP radial region of interest
const Acts::Range1D<float> rMiddleSPRange(
std::floor(rRangeSPExtent.min(Acts::BinningValue::binR) / 2) * 2 +
m_config.deltaRMiddleMinSPRange,
std::floor(rRangeSPExtent.max(Acts::BinningValue::binR) / 2) * 2 -
m_config.deltaRMiddleMaxSPRange);
std::floor(minRange / 2) * 2 + m_config.deltaRMiddleMinSPRange,
std::floor(maxRange / 2) * 2 - m_config.deltaRMiddleMaxSPRange);

/*
* Construct the k-d tree from these points. Note that this not consume or
Expand Down

0 comments on commit 319e1ed

Please sign in to comment.