File Clusterization.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

namespace Ccl

Typedefs

using Label = int

Enums

enum ConnectResult

Values:

enumerator eNoConn
enumerator eNoConnStop
enumerator eConn

Functions

template<typename CellCollection, typename ClusterCollection, size_t GridDim = 2, typename Connect = DefaultConnect<typename CellCollection::value_type, GridDim>>
ClusterCollection createClusters(CellCollection &cells, Connect connect = Connect())

createClusters Conveniance function which runs both labelClusters and createClusters.

template<typename CellCollection, size_t GridDim = 2, typename Connect = DefaultConnect<typename CellCollection::value_type, GridDim>>
void labelClusters(CellCollection &cells, Connect connect = Connect())

labelClusters

In-place connected component labelling using the Hoshen-Kopelman algorithm. The Cell type must have the following functions defined: int getCellRow(const Cell&), int getCellColumn(const Cell&) int& getCellLabel(Cell&)

Parameters
  • cells[in] the cell collection to be labeled

  • connect[in] the connection type (see DefaultConnect)

template<typename CellCollection, typename ClusterCollection, size_t GridDim>
std::enable_if<GridDim != 1 and GridDim != 2, ClusterCollection>::type mergeClusters(CellCollection&)

mergeClusters

Merge a set of cells previously labeled (for instance with labelClusters) into actual clusters. The Cluster type must have the following function defined: void clusterAddCell(Cluster&, const Cell&)

Returns

nothing

Variables

constexpr Label NO_LABEL = 0
template<typename Cell>
struct Connect1D
#include <Acts/Clusterization/Clusterization.hpp>

Subclassed by Acts::Ccl::DefaultConnect< Cell, 1 >

Public Functions

ConnectResult operator()(const Cell &ref, const Cell &iter)
template<typename Cell>
struct Connect2D
#include <Acts/Clusterization/Clusterization.hpp>

Subclassed by Acts::Ccl::DefaultConnect< Cell, 2 >

Public Functions

inline Connect2D()
inline Connect2D(bool commonCorner)
ConnectResult operator()(const Cell &ref, const Cell &iter)

Public Members

bool conn8
template<typename Cell, size_t GridDim = 2>
struct DefaultConnect
#include <Acts/Clusterization/Clusterization.hpp>
template<typename Cell>
struct DefaultConnect<Cell, 1> : public Acts::Ccl::Connect1D<Cell>
#include <Acts/Clusterization/Clusterization.hpp>
template<typename Cell>
struct DefaultConnect<Cell, 2> : public Acts::Ccl::Connect2D<Cell>
#include <Acts/Clusterization/Clusterization.hpp>

Public Functions

inline DefaultConnect(bool commonCorner)
inline DefaultConnect()