Cluster

template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = uint16_t>
struct Cluster

Cluster struct.

Public Types

using value_type = T
using coord_type = CoordType

Public Functions

inline T sum() const

Sum of all elements in the cluster.

inline Sum_index_pair<T, corner> max_sum_2x2() const

sum of 2x2 subcluster with highest energy

Returns:

photon energy of subcluster, 2x2 subcluster index relative to cluster center

Public Members

CoordType x

Cluster center x coordinate (in pixel coordinates)

CoordType y

Cluster center y coordinate (in pixel coordinates)

std::array<T, ClusterSizeX * ClusterSizeY> data

Cluster data stored in row-major order starting from top-left.

Public Static Attributes

static uint8_t cluster_size_x = ClusterSizeX
static uint8_t cluster_size_y = ClusterSizeY

Free Functions:

template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = int16_t>
Cluster<T, 3, 3, CoordType> aare::reduce_to_3x3(const Cluster<T, ClusterSizeX, ClusterSizeY, CoordType> &c)

Reduce a cluster to a 3x3 cluster.

Parameters:

cCluster to reduce

Returns:

reduced cluster

template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = uint16_t>
Cluster<T, 2, 2, CoordType> aare::reduce_to_2x2(const Cluster<T, ClusterSizeX, ClusterSizeY, CoordType> &c)

Reduce a cluster to a 2x2 cluster by selecting the 2x2 block with the highest sum.

Note

The cluster is filled using row major ordering starting at the top-left (thus for a max subcluster in the top left cornern the photon hit is at the fourth position)

Parameters:

cCluster to reduce

Returns:

reduced cluster