![]() |
ATLAS Offline Software
|
Namespaces | |
| namespace | traits |
Classes | |
| struct | Cell |
| A possible Cell type, that can be clustered. More... | |
| struct | ConnectionHelper |
| default connection helper which should work for arbitrary cells which fulfil the CellWithLabelConcept More... | |
Concepts | |
| concept | CellWithLabel |
| concept of a call object that can be clustered. | |
| concept | SequenceContainer |
| base concept for the container that can be used for a cell collection | |
| concept | CellCollection |
| concept of a cell container that can be clustered | |
Enumerations | |
| enum class | EConnectionType { CommonEdgeOrCorner , CommonEdge } |
Functions | |
| template<typename coordinates_t> | |
| bool | isConnectedCommonEdgeOrCorner (const coordinates_t &coordinates_diff) |
| test whether cells are connected considering common corners and edges. | |
| template<typename coordinates_t> | |
| bool | isConnectedCommonEdge (const coordinates_t &coordinates_diff) |
| test whether cells are connected considering common edges only. | |
| template<EConnectionType connection_type = EConnectionType::CommonEdgeOrCorner, CellCollection cell_container_t = std::span<Cell<int, 2, unsigned int> >> | |
| auto | defaultConnectionHelper (const cell_container_t &cells) |
| template<typename coordinate_t> | |
| auto | absDifference (coordinate_t a, coordinate_t b) |
| compute the absolute difference of two coordinates | |
| template<unsigned int SORT_AXIS, CellCollection cell_collection_t, std::unsigned_integral index_t = unsigned int, typename connection_helper_t> | |
| void | labelSortedCells (cell_collection_t &cells, connection_helper_t &&connection_helper) |
| Label cells which are in ascending order of the coordinate of the given axis. | |
| template<unsigned int AXIS, CellCollection cell_collection_t, std::size_t NDim = 2, std::unsigned_integral index_t = unsigned int> | |
| void | sortCellsByCoordinate (cell_collection_t &cells) |
| Sort the cells in ascending order of the coordinate of the specified axis. | |
| template<CellCollection cell_collection_t> | |
| void | groupCellsByLabel (cell_collection_t &cells) |
| Sort the cells in ascending order of the asscoiated label. | |
| template<unsigned int SORT_AXIS, std::unsigned_integral index_t = unsigned int, CellCollection cell_collection_t = std::span<Cell<int, 2, unsigned int> >, typename connection_helper_t = ConnectionHelper<Cell<int, 2, unsigned int> >> | |
| void | clusterize (cell_collection_t &cells, connection_helper_t &&connection_helper=ConnectionHelper< typename cell_collection_t::value_type, EConnectionType::CommonEdgeOrCorner >{}) |
| Sort the cell collection in such a way that cells of a cluster are adjacent. | |
| template<CellCollection cell_collection_t, std::unsigned_integral index_t = unsigned int> | |
| std::size_t | countLabels (const cell_collection_t &cells) |
| determine the number of clusters. | |
| template<CellCollection cell_collection_t, typename func_t> | |
| void | for_each_cluster (cell_collection_t &cells, func_t func) |
| call the given function for each cluster of a label sorted cell collection. | |
| template<CellCollection cell_collection_t, typename range_collection_t> | |
| void | addCellRanges (const cell_collection_t &cells, range_collection_t &ranges) |
| Add element ranges for each cluster in the cell collection to the given range container. | |
| template<unsigned int AXIS, CellCollection cell_collection_t, typename range_collection_t> | |
| void | addCellRangesAndSort (cell_collection_t &cells, range_collection_t &ranges) |
| Sort the cells of each cluster by one coordinate and add cell ranges to the given range container. | |
|
strong |
| Enumerator | |
|---|---|
| CommonEdgeOrCorner | |
| CommonEdge | |
Definition at line 127 of file InPlaceClusterization.h.
| auto Acts::InPlaceClusterization::absDifference | ( | coordinate_t | a, |
| coordinate_t | b ) |
compute the absolute difference of two coordinates
Definition at line 176 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::addCellRanges | ( | const cell_collection_t & | cells, |
| range_collection_t & | ranges ) |
Add element ranges for each cluster in the cell collection to the given range container.
| cells | labeled and label sorted cell collection |
| ranges | a range container It is assumed that clusterize was called previously for the given cell collection i.e. the cells are labeled and sorted by label. Will add one cell range per cluster to the given range container. The value type of the range container has to be constructible by two indices the index of the first cell in a cluster and the index of the cell after the last cell of the cluster. |
Definition at line 354 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::addCellRangesAndSort | ( | cell_collection_t & | cells, |
| range_collection_t & | ranges ) |
Sort the cells of each cluster by one coordinate and add cell ranges to the given range container.
| cells | labeled and label sorted cell collection |
| ranges | a range container It is assumed that clusterize was called previously for the given cell collection i.e. the cells are labeled and sorted by label. Will first sort the cells of each cluster by the coordinate of the specified axis and add one cell range per cluster to the given range container. The value type of the range container has to be constructible by two indices the index of the first cell in a cluster and the index of the cell after the last cell of the cluster. |
Definition at line 374 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::clusterize | ( | cell_collection_t & | cells, |
| connection_helper_t && | connection_helper = ConnectionHelper<typename cell_collection_t::value_type, EConnectionType::CommonEdgeOrCorner>{} ) |
Sort the cell collection in such a way that cells of a cluster are adjacent.
| cells | the cell collection which will be sorted. |
| connection_helper | a helper object to test for cell connections. Will sort the cells first by the coordinate of the specified axis to accelerate connection tests. Then associate the same label to connected cells where the label corresponds to the smallest cell index (in the sorted cell collection) of a cluster, where the cells are in ascending order of one of the coordinates Finally will sort the cells by the label in ascending order. As a consequence cells which belong to one cluster are adjacent and have the same label. index_t must be large enough to fit the number of cells in the collection. |
Definition at line 291 of file InPlaceClusterization.h.
| std::size_t Acts::InPlaceClusterization::countLabels | ( | const cell_collection_t & | cells | ) |
determine the number of clusters.
It is assumed that clusterize was called previously for the given cell collection i.e. the cells are labeled and sorted by label. It will count the number of different labels do determine the number of clusters in the collection.
Definition at line 309 of file InPlaceClusterization.h.
| auto Acts::InPlaceClusterization::defaultConnectionHelper | ( | const cell_container_t & | cells | ) |
Definition at line 169 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::for_each_cluster | ( | cell_collection_t & | cells, |
| func_t | func ) |
call the given function for each cluster of a label sorted cell collection.
It is assumed that clusterize was called previously for the given cell collection i.e. the cells are labeled and sorted by label. Will call the given function for each cluster, where the function gets a reference to the full cell collection and the begin and end cell index which defines the cell range of a cluster.
Definition at line 326 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::groupCellsByLabel | ( | cell_collection_t & | cells | ) |
Sort the cells in ascending order of the asscoiated label.
Definition at line 266 of file InPlaceClusterization.h.
| bool Acts::InPlaceClusterization::isConnectedCommonEdge | ( | const coordinates_t & | coordinates_diff | ) |
test whether cells are connected considering common edges only.
| coordinates_diff | absolute values of the differences of the cell coordinates Test whether two cells with the given coordinate differences are connected either horizontally, vertically or are equal. |
Definition at line 119 of file InPlaceClusterization.h.
| bool Acts::InPlaceClusterization::isConnectedCommonEdgeOrCorner | ( | const coordinates_t & | coordinates_diff | ) |
test whether cells are connected considering common corners and edges.
| coordinates_diff | absolute values of the differences of the cell coordinates Test whether two cells with the given coordinate differences are connected either horizontally, vertically, diagonally or are equal. |
Definition at line 106 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::labelSortedCells | ( | cell_collection_t & | cells, |
| connection_helper_t && | connection_helper ) |
Label cells which are in ascending order of the coordinate of the given axis.
| cells | the sorted cell collection that should be labeled. |
| connection_helper | a helper object to test for cell connections. |
Definition at line 192 of file InPlaceClusterization.h.
| void Acts::InPlaceClusterization::sortCellsByCoordinate | ( | cell_collection_t & | cells | ) |
Sort the cells in ascending order of the coordinate of the specified axis.
Definition at line 256 of file InPlaceClusterization.h.