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 241 of file NeighArr.h.

Member Function Documentation

◆ get_option()

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

Definition at line 246 of file NeighArr.h.

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

◆ 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 266 of file NeighArr.h.

267  {
268  const int opt_idx = get_option(pair);
269  if (opt_idx < 0 || !(options & (1U << opt_idx)) )
270  {
271  return false;
272  }
273 
274  //nextInSampl, the neighbour option used
275  //for the PS and HECIW_FCal limited cells.
276  constexpr int limited_option = 6;
277 
278  //Number of pairs within each neighbour option
279  //above which the neighbours contain
280  //PS and HECIW_FCal limited cells.
281  //Hardcoded for performance reasons.
282  //Since (CPU) geometry description
283  //might end up seeing some changes
284  //in the not so distant future
285  //to harmonize with our data structures,
286  //we could consider some sort of code generation...
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};
289 
290  if (limited_PS && opt_idx != limited_option)
291  {
292  if (pair >= s_PS_start[opt_idx] && pair < s_HECIW_FCal_start[opt_idx])
293  {
294  return false;
295  }
296  }
297 
298  if (limited_HECIW_FCal && opt_idx != limited_option)
299  {
300  if (pair >= s_HECIW_FCal_start[opt_idx])
301  {
302  return false;
303  }
304  }
305 
306  return true;
307 
308  }

Member Data Documentation

◆ cell_A

int CaloRecGPU::NeighPairsArr::cell_A[NExactPairs]

Definition at line 243 of file NeighArr.h.

◆ cell_B

int CaloRecGPU::NeighPairsArr::cell_B[NExactPairs]

Definition at line 244 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:246
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
CaloRecGPU::NumNeighOptions
constexpr int NumNeighOptions
Definition: BaseDefinitions.h:47