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