ATLAS Offline Software
Loading...
Searching...
No Matches
Acts::InPlaceClusterization::traits Namespace Reference

Functions

template<typename cell_t>
constexpr auto getCellDimension ()
template<typename cell_t>
auto getCellCoordinate (const cell_t &a, unsigned int axis_i)
 Get the coordinates of a cell.
template<typename cell_t, std::unsigned_integral index_t>
void setLabel (cell_t &a, index_t label)
 Set a label for a given cell the label type must fit numbers as high as the number of cells which are clustered.
template<typename cell_t>
auto getLabel (const cell_t &a)
 Get the label associated to the given cell.

Function Documentation

◆ getCellCoordinate()

template<typename cell_t>
auto Acts::InPlaceClusterization::traits::getCellCoordinate ( const cell_t & a,
unsigned int axis_i )

Get the coordinates of a cell.

Parameters
athe cell
axis_ithe index of the axis (0 is the first axis).
Returns
the coordinate of the given cell of the given axis The result is expected to be a signed integer. Unsigned integers should also work. Float types may work but due to limited precision connections may not be identified correctly in all cases. To correctly handle float types a specialized ConnectionHelper may be needed.

Definition at line 36 of file InPlaceClusterization.h.

36 {
37 return a.coordinates[axis_i];
38}
static Double_t a

◆ getCellDimension()

template<typename cell_t>
auto Acts::InPlaceClusterization::traits::getCellDimension ( )
constexpr

Definition at line 23 of file InPlaceClusterization.h.

23 {
24 return std::tuple_size<decltype(cell_t::coordinates)>();
25}

◆ getLabel()

template<typename cell_t>
auto Acts::InPlaceClusterization::traits::getLabel ( const cell_t & a)

Get the label associated to the given cell.

Definition at line 50 of file InPlaceClusterization.h.

50 {
51 return a.label;
52}

◆ setLabel()

template<typename cell_t, std::unsigned_integral index_t>
void Acts::InPlaceClusterization::traits::setLabel ( cell_t & a,
index_t label )

Set a label for a given cell the label type must fit numbers as high as the number of cells which are clustered.

Definition at line 44 of file InPlaceClusterization.h.

44 {
45 a.label = label;
46}
std::string label(const std::string &format, int i)
Definition label.h:19