Skip to content

Commit

Permalink
feat: Allow passing seed quality to seeds (#1268)
Browse files Browse the repository at this point in the history
* passing quality to seeds

* remove what not needed

* remove useless include

* fixing format

* re-trigger CI

Co-authored-by: robertlangenberg <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 8, 2022
1 parent 8a2260b commit f9a0979
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Core/include/Acts/Seeding/Seed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#pragma once

#include <limits>
#include <vector>

#include <boost/container/small_vector.hpp>
Expand All @@ -21,16 +22,19 @@ class Seed {

public:
Seed(const SpacePoint& b, const SpacePoint& m, const SpacePoint& u,
float vertex);
float vertex,
float seedQuality = -std::numeric_limits<float>::infinity());
Seed(const Seed&) = default;
Seed& operator=(const Seed&) = default;

const auto& sp() const { return m_spacepoints; }
double z() const { return m_zvertex; }
float seedQuality() const { return m_seedQuality; }

private:
boost::container::small_vector<const SpacePoint*, 3> m_spacepoints;
float m_zvertex;
float m_seedQuality;
};

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -39,11 +43,12 @@ class Seed {

template <typename SpacePoint>
Seed<SpacePoint>::Seed(const SpacePoint& b, const SpacePoint& m,
const SpacePoint& u, float vertex) {
const SpacePoint& u, float vertex, float seedQuality) {
m_zvertex = vertex;
m_spacepoints.push_back(&b);
m_spacepoints.push_back(&m);
m_spacepoints.push_back(&u);
m_seedQuality = seedQuality;
}

} // namespace Acts
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/SeedFilter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void SeedFilter<external_spacepoint_t>::filterSeeds_1SpFixed(

outIt = Seed<external_spacepoint_t>{
(*it).second->sp[0]->sp(), (*it).second->sp[1]->sp(),
(*it).second->sp[2]->sp(), (*it).second->z()};
(*it).second->sp[2]->sp(), (*it).second->z(), bestSeedQuality};
numTotalSeeds += 1;
}
}
Expand Down

0 comments on commit f9a0979

Please sign in to comment.