ATLAS Offline Software
BaseDefinitions.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_BASEDEFINITIONS_H
8 #define CALORECGPU_BASEDEFINITIONS_H
9 
10 namespace CaloRecGPU
11 {
12  constexpr inline int NMaxNeighbours = 34;
13  constexpr inline int NCaloCells = 187652;
14  //Max index will be 0x0002 DD03
15 
16  constexpr inline int LArCellStart = 0;
17  constexpr inline int TileCellStart = 182468;
18  constexpr inline int LArCellAfterEnd = TileCellStart;
19  constexpr inline int TileCellAfterEnd = NCaloCells;
20  constexpr inline int NLArCells = LArCellAfterEnd - LArCellStart;
21  constexpr inline int NTileCells = TileCellAfterEnd - TileCellStart;
22 
23  //These values should be constant
24  //If there are any changes to that...
25  //Well, we'll have to update them here.
26  //But it's not something that would change at run time.
27 
28  constexpr inline int NMaxClusters = 0x10000U;
29  //So it all fits in an int16_t
30  //Would only start getting fishy if all the cells
31  //were part of a cluster and all the clusters
32  //had an average number of cells lower than 2.863...
33  //(Or, in general, for N cells not part of a cluster,
34  // an average number of cells per cluster lower than 2.863 - N/65536...)
35 
36  constexpr inline int NMaxPairs = 0x400000U;
37  constexpr inline int NExactPairs = 2560816;
38  //The actual (measured) value is 2560816, we rounded to the next power of two...
39 
40  constexpr inline int NumGainStates = 4;
41  //This is the number of different gain states a cell can have.
42  //(For the noise calculation.)
43 
44  constexpr inline int NumSamplings = 28;
45  //The number of samplings in the calorimeter.
46 
47  constexpr inline int NumNeighOptions = 12;
48  //The non-combined choices for LArNeighbours::neighbourOption:
49  //prevInPhi = 0x0001, -> starts at 0
50  //nextInPhi = 0x0002, -> starts at NeighOffset.get_number(0)
51  //prevInEta = 0x0004, -> starts at NeighOffset.get_number(1)
52  //nextInEta = 0x0008, -> starts at NeighOffset.get_number(2)
53  //corners2D = 0x0010, -> starts at NeighOffset.get_number(3)
54  //prevInSamp = 0x0020, -> starts at NeighOffset.get_number(4)
55  //nextInSamp = 0x0040, -> starts at NeighOffset.get_number(5)
56  //prevSubDet = 0x0080, -> starts at NeighOffset.get_number(6)
57  //nextSubDet = 0x0100, -> starts at NeighOffset.get_number(7)
58  //corners3D = 0x0200, -> starts at NeighOffset.get_number(8)
59  //prevSuperCalo = 0x0400, -> starts at NeighOffset.get_number(9)
60  //nextSuperCalo = 0x0800 -> starts at NeighOffset.get_number(10)
61  // end -> NeighOffset.get_number(11)
62 
63 }
64 
65 #endif
CaloRecGPU::NMaxPairs
constexpr int NMaxPairs
Definition: BaseDefinitions.h:36
CaloRecGPU::NExactPairs
constexpr int NExactPairs
Definition: BaseDefinitions.h:37
CaloRecGPU::LArCellAfterEnd
constexpr int LArCellAfterEnd
Definition: BaseDefinitions.h:18
CaloRecGPU::NumSamplings
constexpr int NumSamplings
Definition: BaseDefinitions.h:44
CaloRecGPU::TileCellAfterEnd
constexpr int TileCellAfterEnd
Definition: BaseDefinitions.h:19
CaloRecGPU::NCaloCells
constexpr int NCaloCells
Definition: BaseDefinitions.h:13
CaloRecGPU::NMaxNeighbours
constexpr int NMaxNeighbours
Definition: BaseDefinitions.h:12
CaloRecGPU::LArCellStart
constexpr int LArCellStart
Definition: BaseDefinitions.h:16
CaloRecGPU::NumGainStates
constexpr int NumGainStates
Definition: BaseDefinitions.h:40
CaloRecGPU::NumNeighOptions
constexpr int NumNeighOptions
Definition: BaseDefinitions.h:47
CaloRecGPU::NMaxClusters
constexpr int NMaxClusters
Definition: BaseDefinitions.h:28
CaloRecGPU::NLArCells
constexpr int NLArCells
Definition: BaseDefinitions.h:20
CaloRecGPU::NTileCells
constexpr int NTileCells
Definition: BaseDefinitions.h:21
CaloRecGPU
Definition: BaseDefinitions.h:11
CaloRecGPU::TileCellStart
constexpr int TileCellStart
Definition: BaseDefinitions.h:17