ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
CaloRecGPU::NeighPairsArr Struct Reference

#include <NeighArr.h>

Collaboration diagram for CaloRecGPU::NeighPairsArr:

Public Member Functions

constexpr int get_option (const int pair) const
 
constexpr bool is_valid (const int pair, const unsigned int options, const bool limited_PS, const bool limited_HECIW_FCal) const
 

Public Attributes

int cell_A [NExactPairs]
 
int cell_B [NExactPairs]
 

Detailed Description

Definition at line 232 of file NeighArr.h.

Member Function Documentation

◆ get_option()

constexpr int CaloRecGPU::NeighPairsArr::get_option ( const int  pair) const
inlineconstexpr

Definition at line 237 of file NeighArr.h.

238  {
239  //Number of pairs at the end of each neighbour option.
240  //Hardcoded for performance reasons.
241  //Since (CPU) geometry description
242  //might end up seeing some changes
243  //in the not so distant future
244  //to harmonize with our data structures,
245  //we could consider some sort of code generation...
246  constexpr int s_pairs_end[NumNeighOptions] = {184128, 368256, 551424, 733312, 1483056, 1960492, 2437928, 2438824, 2439720, 2500008, 2530412, 2560816};
247  for (int i = 0; i < NumNeighOptions; ++i)
248  {
249  if (pair < s_pairs_end[i])
250  {
251  return i;
252  }
253  }
254  return -1;
255  }

◆ is_valid()

constexpr bool CaloRecGPU::NeighPairsArr::is_valid ( const int  pair,
const unsigned int  options,
const bool  limited_PS,
const bool  limited_HECIW_FCal 
) const
inlineconstexpr

Definition at line 257 of file NeighArr.h.

258  {
259  const int opt_idx = get_option(pair);
260  if (opt_idx < 0 || !(options & (1U << opt_idx)) )
261  {
262  return false;
263  }
264 
265  //nextInSampl, the neighbour option used
266  //for the PS and HECIW_FCal limited cells.
267  constexpr int limited_option = 6;
268 
269  //Number of pairs within each neighbour option
270  //above which the neighbours contain
271  //PS and HECIW_FCal limited cells.
272  //Hardcoded for performance reasons.
273  //Since (CPU) geometry description
274  //might end up seeing some changes
275  //in the not so distant future
276  //to harmonize with our data structures,
277  //we could consider some sort of code generation...
278  constexpr int s_PS_start[NumNeighOptions] = {173888, 358016, 541056, 723584, 1432784, 1954480, 2364410, 2438696, 2439336, 2500008, 2529160, 2559756};
279  constexpr int s_HECIW_FCal_start[NumNeighOptions] = {183232, 367360, 550272, 732672, 1469392, 1954480, 2435450, 2438824, 2439720, 2500008, 2529160, 2559756};
280 
281  if (limited_PS && opt_idx != limited_option)
282  {
283  if (pair >= s_PS_start[opt_idx] && pair < s_HECIW_FCal_start[opt_idx])
284  {
285  return false;
286  }
287  }
288 
289  if (limited_HECIW_FCal && opt_idx != limited_option)
290  {
291  if (pair >= s_HECIW_FCal_start[opt_idx])
292  {
293  return false;
294  }
295  }
296 
297  return true;
298 
299  }

Member Data Documentation

◆ cell_A

int CaloRecGPU::NeighPairsArr::cell_A[NExactPairs]

Definition at line 234 of file NeighArr.h.

◆ cell_B

int CaloRecGPU::NeighPairsArr::cell_B[NExactPairs]

Definition at line 235 of file NeighArr.h.


The documentation for this struct was generated from the following file:
CaloRecGPU::NeighPairsArr::get_option
constexpr int get_option(const int pair) const
Definition: NeighArr.h:237
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
CaloRecGPU::NumNeighOptions
constexpr int NumNeighOptions
Definition: BaseDefinitions.h:47