ATLAS Offline Software
ConstantInfoDefinitions.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 //
4 // Dear emacs, this is -*- c++ -*-
5 //
6 
7 #ifndef CALORECGPU_CONSTANTINFODEFINITIONS_H
8 #define CALORECGPU_CONSTANTINFODEFINITIONS_H
9 
10 #include "BaseDefinitions.h"
11 #include "Helpers.h"
12 
13 #include "EtaPhiMap.h"
14 #include "NeighArr.h"
15 
16 namespace CaloRecGPU
17 {
18 
20  {
21  protected:
22 
23  constexpr static int s_subcalo_unknown = 999999;
24  constexpr static int s_subcalo_unknown_replacement = 7;
25 
26  public:
27 
28  constexpr static int from_subcalo_enum(const int subcalo)
29  {
30  if (subcalo == s_subcalo_unknown)
31  {
33  }
34  else
35  {
36  return subcalo;
37  }
38  }
39 
40  constexpr static int to_subcalo_enum(const int subcalo)
41  {
42  if (subcalo == s_subcalo_unknown_replacement)
43  {
44  return s_subcalo_unknown;
45  }
46  else
47  {
48  return subcalo;
49  }
50  }
51 
52  protected:
53 
54  constexpr static int s_region_unknown = 999999;
55  constexpr static int s_region_unknown_replacement = 7;
56 
57  public:
58 
59  constexpr static int from_region_enum(const int region)
60  {
61  if (region == s_region_unknown)
62  {
64  }
65  else
66  {
67  return region;
68  }
69  }
70 
71  constexpr static int to_region_enum(const int region)
72  {
73  if (region == s_region_unknown_replacement)
74  {
75  return s_region_unknown;
76  }
77  else
78  {
79  return region;
80  }
81  }
82 
83  protected:
84 
85  constexpr static int s_sampling_unknown = 999999;
86  constexpr static int s_sampling_unknown_replacement = 7;
87 
88  public:
89 
90  constexpr static int from_intra_calorimeter_sampling_enum(const int sampling)
91  {
92  if (sampling == s_sampling_unknown)
93  {
95  }
96  else
97  {
98  return sampling;
99  }
100  }
101 
102  constexpr static int to_intra_calorimeter_sampling_enum(const int sampling)
103  {
104  if (sampling == s_sampling_unknown_replacement)
105  {
106  return s_sampling_unknown;
107  }
108  else
109  {
110  return sampling;
111  }
112  }
113 
114  };
115 
116 
125  {
126  using carrier = unsigned int;
127 
129 
130 private:
131 
132  static constexpr carrier s_sampling_mask = 0x0000001FU;
133  static constexpr carrier s_intra_sampling_mask = 0x000000E0U;
134  static constexpr carrier s_subcalo_mask = 0x00000700U;
135  static constexpr carrier s_region_mask = 0x00003800U;
136 
137  static constexpr carrier s_is_PS_flag = 0x00004000U;
138  static constexpr carrier s_is_HECIW_FCal_flag = 0x00008000U;
139 
140  static constexpr carrier s_sampling_offset = 0;
141  static constexpr carrier s_intra_sampling_offset = 5;
142  static constexpr carrier s_subcalo_offset = 8;
143  static constexpr carrier s_region_offset = 11;
144 
145  static constexpr carrier s_bits_used = s_sampling_mask |
148  s_region_mask |
149  s_is_PS_flag |
151 
152  static constexpr carrier s_bits_unused = ~s_bits_used;
153 
154 public:
155 
156  constexpr operator carrier () const
157  {
158  return value;
159  }
160 
161  constexpr OtherCellInfo (const carrier v): value(v)
162  {
163  }
164 
165  constexpr OtherCellInfo & operator = (const carrier v)
166  {
167  value = v;
168  return (*this);
169  }
170 
171  constexpr carrier sampling() const
172  {
174  }
175 
177  {
179  }
180 
181  constexpr carrier subcalo() const
182  {
183  return (value & s_subcalo_mask) >> s_subcalo_offset;
184  }
185 
186  constexpr carrier region() const
187  {
188  return (value & s_region_mask) >> s_region_offset;
189  }
190 
191  constexpr bool is_HECIW_or_FCal() const
192  {
193  return value & s_is_HECIW_FCal_flag;
194  }
195 
196  constexpr bool is_PS() const
197  {
198  return value & s_is_PS_flag;
199  }
200 
201  constexpr OtherCellInfo (const carrier sampling,
202  const carrier intra_calo_sampling,
203  const carrier subcalo,
204  const carrier region,
205  const bool PS,
206  const bool HECIW_or_FCal):
207  value(0)
208  {
209  value = ( sampling << s_sampling_offset ) |
210  ( intra_calo_sampling << s_intra_sampling_offset ) |
211  ( subcalo << s_subcalo_offset ) |
212  ( region << s_region_offset ) |
213  ( s_is_PS_flag * PS ) |
214  ( s_is_HECIW_FCal_flag * HECIW_or_FCal );
215  }
216  };
217 
218  struct GeometryArr
219  {
220  float x[NCaloCells];
221  float y[NCaloCells];
222  float z[NCaloCells];
223  float r[NCaloCells];
224  float eta[NCaloCells];
225  float phi[NCaloCells];
226 
227  float dx[NCaloCells];
228  float dy[NCaloCells];
229  float dz[NCaloCells];
230  float dr[NCaloCells];
231  float deta[NCaloCells];
232  float dphi[NCaloCells];
233 
235 
237 
238 #if CALORECGPU_ADD_FULL_PAIRS_LIST_TO_CONSTANT_INFORMATION
239  NeighPairsArr neighPairs;
240 #endif
241 
243 
245 
246  constexpr static bool is_tile (const int cell)
247  {
248  return cell >= TileCellStart && cell < TileCellAfterEnd;
249  }
250 
251  constexpr bool is_HECIW_or_FCal(const int cell) const
252  {
253  const OtherCellInfo cell_info = otherCellInfo[cell];
254  return cell_info.is_HECIW_or_FCal();
255  }
256 
257  constexpr bool is_PS(const int cell) const
258  {
259  const OtherCellInfo cell_info = otherCellInfo[cell];
260  return cell_info.is_PS();
261  }
262 
263  constexpr int sampling(const int cell) const
264  {
265  const OtherCellInfo cell_info = otherCellInfo[cell];
266  return cell_info.sampling();
267  }
268 
269  constexpr int intra_calorimeter_sampling(const int cell) const
270  {
271  const OtherCellInfo cell_info = otherCellInfo[cell];
272  return cell_info.intra_calorimeter_sampling();
273  }
274 
275  constexpr int subcalo(const int cell) const
276  {
277  const OtherCellInfo cell_info = otherCellInfo[cell];
278  return cell_info.subcalo();
279  }
280 
281  constexpr int region(const int cell) const
282  {
283  const OtherCellInfo cell_info = otherCellInfo[cell];
284  return cell_info.region();
285  }
286 
292  constexpr int get_neighbours(const unsigned int neigh_options, const int cell, int * neigh_arr) const
293  {
294  return neighbours.get_neighbours(neigh_options, cell, neigh_arr);
295  }
296 
297  constexpr int get_number_of_neighbours(const unsigned int neigh_options, const int cell) const
298  {
299  return neighbours.get_number_of_neighbours(neigh_options, cell);
300  }
301 
303  {
304  for (int i = 0; i < NCaloCells; ++i)
305  {
307  }
308 
309  struct DeAllocWrapper
310  {
311  int * buf;
312  CUDA_HOS_DEV DeAllocWrapper(const size_t new_size)
313  {
314  buf = new int[Helpers::int_ceil_div(new_size, sizeof(int))];
315  }
316  CUDA_HOS_DEV ~DeAllocWrapper()
317  {
318  delete[] buf;
319  }
320  CUDA_HOS_DEV DeAllocWrapper (const DeAllocWrapper &) = delete;
321  CUDA_HOS_DEV DeAllocWrapper (DeAllocWrapper &&) = delete;
322  CUDA_HOS_DEV DeAllocWrapper & operator=(const DeAllocWrapper &) = delete;
323  CUDA_HOS_DEV DeAllocWrapper & operator=(DeAllocWrapper &&) = delete;
324  };
325  //Simple allocation/de-allocation
326  //to still be GPU-compatible if needed
327  //(new and delete valid on GPU code...),
328  //while still preventing leaks,
329  //all without pulling in unique_ptr.
330 
331  DeAllocWrapper wrapper(etaPhiToCell.finish_initializing_buffer_size());
332 
333  etaPhiToCell.finish_initializing(wrapper.buf);
334 
335  }
336 
337  constexpr int get_closest_cell(const int sampling, const float test_eta, const float test_phi) const
338  {
340 
341  const int n_cells = etaPhiToCell.get_possible_cells_from_coords(sampling, test_eta, test_phi, cells);
342 
343  if (n_cells < 1)
344  {
345  return -1;
346  }
347  else if (n_cells == 1)
348  {
349  return cells[0];
350  }
351  else
352  {
353  float distance = 1e38f;
354  int ret = -1;
355 
356  for (int i = 0; i < n_cells; ++i)
357  {
358  const int this_cell = cells[i];
359 
360  const float delta_eta = eta[this_cell] - test_eta;
361  const float delta_phi = Helpers::angular_difference(phi[this_cell], test_phi);
362 
363  const float this_dist = delta_eta * delta_eta + delta_phi * delta_phi;
364  if (this_dist < distance || (this_dist == distance && this_cell > ret))
365  {
366  distance = this_dist;
367  ret = this_cell;
368  }
369  }
370  return ret;
371  }
372  }
373  };
374 
376  {
377  using carrier = unsigned int;
379 
380  protected:
381 
382  static constexpr carrier s_first_16_bit_mask = 0x0000FFFFU;
383  static constexpr carrier s_last_16_bit_mask = 0xFFFF0000U;
385 
386  public:
387 
388 
389  constexpr operator carrier () const
390  {
391  return value;
392  }
393 
394  constexpr CellNoiseProperties (const carrier v): value(v)
395  {
396  }
397 
399  {
400  value = v;
401  return (*this);
402  }
403 
404  constexpr carrier version() const
405  {
406  return value & s_first_16_bit_mask;
407  }
408 
409  constexpr carrier noise_type() const
410  {
411  return (value & s_last_16_bit_mask) >> 16;
412  }
413 
414  constexpr bool is_electronic_noise() const
415  {
416  return is_valid() && ((value & s_last_16_bit_mask) == 0x00000000U);
417  }
418 
419  constexpr bool is_pile_up_noise() const
420  {
421  return is_valid() && ((value & s_last_16_bit_mask) == 0x00010000U);
422  }
423 
424  constexpr bool is_total_noise() const
425  {
426  return is_valid() && ((value & s_last_16_bit_mask) == 0x00020000U);
427  }
428 
431  {
432  value = (value << 16) | (version & s_first_16_bit_mask);
433  }
434 
435  constexpr bool is_invalid() const
436  {
438  }
439 
440  constexpr bool is_valid() const
441  {
442  return !is_invalid();
443  }
444 
445  static constexpr carrier invalid_value()
446  {
448  }
449 
450  };
451 
453  {
454  static constexpr int s_numDoubleGaussianConstants = 4;
455 
457  //Given the low number of possible gain sates
458 
460 
462 
463  float luminosity;
464 
465  constexpr float get_noise(const int cell, const int gain) const
466  {
467  return noise[cell][gain];
468  }
469 
470  protected:
471 
472  CUDA_HOS_DEV float get_double_gaussian_significance(const int cell, const int gain, const float energy) const
473  {
474 
475  using namespace std;
476 
477  const int delta_from_tile_start = cell - TileCellStart;
478 
479  const float sigma_1 = this->double_gaussian_constants[0][delta_from_tile_start][gain];
480  const float sigma_2 = this->double_gaussian_constants[1][delta_from_tile_start][gain];
481  const float ratio = this->double_gaussian_constants[2][delta_from_tile_start][gain];
482 
483  if ((sigma_1 == 0.f && sigma_2 == 0.f) || energy == 0.f)
484  {
485  return 0.f;
486  }
487  else if (sigma_1 == 0.f)
488  {
489  return energy / sigma_2;
490  }
491  else if (ratio == 0.f || sigma_2 == 0.f)
492  {
493  return energy / sigma_1;
494  }
495 
496  const float x_1 = energy / sigma_1;
497  const float x_2 = energy / sigma_2;
498  const float x_1_abs = fabsf(x_1);
499  const float x_2_abs = fabsf(x_2);
500 
501  const float min_abs = min(x_1_abs, x_2_abs);
502 
503  const float max_abs = max(x_1_abs, x_2_abs);
504 
505  if (min_abs > 7.4f)
506  {
507  return min_abs;
508  }
509  if (max_abs < 0.9f)
510  {
511  return max_abs;
512  }
513 
514  const float y_1 = erff(Helpers::Constants::inv_sqrt2<float> * x_1);
515  const float y_2 = erff(Helpers::Constants::inv_sqrt2<float> * x_2);
516 
517 
518  const float z = (y_1 * sigma_1 + ratio * y_2 * sigma_2) / (sigma_1 + ratio * sigma_2);
519 
520  const float ret = Helpers::Constants::sqrt2<float> * Helpers::erf_inv_wrapper(z);
521 
522  //printf("GPU %d %f %f %f %f %f %f\n", delta_from_tile_start, min_abs, max_abs, y_1, y_2, z, ret);
523 
524  return ret;
525 
526  }
527 
528  public:
529 
532  CUDA_HOS_DEV float get_double_gaussian_noise(const int cell, const int gain, const float energy) const
533  {
534  using namespace std;
535 
536  CellNoiseProperties props(this->noise_properties);
537  if (!props.is_valid())
538  {
539  return get_noise(cell, gain);
540  }
541 
543 
544  const float first_factor = (sigma != 0.f ? fabsf(energy / sigma) : 0.f);
545 
546  if (props.is_electronic_noise())
547  {
548  return first_factor;
549  }
550  else
551  {
552  const float second_factor = this->double_gaussian_constants[3][cell - TileCellStart][gain];
553 
554  switch (props.version())
555  {
556  case 1:
557  return sqrtf(first_factor * first_factor + second_factor * second_factor * this->luminosity);
558  case 2:
559  return first_factor + second_factor * this->luminosity;
560  default:
561  return 0.f / 0.f;
562  }
563  }
564  }
565 
566  };
567 
568 }
569 
570 #endif
NeighArr.h
CaloRecGPU::CellNoiseProperties::invalid_value
static constexpr carrier invalid_value()
Definition: ConstantInfoDefinitions.h:445
CaloRecGPU::GeometryArr::intra_calorimeter_sampling
constexpr int intra_calorimeter_sampling(const int cell) const
Definition: ConstantInfoDefinitions.h:269
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
CaloRecGPU::OtherCellInfo::operator=
constexpr OtherCellInfo & operator=(const carrier v)
Definition: ConstantInfoDefinitions.h:165
CaloRecGPU::OtherCellInfo::OtherCellInfo
constexpr OtherCellInfo(const carrier v)
Definition: ConstantInfoDefinitions.h:161
CaloRecGPU::GeometryArr::is_PS
constexpr bool is_PS(const int cell) const
Definition: ConstantInfoDefinitions.h:257
CaloRecGPU::GeometryArr::dr
float dr[NCaloCells]
Definition: ConstantInfoDefinitions.h:230
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
CaloRecGPU::OtherCellInfo::subcalo
constexpr carrier subcalo() const
Definition: ConstantInfoDefinitions.h:181
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
CaloRecGPU::CellNoiseProperties::is_total_noise
constexpr bool is_total_noise() const
Definition: ConstantInfoDefinitions.h:424
CaloRecGPU::GeometryArr::get_closest_cell
constexpr int get_closest_cell(const int sampling, const float test_eta, const float test_phi) const
Definition: ConstantInfoDefinitions.h:337
CaloRecGPU::GeometryArr::dz
float dz[NCaloCells]
Definition: ConstantInfoDefinitions.h:229
CaloRecGPU::GeometryArr::phi
float phi[NCaloCells]
Definition: ConstantInfoDefinitions.h:225
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
CaloRecGPU::GeometryArr::get_neighbours
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...
Definition: ConstantInfoDefinitions.h:292
CaloRecGPU::GeometryArr::dy
float dy[NCaloCells]
Definition: ConstantInfoDefinitions.h:228
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
CaloRecGPU::GeometryArr::r
float r[NCaloCells]
Definition: ConstantInfoDefinitions.h:223
CaloRecGPU::GeometryArr::y
float y[NCaloCells]
Definition: ConstantInfoDefinitions.h:221
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CaloRecGPU::CellNoiseProperties::is_invalid
constexpr bool is_invalid() const
Definition: ConstantInfoDefinitions.h:435
CaloRecGPU::Helpers::int_ceil_div
constexpr int int_ceil_div(const int num, const int denom)
Returns the ceiling of num/denom, with proper rounding.
Definition: Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h:214
CaloRecGPU::CellNoiseArr::get_double_gaussian_noise
CUDA_HOS_DEV float get_double_gaussian_noise(const int cell, const int gain, const float energy) const
Calculates the double gaussian noise for a Tile cell.
Definition: ConstantInfoDefinitions.h:532
CaloRecGPU::GeometryArr::etaPhiToCell
EtaPhiToCellMap etaPhiToCell
Definition: ConstantInfoDefinitions.h:242
CaloRecGPU::OtherCellInfo::carrier
unsigned int carrier
Definition: ConstantInfoDefinitions.h:126
CaloRecGPU::ConstantEnumConversion::to_subcalo_enum
constexpr static int to_subcalo_enum(const int subcalo)
Definition: ConstantInfoDefinitions.h:40
CaloRecGPU::OtherCellInfo::s_is_PS_flag
static constexpr carrier s_is_PS_flag
Definition: ConstantInfoDefinitions.h:137
CaloRecGPU::GeometryArr::region
constexpr int region(const int cell) const
Definition: ConstantInfoDefinitions.h:281
CaloRecGPU::CellNoiseProperties::operator=
constexpr CellNoiseProperties & operator=(const carrier v)
Definition: ConstantInfoDefinitions.h:398
CaloRecGPU::GeometryArr::z
float z[NCaloCells]
Definition: ConstantInfoDefinitions.h:222
CaloRecGPU::GeometryArr::eta
float eta[NCaloCells]
Definition: ConstantInfoDefinitions.h:224
CaloRecGPU::CellNoiseArr::noise_properties
CellNoiseProperties::carrier noise_properties
Definition: ConstantInfoDefinitions.h:461
CaloRecGPU::OtherCellInfo::s_region_offset
static constexpr carrier s_region_offset
Definition: ConstantInfoDefinitions.h:143
CaloRecGPU::CellNoiseProperties::is_pile_up_noise
constexpr bool is_pile_up_noise() const
Definition: ConstantInfoDefinitions.h:419
CaloRecGPU::NeighArr::get_neighbours
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...
Definition: NeighArr.h:202
CaloRecGPU::GeometryArr::get_number_of_neighbours
constexpr int get_number_of_neighbours(const unsigned int neigh_options, const int cell) const
Definition: ConstantInfoDefinitions.h:297
CaloRecGPU::NeighArr
Definition: NeighArr.h:171
CaloRecGPU::OtherCellInfo::s_sampling_offset
static constexpr carrier s_sampling_offset
Definition: ConstantInfoDefinitions.h:140
CaloRecGPU::CellNoiseArr
Definition: ConstantInfoDefinitions.h:453
CaloRecGPU::GeometryArr::x
float x[NCaloCells]
Definition: ConstantInfoDefinitions.h:220
CaloRecGPU::EtaPhiToCellMap
Definition: EtaPhiMap.h:672
CaloRecGPU::ConstantEnumConversion::s_region_unknown
constexpr static int s_region_unknown
Definition: ConstantInfoDefinitions.h:54
CaloRecGPU::CellNoiseProperties::version
constexpr carrier version() const
Definition: ConstantInfoDefinitions.h:404
CaloRecGPU::CellNoiseProperties::s_last_16_bit_mask
static constexpr carrier s_last_16_bit_mask
Definition: ConstantInfoDefinitions.h:383
CaloRecGPU::CellNoiseProperties::carrier
unsigned int carrier
Definition: ConstantInfoDefinitions.h:377
Ringer::PS
@ PS
Definition: CaloRingsDefs.h:46
CaloRecGPU::OtherCellInfo::s_region_mask
static constexpr carrier s_region_mask
Definition: ConstantInfoDefinitions.h:135
EtaPhiMap.h
CaloRecGPU::TileCellAfterEnd
constexpr int TileCellAfterEnd
Definition: BaseDefinitions.h:19
CUDA_HOS_DEV
#define CUDA_HOS_DEV
Definition: Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h:101
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
CaloRecGPU::GeometryArr::dx
float dx[NCaloCells]
Definition: ConstantInfoDefinitions.h:227
CaloRecGPU::OtherCellInfo::s_bits_unused
static constexpr carrier s_bits_unused
Definition: ConstantInfoDefinitions.h:152
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
CaloRecGPU::GeometryArr::is_tile
constexpr static bool is_tile(const int cell)
Definition: ConstantInfoDefinitions.h:246
CaloRecGPU::OtherCellInfo::OtherCellInfo
constexpr OtherCellInfo(const carrier sampling, const carrier intra_calo_sampling, const carrier subcalo, const carrier region, const bool PS, const bool HECIW_or_FCal)
Definition: ConstantInfoDefinitions.h:201
CaloRecGPU::GeometryArr::deta
float deta[NCaloCells]
Definition: ConstantInfoDefinitions.h:231
CaloRecGPU::ConstantEnumConversion::to_intra_calorimeter_sampling_enum
constexpr static int to_intra_calorimeter_sampling_enum(const int sampling)
Definition: ConstantInfoDefinitions.h:102
CaloRecGPU::OtherCellInfo::s_bits_used
static constexpr carrier s_bits_used
Definition: ConstantInfoDefinitions.h:145
hist_file_dump.f
f
Definition: hist_file_dump.py:135
CaloRecGPU::GeometryArr::sampling
constexpr int sampling(const int cell) const
Definition: ConstantInfoDefinitions.h:263
CaloRecGPU::NCaloCells
constexpr int NCaloCells
Definition: BaseDefinitions.h:13
CaloRecGPU::ConstantEnumConversion
Definition: ConstantInfoDefinitions.h:20
CaloRecGPU::CellNoiseProperties::CellNoiseProperties
constexpr CellNoiseProperties(const carrier version, const carrier noise_type)
Definition: ConstantInfoDefinitions.h:429
CaloRecGPU::CellNoiseProperties::s_invalid_double_gaussian
static constexpr carrier s_invalid_double_gaussian
Definition: ConstantInfoDefinitions.h:384
CaloRecGPU::NeighPairsArr
Definition: NeighArr.h:242
CaloRecGPU::OtherCellInfo
Definition: ConstantInfoDefinitions.h:125
CaloRecGPU::CellNoiseArr::noise
float noise[NCaloCells][NumGainStates]
Definition: ConstantInfoDefinitions.h:456
CaloRecGPU::ConstantEnumConversion::from_intra_calorimeter_sampling_enum
constexpr static int from_intra_calorimeter_sampling_enum(const int sampling)
Definition: ConstantInfoDefinitions.h:90
CaloRecGPU::CellNoiseProperties::is_electronic_noise
constexpr bool is_electronic_noise() const
Definition: ConstantInfoDefinitions.h:414
CaloRecGPU::OtherCellInfo::s_subcalo_offset
static constexpr carrier s_subcalo_offset
Definition: ConstantInfoDefinitions.h:142
CaloRecGPU::OtherCellInfo::is_HECIW_or_FCal
constexpr bool is_HECIW_or_FCal() const
Definition: ConstantInfoDefinitions.h:191
CaloRecGPU::CellNoiseProperties::s_first_16_bit_mask
static constexpr carrier s_first_16_bit_mask
Definition: ConstantInfoDefinitions.h:382
CaloRecGPU::EtaPhiToCellMap::finish_initializing
CUDA_HOS_DEV void finish_initializing(void *buffer)
!
Definition: EtaPhiMap.h:1107
CaloRecGPU::EtaPhiToCellMap::s_max_overlap_cells
static constexpr int s_max_overlap_cells
Definition: EtaPhiMap.h:673
CaloRecGPU::CellNoiseArr::luminosity
float luminosity
Definition: ConstantInfoDefinitions.h:463
CaloRecGPU::EtaPhiToCellMap::finish_initializing_buffer_size
constexpr size_t finish_initializing_buffer_size() const
Definition: EtaPhiMap.h:1097
CaloRecGPU::NumGainStates
constexpr int NumGainStates
Definition: BaseDefinitions.h:40
CaloRecGPU::OtherCellInfo::s_sampling_mask
static constexpr carrier s_sampling_mask
Definition: ConstantInfoDefinitions.h:132
CaloRecGPU::GeometryArr::subcalo
constexpr int subcalo(const int cell) const
Definition: ConstantInfoDefinitions.h:275
python.PyAthena.v
v
Definition: PyAthena.py:154
CaloRecGPU::CellNoiseProperties
Definition: ConstantInfoDefinitions.h:376
CaloRecGPU::GeometryArr::volume
float volume[NCaloCells]
Definition: ConstantInfoDefinitions.h:234
CaloRecGPU::GeometryArr::otherCellInfo
OtherCellInfo::carrier otherCellInfo[NCaloCells]
Definition: ConstantInfoDefinitions.h:244
CaloRecGPU::GeometryArr
Definition: ConstantInfoDefinitions.h:219
CaloRecGPU::CellNoiseArr::double_gaussian_constants
float double_gaussian_constants[s_numDoubleGaussianConstants][NTileCells][NumGainStates]
Definition: ConstantInfoDefinitions.h:459
CaloRecGPU::EtaPhiToCellMap::register_cell
constexpr void register_cell(const int cell, const int sampling, const float cell_eta, const float cell_phi, const float cell_deta, const float cell_dphi)
Definition: EtaPhiMap.h:1091
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
CaloRecGPU::CellNoiseArr::get_noise
constexpr float get_noise(const int cell, const int gain) const
Definition: ConstantInfoDefinitions.h:465
CaloRecGPU::OtherCellInfo::value
carrier value
Definition: ConstantInfoDefinitions.h:128
CaloRecGPU::CellNoiseProperties::value
carrier value
Definition: ConstantInfoDefinitions.h:378
eFEXNTuple.delta_phi
def delta_phi(phi1, phi2)
Definition: eFEXNTuple.py:15
CaloRecGPU::ConstantEnumConversion::from_region_enum
constexpr static int from_region_enum(const int region)
Definition: ConstantInfoDefinitions.h:59
CaloRecGPU::CellNoiseProperties::noise_type
constexpr carrier noise_type() const
Definition: ConstantInfoDefinitions.h:409
CaloRecGPU::ConstantEnumConversion::s_region_unknown_replacement
constexpr static int s_region_unknown_replacement
Definition: ConstantInfoDefinitions.h:55
CaloRecGPU::OtherCellInfo::s_subcalo_mask
static constexpr carrier s_subcalo_mask
Definition: ConstantInfoDefinitions.h:134
CaloRecGPU::CellNoiseArr::get_double_gaussian_significance
CUDA_HOS_DEV float get_double_gaussian_significance(const int cell, const int gain, const float energy) const
Definition: ConstantInfoDefinitions.h:472
CaloRecGPU::OtherCellInfo::sampling
constexpr carrier sampling() const
Definition: ConstantInfoDefinitions.h:171
CaloRecGPU::OtherCellInfo::s_intra_sampling_offset
static constexpr carrier s_intra_sampling_offset
Definition: ConstantInfoDefinitions.h:141
CaloRecGPU::CellNoiseArr::s_numDoubleGaussianConstants
static constexpr int s_numDoubleGaussianConstants
Definition: ConstantInfoDefinitions.h:454
CaloRecGPU::ConstantEnumConversion::s_sampling_unknown
constexpr static int s_sampling_unknown
Definition: ConstantInfoDefinitions.h:85
CaloRecGPU::ConstantEnumConversion::to_region_enum
constexpr static int to_region_enum(const int region)
Definition: ConstantInfoDefinitions.h:71
CaloRecGPU::OtherCellInfo::intra_calorimeter_sampling
constexpr carrier intra_calorimeter_sampling() const
Definition: ConstantInfoDefinitions.h:176
CaloRecGPU::GeometryArr::neighbours
NeighArr neighbours
Definition: ConstantInfoDefinitions.h:236
CaloRecGPU::ConstantEnumConversion::s_sampling_unknown_replacement
constexpr static int s_sampling_unknown_replacement
Definition: ConstantInfoDefinitions.h:86
CaloRecGPU::GeometryArr::fill_eta_phi_map
CUDA_HOS_DEV void fill_eta_phi_map()
Definition: ConstantInfoDefinitions.h:302
CaloRecGPU::ConstantEnumConversion::s_subcalo_unknown
constexpr static int s_subcalo_unknown
Definition: ConstantInfoDefinitions.h:23
CaloRecGPU::NeighArr::get_number_of_neighbours
constexpr int get_number_of_neighbours(const unsigned int neigh_options, const int cell) const
Definition: NeighArr.h:226
CaloRecGPU::NTileCells
constexpr int NTileCells
Definition: BaseDefinitions.h:21
CaloRecGPU::OtherCellInfo::region
constexpr carrier region() const
Definition: ConstantInfoDefinitions.h:186
CaloRecGPU
Definition: BaseDefinitions.h:11
CaloRecGPU::CellNoiseProperties::is_valid
constexpr bool is_valid() const
Definition: ConstantInfoDefinitions.h:440
CaloRecGPU::GeometryArr::is_HECIW_or_FCal
constexpr bool is_HECIW_or_FCal(const int cell) const
Definition: ConstantInfoDefinitions.h:251
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
CaloRecGPU::ConstantEnumConversion::s_subcalo_unknown_replacement
constexpr static int s_subcalo_unknown_replacement
Definition: ConstantInfoDefinitions.h:24
CaloRecGPU::OtherCellInfo::s_intra_sampling_mask
static constexpr carrier s_intra_sampling_mask
Definition: ConstantInfoDefinitions.h:133
CaloRecGPU::TileCellStart
constexpr int TileCellStart
Definition: BaseDefinitions.h:17
Helpers.h
CaloRecGPU::CellNoiseProperties::CellNoiseProperties
constexpr CellNoiseProperties(const carrier v)
Definition: ConstantInfoDefinitions.h:394
CaloRecGPU::EtaPhiToCellMap::get_possible_cells_from_coords
constexpr int get_possible_cells_from_coords(const int sampling, const float test_eta, const float test_phi, int *cell_arr) const
We assume cell_arr is large enough.
Definition: EtaPhiMap.h:1113
CaloRecGPU::OtherCellInfo::is_PS
constexpr bool is_PS() const
Definition: ConstantInfoDefinitions.h:196
CaloRecGPU::GeometryArr::dphi
float dphi[NCaloCells]
Definition: ConstantInfoDefinitions.h:232
BaseDefinitions.h
CaloRecGPU::ConstantEnumConversion::from_subcalo_enum
constexpr static int from_subcalo_enum(const int subcalo)
Definition: ConstantInfoDefinitions.h:28
CaloRecGPU::OtherCellInfo::s_is_HECIW_FCal_flag
static constexpr carrier s_is_HECIW_FCal_flag
Definition: ConstantInfoDefinitions.h:138