|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALORECGPU_NEIGHARR_H
8 #define CALORECGPU_NEIGHARR_H
58 1 <
sizeof(
carrier) * CHAR_BIT,
"All the offsets must fit within the carrier!" );
202 constexpr
int get_neighbours(
const unsigned int neigh_options,
const int cell,
int * neigh_arr)
const
206 int neigh_arr_len = 0;
213 if ( neigh_options & (1U <<
i) )
215 for (; neigh <
limit; ++neigh)
217 neigh_arr[neigh_arr_len] =
cells[
cell][neigh];
223 return neigh_arr_len;
232 if ( neigh_options & (1U <<
i) )
255 constexpr
int s_pairs_end[
NumNeighOptions] = {184128, 368256, 551424, 733312, 1483056, 1960492, 2437928, 2438824, 2439720, 2500008, 2530412, 2560816};
258 if (pair < s_pairs_end[
i])
266 constexpr
bool is_valid(
const int pair,
const unsigned int options,
const bool limited_PS,
const bool limited_HECIW_FCal)
const
269 if (opt_idx < 0 || !(
options & (1U << opt_idx)) )
276 constexpr
int limited_option = 6;
287 constexpr
int s_PS_start[
NumNeighOptions] = {173888, 358016, 541056, 723584, 1432784, 1954480, 2364410, 2438696, 2439336, 2500008, 2529160, 2559756};
288 constexpr
int s_HECIW_FCal_start[
NumNeighOptions] = {183232, 367360, 550272, 732672, 1469392, 1954480, 2435450, 2438824, 2439720, 2500008, 2529160, 2559756};
290 if (limited_PS && opt_idx != limited_option)
292 if (pair >= s_PS_start[opt_idx] && pair < s_HECIW_FCal_start[opt_idx])
298 if (limited_HECIW_FCal && opt_idx != limited_option)
300 if (pair >= s_HECIW_FCal_start[opt_idx])
313 #endif //CALORECGPU_NEIGHARR_H
constexpr static carrier s_only_numbers_mask
constexpr bool is_valid(const int pair, const unsigned int options, const bool limited_PS, const bool limited_HECIW_FCal) const
constexpr int NExactPairs
static constexpr carrier offset_delta(const int i)
Returns, for each i, what must be added to the offset to increase the stores numbers appropriately wh...
constexpr static int s_more_bits_begin
constexpr NeighOffset & operator=(const carrier v)
constexpr static int s_bits_per_last_offset
constexpr int get_end_cell(const int option) const
To clarify, this cell no longer corresponds to the option, so it's one past the end (like the end ite...
NeighOffset::carrier offsets[NCaloCells]
constexpr int get_option(const int pair) const
constexpr int get_start_cell(const int option) const
constexpr int get_neighbour(const int cell, const int neigh_number) const
constexpr int get_neighbours(const unsigned int neigh_options, const int cell, int *neigh_arr) const
Places the neighbours according to the option(s) in neigh_options in the array and returns the number...
constexpr static carrier s_offset_delta_pattern
constexpr static int s_bits_per_offset
constexpr int get_number(const int i) const
constexpr NeighOffset(const carrier v)
unsigned long long int carrier
constexpr void set_neighbour(const int cell, const int neigh_number, const int neigh_v)
constexpr int get_total_number_of_neighbours(const int cell) const
constexpr static carrier s_offset_mask
constexpr int get_total_number() const
constexpr int NMaxNeighbours
int cells[NCaloCells][NMaxNeighbours]
constexpr int NumNeighOptions
constexpr static carrier s_offset_mask_last
constexpr static carrier s_last_bit_mask
constexpr static carrier s_numbers_to_keep
constexpr int get_number_of_neighbours(const unsigned int neigh_options, const int cell) const
constexpr int get_num_cells(const int option) const