Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::CandidatesForMiddleSp< external_space_point_t > Class Template Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Seeding/CandidatesForMiddleSp.hpp>

+ Collaboration diagram for Acts::CandidatesForMiddleSp< external_space_point_t >:

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_typestorage ()
 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 &current_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_typem_storage {}
 
std::vector< std::size_t > m_indices_high {}
 
std::vector< std::size_t > m_indices_low {}
 

Detailed Description

template<typename external_space_point_t>
class Acts::CandidatesForMiddleSp< external_space_point_t >

The CandidatesForMiddleSp collects the triplet candidates given a fixed middle spacepoint. It internally stores the triplet candidates keeping only those with the higher quality.

Template Parameters
external_space_point_tThe external spacepoint type.

Definition at line 63 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 63 of file CandidatesForMiddleSp.hpp

Member Typedef Documentation

template<typename external_space_point_t>
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

Constructor & Destructor Documentation

template<typename external_space_point_t>
Acts::CandidatesForMiddleSp< external_space_point_t >::CandidatesForMiddleSp ( )
default

constructor

template<typename external_space_point_t>
Acts::CandidatesForMiddleSp< external_space_point_t >::~CandidatesForMiddleSp ( )
default

Destructor.

Member Function Documentation

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::addToCollection ( std::vector< std::size_t > &  indices,
std::size_t &  n,
const std::size_t  n_max,
value_type &&  element 
)
private

Adding a new triplet candidate to the collection. The function is called after the candidate has satisfied all the selection criteria.

Parameters
indicesThe collection
nCurrent number of stored elements in the collection
n_maxThe maximum number of elements that can be stored in the collection
elementThe 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.

+ Here is the call graph for this function:

template<typename external_space_point_t >
bool Acts::CandidatesForMiddleSp< external_space_point_t >::ascendingByQuality ( const value_type i1,
const value_type i2 
)
static

A function for sorting the triplet candidates from lower to higher quality.

Parameters
i1First triplet candidate
i2Second triplet candidate
Returns
The comparison result

Definition at line 296 of file CandidatesForMiddleSp.ipp.

View newest version in sPHENIX GitHub at line 296 of file CandidatesForMiddleSp.ipp

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::bubbledw ( std::vector< std::size_t > &  indices,
std::size_t  n,
std::size_t  actual_size 
)
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.

Parameters
indicesThe collection
nThe index of the element to place in the correct position
actual_sizeThe 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().

+ Here is the call graph for this function:

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::bubbleup ( std::vector< std::size_t > &  indices,
std::size_t  n 
)
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.

Parameters
indicesThe collection
nThe 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().

+ Here is the call graph for this function:

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::clear ( )
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().

+ Here is the caller graph for this function:

template<typename external_space_point_t >
bool Acts::CandidatesForMiddleSp< external_space_point_t >::descendingByQuality ( const value_type i1,
const value_type i2 
)
static

A function for sorting the triplet candidates from higher to lower quality.

Parameters
i1First triplet candidate
i2Second triplet candidate
Returns
The comparison result

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.

template<typename external_space_point_t >
bool Acts::CandidatesForMiddleSp< external_space_point_t >::exists ( const std::size_t  n,
const std::size_t  max_size 
) const
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.

Parameters
nIndex of the requested element
max_sizeNumber of elements currently stored in the collection
Returns
Whether the element exists

Definition at line 45 of file CandidatesForMiddleSp.ipp.

View newest version in sPHENIX GitHub at line 45 of file CandidatesForMiddleSp.ipp

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::pop ( std::vector< std::size_t > &  indices,
std::size_t &  current_size 
)
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.

Parameters
indicesThe collection
current_sizeThe 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().

+ Here is the call graph for this function:

template<typename external_space_point_t>
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.

Parameters
SpBBottom space point
SpMMedium space point
SpTTop space point
weightThe quality of the triplet candidate
zOriginThe z-coordinate of the origin
isQualityWhether the triplet candidate is high or low quality
Returns
whether the triplet candidate has been added or not to the collection

Definition at line 72 of file CandidatesForMiddleSp.ipp.

View newest version in sPHENIX GitHub at line 72 of file CandidatesForMiddleSp.ipp

template<typename external_space_point_t>
bool Acts::CandidatesForMiddleSp< external_space_point_t >::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 
)
private

dding a new triplet candidate to the collection, should it satisfy the selection criteria

Parameters
indicesThe collection into which the candidate should be stored
nThe current number of stored elements in the container
n_maxThe maximum number of elements that can be stored in the container
SpBThe bottom space point
SpMThe middle space point
SpTThe top space point
weightThe quality of the triplet candidate
zOriginThe z-coordinate of the origin
isQualityWhether the triplet candidate is high or low quality
Returns
whether the triplet candidate has been added or not to the collection

Definition at line 86 of file CandidatesForMiddleSp.ipp.

View newest version in sPHENIX GitHub at line 86 of file CandidatesForMiddleSp.ipp

template<typename external_space_point_t >
void Acts::CandidatesForMiddleSp< external_space_point_t >::setMaxElements ( std::size_t  n_low,
std::size_t  n_high 
)
inline

Setting maximum number of candidates to keep.

Parameters
n_lowMaximum number of candidates in the low-quality collection
n_highMaximum 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().

+ Here is the caller graph for this function:

template<typename external_space_point_t >
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.

Returns
Vector of triplet candidates

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.

+ Here is the call graph for this function:

template<typename external_space_point_t >
float Acts::CandidatesForMiddleSp< external_space_point_t >::weight ( const std::vector< std::size_t > &  indices,
std::size_t  n 
) const
inlineprivate

Return the weight for a candidate.

Parameters
indicesThe collection in which the element is stored
nIndex of the element in the collection
Returns
The weight of the candidate

Definition at line 53 of file CandidatesForMiddleSp.ipp.

View newest version in sPHENIX GitHub at line 53 of file CandidatesForMiddleSp.ipp

References n.

Member Data Documentation

template<typename external_space_point_t>
std::vector<std::size_t> Acts::CandidatesForMiddleSp< external_space_point_t >::m_indices_high {}
private

Definition at line 200 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 200 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::vector<std::size_t> Acts::CandidatesForMiddleSp< external_space_point_t >::m_indices_low {}
private

Definition at line 202 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 202 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::size_t Acts::CandidatesForMiddleSp< external_space_point_t >::m_max_size_high {0}
private

Definition at line 180 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 180 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::size_t Acts::CandidatesForMiddleSp< external_space_point_t >::m_max_size_low {0}
private

Definition at line 181 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 181 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::size_t Acts::CandidatesForMiddleSp< external_space_point_t >::m_n_high {0}
private

Definition at line 184 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 184 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::size_t Acts::CandidatesForMiddleSp< external_space_point_t >::m_n_low {0}
private

Definition at line 185 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 185 of file CandidatesForMiddleSp.hpp

template<typename external_space_point_t>
std::vector<value_type> Acts::CandidatesForMiddleSp< external_space_point_t >::m_storage {}
private

Definition at line 188 of file CandidatesForMiddleSp.hpp.

View newest version in sPHENIX GitHub at line 188 of file CandidatesForMiddleSp.hpp


The documentation for this class was generated from the following files: