Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Core/include/Acts/Seeding/CandidatesForMiddleSp.hpp>
Public Types | |
using | value_type = TripletCandidate< external_space_point_t > |
Public Member Functions | |
CandidatesForMiddleSp ()=default | |
constructor | |
~CandidatesForMiddleSp ()=default | |
Destructor. | |
void | setMaxElements (std::size_t n_low, std::size_t n_high) |
Setting maximum number of candidates to keep. | |
std::vector< value_type > | storage () |
Retrieve the triplet candidates, the resulting vector is already sorted, elements with higher quality first. | |
bool | push (external_space_point_t &SpB, external_space_point_t &SpM, external_space_point_t &SpT, float weight, float zOrigin, bool isQuality) |
Adding a new triplet candidate to the collection, should it satisfy the selection criteria. | |
void | clear () |
Clear the internal storage. | |
Static Public Member Functions | |
static bool | descendingByQuality (const value_type &i1, const value_type &i2) |
A function for sorting the triplet candidates from higher to lower quality. | |
static bool | ascendingByQuality (const value_type &i1, const value_type &i2) |
A function for sorting the triplet candidates from lower to higher quality. | |
Private Member Functions | |
bool | push (std::vector< std::size_t > &indices, std::size_t &n, const std::size_t n_max, external_space_point_t &SpB, external_space_point_t &SpM, external_space_point_t &SpT, float weight, float zOrigin, bool isQuality) |
dding a new triplet candidate to the collection, should it satisfy the selection criteria | |
bool | exists (const std::size_t n, const std::size_t max_size) const |
Check if an element exists in the collection. The element to be checked is supposed to be in the n position of the collection. | |
void | pop (std::vector< std::size_t > &indices, std::size_t ¤t_size) |
Pop an element from a collection. The removal of the element from the collection does not imply its destruction. In fact, the number of stored elements is simply diminished by 1. The popped element is technically still available at the end of the collection. | |
float | weight (const std::vector< std::size_t > &indices, std::size_t n) const |
Return the weight for a candidate. | |
void | bubbleup (std::vector< std::size_t > &indices, std::size_t n) |
Move an element up in the min heap tree. The function checks whether the element's weight is lower of its parent's weight. If so, it swaps them. Reiterate the process until the element is in the correct position on the tree. | |
void | bubbledw (std::vector< std::size_t > &indices, std::size_t n, std::size_t actual_size) |
Move an element down in the min heap tree. The function checks whether the elements's weight is lower of its child's weights. If so, it swaps the element with the child with the lowest weight. Reiterate the process until the element is in the correct position on the tree. | |
void | addToCollection (std::vector< std::size_t > &indices, std::size_t &n, const std::size_t n_max, value_type &&element) |
Adding a new triplet candidate to the collection. The function is called after the candidate has satisfied all the selection criteria. | |
Private Attributes | |
std::size_t | m_max_size_high {0} |
std::size_t | m_max_size_low {0} |
std::size_t | m_n_high {0} |
std::size_t | m_n_low {0} |
std::vector< value_type > | m_storage {} |
std::vector< std::size_t > | m_indices_high {} |
std::vector< std::size_t > | m_indices_low {} |
The CandidatesForMiddleSp collects the triplet candidates given a fixed middle spacepoint. It internally stores the triplet candidates keeping only those with the higher quality.
external_space_point_t | The external spacepoint type. |
Definition at line 63 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 63 of file CandidatesForMiddleSp.hpp
using Acts::CandidatesForMiddleSp< external_space_point_t >::value_type = TripletCandidate<external_space_point_t> |
Definition at line 65 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 65 of file CandidatesForMiddleSp.hpp
|
default |
constructor
|
default |
Destructor.
|
private |
Adding a new triplet candidate to the collection. The function is called after the candidate has satisfied all the selection criteria.
indices | The collection |
n | Current number of stored elements in the collection |
n_max | The maximum number of elements that can be stored in the collection |
element | The element that must be added to the collection |
Definition at line 117 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 117 of file CandidatesForMiddleSp.ipp
References fixGDML::element, testing::internal::move(), and n.
|
static |
A function for sorting the triplet candidates from lower to higher quality.
i1 | First triplet candidate |
i2 | Second triplet candidate |
Definition at line 296 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 296 of file CandidatesForMiddleSp.ipp
|
private |
Move an element down in the min heap tree. The function checks whether the elements's weight is lower of its child's weights. If so, it swaps the element with the child with the lowest weight. Reiterate the process until the element is in the correct position on the tree.
indices | The collection |
n | The index of the element to place in the correct position |
actual_size | The current number of elements stored in the collection |
Definition at line 132 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 132 of file CandidatesForMiddleSp.ipp
References Acts::Concepts::exists, and swap().
|
private |
Move an element up in the min heap tree. The function checks whether the element's weight is lower of its parent's weight. If so, it swaps them. Reiterate the process until the element is in the correct position on the tree.
indices | The collection |
n | The index of the element to place in the correct position |
Definition at line 189 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 189 of file CandidatesForMiddleSp.ipp
References swap().
|
inline |
Clear the internal storage.
Definition at line 60 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 60 of file CandidatesForMiddleSp.ipp
Referenced by Acts::SeedFinder< external_spacepoint_t, platform_t >::filterCandidates().
|
static |
A function for sorting the triplet candidates from higher to lower quality.
i1 | First triplet candidate |
i2 | Second triplet candidate |
Definition at line 260 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 260 of file CandidatesForMiddleSp.ipp
References Acts::TripletCandidate< external_space_point_t >::bottom, Acts::TripletCandidate< external_space_point_t >::middle, Acts::TripletCandidate< external_space_point_t >::top, and Acts::TripletCandidate< external_space_point_t >::weight.
|
inlineprivate |
Check if an element exists in the collection. The element to be checked is supposed to be in the n position of the collection.
n | Index of the requested element |
max_size | Number of elements currently stored in the collection |
Definition at line 45 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 45 of file CandidatesForMiddleSp.ipp
|
inlineprivate |
Pop an element from a collection. The removal of the element from the collection does not imply its destruction. In fact, the number of stored elements is simply diminished by 1. The popped element is technically still available at the end of the collection.
indices | The collection |
current_size | The current number of element stored in the collection. The function will diminish this value by 1 |
Definition at line 31 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 31 of file CandidatesForMiddleSp.ipp
References swap().
bool Acts::CandidatesForMiddleSp< external_space_point_t >::push | ( | external_space_point_t & | SpB, |
external_space_point_t & | SpM, | ||
external_space_point_t & | SpT, | ||
float | weight, | ||
float | zOrigin, | ||
bool | isQuality | ||
) |
Adding a new triplet candidate to the collection, should it satisfy the selection criteria.
SpB | Bottom space point |
SpM | Medium space point |
SpT | Top space point |
weight | The quality of the triplet candidate |
zOrigin | The z-coordinate of the origin |
isQuality | Whether the triplet candidate is high or low quality |
Definition at line 72 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 72 of file CandidatesForMiddleSp.ipp
|
private |
dding a new triplet candidate to the collection, should it satisfy the selection criteria
indices | The collection into which the candidate should be stored |
n | The current number of stored elements in the container |
n_max | The maximum number of elements that can be stored in the container |
SpB | The bottom space point |
SpM | The middle space point |
SpT | The top space point |
weight | The quality of the triplet candidate |
zOrigin | The z-coordinate of the origin |
isQuality | Whether the triplet candidate is high or low quality |
Definition at line 86 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 86 of file CandidatesForMiddleSp.ipp
|
inline |
Setting maximum number of candidates to keep.
n_low | Maximum number of candidates in the low-quality collection |
n_high | Maximum number of candidates in the high-quality collection |
Definition at line 12 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 12 of file CandidatesForMiddleSp.ipp
Referenced by Acts::SeedFinder< external_spacepoint_t, platform_t >::createSeedsForGroup(), and Acts::SeedFinderOrthogonal< external_spacepoint_t >::processFromMiddleSP().
std::vector< typename CandidatesForMiddleSp< external_space_point_t >::value_type > Acts::CandidatesForMiddleSp< external_space_point_t >::storage | ( | ) |
Retrieve the triplet candidates, the resulting vector is already sorted, elements with higher quality first.
Definition at line 213 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 213 of file CandidatesForMiddleSp.ipp
References i, ambiguity_solver_full_chain::idx, testing::internal::move(), and check_smearing_config::output.
|
inlineprivate |
Return the weight for a candidate.
indices | The collection in which the element is stored |
n | Index of the element in the collection |
Definition at line 53 of file CandidatesForMiddleSp.ipp.
View newest version in sPHENIX GitHub at line 53 of file CandidatesForMiddleSp.ipp
References n.
|
private |
Definition at line 200 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 200 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 202 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 202 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 180 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 180 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 181 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 181 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 184 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 184 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 185 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 185 of file CandidatesForMiddleSp.hpp
|
private |
Definition at line 188 of file CandidatesForMiddleSp.hpp.
View newest version in sPHENIX GitHub at line 188 of file CandidatesForMiddleSp.hpp