ATLAS Offline Software
Loading...
Searching...
No Matches
Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type > Struct Template Reference

default connection helper which should work for arbitrary cells which fulfil the CellWithLabelConcept More...

#include <InPlaceClusterization.h>

Collaboration diagram for Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >:

Public Types

using coordinate_t

Static Public Member Functions

static bool isConnected (const std::array< coordinate_t, NDim > &coordinates_diff)
 test whether cells are connected considering common edges or common corners
static bool canAbortSearch (const std::array< coordinate_t, NDim > &coordinates_diff, unsigned int sort_axis_i)
 test whether the search for connections can be aborted.

Static Public Attributes

static constexpr std::size_t NDim = traits::getCellDimension<cell_t>()

Detailed Description

template<CellWithLabel cell_t, EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner>
struct Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >

default connection helper which should work for arbitrary cells which fulfil the CellWithLabelConcept

The connection helper provides variants to test for common edges and corners or edges only and whether the search for connections can be aborted given the absolute differences of the coordinates of a pair of cells. The tests are static and the helper does not have any data members. There should not be any overhead.

Definition at line 139 of file InPlaceClusterization.h.

Member Typedef Documentation

◆ coordinate_t

template<CellWithLabel cell_t, EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner>
using Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >::coordinate_t
Initial value:
std::remove_cvref_t<decltype(traits::getCellCoordinate(
std::declval<cell_t>(), 0u))>
auto getCellCoordinate(const cell_t &a, unsigned int axis_i)
Get the coordinates of a cell.

Definition at line 141 of file InPlaceClusterization.h.

Member Function Documentation

◆ canAbortSearch()

template<CellWithLabel cell_t, EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner>
bool Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >::canAbortSearch ( const std::array< coordinate_t, NDim > & coordinates_diff,
unsigned int sort_axis_i )
inlinestatic

test whether the search for connections can be aborted.

the search is performed in descending order in one coordinate, once the difference in this coordinate is too large the search can be aborted because there cannot be any further connections.

Definition at line 158 of file InPlaceClusterization.h.

160 {
162 return coordinates_diff[sort_axis_i] > 1;
163 }
default connection helper which should work for arbitrary cells which fulfil the CellWithLabelConcept

◆ isConnected()

template<CellWithLabel cell_t, EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner>
bool Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >::isConnected ( const std::array< coordinate_t, NDim > & coordinates_diff)
inlinestatic

test whether cells are connected considering common edges or common corners

Definition at line 145 of file InPlaceClusterization.h.

146 {
149 } else {
151 }
152 }
bool isConnectedCommonEdge(const coordinates_t &coordinates_diff)
test whether cells are connected considering common edges only.
bool isConnectedCommonEdgeOrCorner(const coordinates_t &coordinates_diff)
test whether cells are connected considering common corners and edges.

Member Data Documentation

◆ NDim

template<CellWithLabel cell_t, EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner>
std::size_t Acts::InPlaceClusterization::ConnectionHelper< cell_t, connection_type >::NDim = traits::getCellDimension<cell_t>()
staticconstexpr

Definition at line 140 of file InPlaceClusterization.h.


The documentation for this struct was generated from the following file: