Project
Loading...
Searching...
No Matches
SpecsV2.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef O2_ALICE_ITS3_SPECS
18#define O2_ALICE_ITS3_SPECS
19
20#include "Rtypes.h"
21
22#include <array>
23
25{
26constexpr float cm{1e+2}; // This is the default unit of TGeo so we use this as scale
27constexpr float mu{1e-6 * cm};
28constexpr float mm{1e-3 * cm};
29namespace pixelarray
30{
31constexpr float width{9.197 * mm};
32constexpr float length{3.571 * mm};
33constexpr int nCols{156};
34constexpr int nRows{442};
35constexpr int nPixels{nRows * nCols};
36constexpr EColor color{kGreen};
37constexpr float area{width * length};
38} // namespace pixelarray
39namespace tile
40{
41namespace biasing
42{
43constexpr float width{0.06 * mm};
44constexpr float length{3.571 * mm};
45constexpr EColor color{kYellow};
46static_assert(length == pixelarray::length);
47} // namespace biasing
48namespace powerswitches
49{
50constexpr float width{9.257 * mm};
51constexpr float length{0.02 * mm};
52constexpr float z{pixelarray::width};
53constexpr EColor color{kBlue};
54} // namespace powerswitches
55namespace readout
56{
57constexpr float width{0.525 * mm};
58constexpr float length{3.591 * mm};
59constexpr EColor color{kMagenta};
60static_assert(length == (biasing::length + powerswitches::length));
61} // namespace readout
62constexpr float length{readout::length};
64} // namespace tile
65namespace rsu
66{
67namespace databackbone
68{
69constexpr float width{9.782 * mm};
70constexpr float length{0.06 * mm};
71constexpr EColor color{kRed};
72} // namespace databackbone
73constexpr float width{19.564 * mm};
74constexpr float length{21.666 * mm};
75constexpr unsigned int nTiles{12};
76} // namespace rsu
77namespace segment
78{
79constexpr float width{rsu::width};
80namespace lec
81{
82constexpr float width{segment::width};
83constexpr float length{4.5 * mm};
84constexpr EColor color{kCyan};
85} // namespace lec
86namespace rec
87{
88constexpr float width{segment::width};
89constexpr float length{1.5 * mm};
90constexpr EColor color{kCyan};
91} // namespace rec
92constexpr unsigned int nRSUs{12};
93constexpr unsigned int nTilesPerSegment{nRSUs * rsu::nTiles};
96} // namespace segment
97namespace carbonfoam
98{
99// TODO: Waiting for the further information from WP5(Corrado)
100constexpr float longeronsWidth{2.0 * mm}; // what is the height of the longerons?
101constexpr float longeronsLength{263 * mm}; // from blueprint
102constexpr float HringLength{6.0 * mm}; // from blueprint
103constexpr float edgeBetwChipAndFoam{1.0 * mm}; // from blueprint but not used cause forms are already overlapping
104constexpr float gapBetwHringsLongerons{0.05 * mm}; // from blueprint
105constexpr std::array<int, 3> nHoles{11, 11, 11}; // how many holes for each layer?
106constexpr std::array<float, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // what is the radius of the holes for each layer?
107constexpr EColor color{kGray};
108} // namespace carbonfoam
109constexpr unsigned int nLayers{3};
110constexpr unsigned int nTotLayers{7};
111constexpr unsigned int nSensorsIB{2 * nLayers};
112constexpr float equatorialGap{1 * mm};
113constexpr std::array<unsigned int, nLayers> nSegments{3, 4, 5};
114constexpr float thickness{50 * mu}; //< Physical Thickness of chip
115constexpr float effThickness{66 * mu}; //< Physical thickness + metal substrate
116constexpr std::array<float, nLayers> radii{19.0006 * mm, 25.228 * mm, 31.4554 * mm}; // middle radius e.g. inner radius+thickness/2.
117constexpr std::array<float, nLayers> radiiInner{radii[0] - thickness / 2.f, radii[1] - thickness / 2.f, radii[2] - thickness / 2.f}; // inner radius
118constexpr std::array<float, nLayers> radiiOuter{radii[0] + thickness / 2.f, radii[1] + thickness / 2.f, radii[2] + thickness / 2.f}; // inner radius
119namespace detID
120{
121constexpr unsigned int mDetIDs{2 * 12 * 12 * 12}; //< 2 Hemispheres * (3,4,5=12 segments in a layer) * 12 RSUs in a segment * 12 Tiles in a RSU
122constexpr unsigned int l0IDStart{0}; //< Start DetID layer 0
123constexpr unsigned int l0IDEnd{2 * 3 * 12 * 12 - 1}; //< End First DetID layer 0; inclusive range
124constexpr unsigned int l0IDTot{2 * 3 * 12 * 12}; //< Total DetID in Layer 0
125constexpr unsigned int l1IDStart{l0IDEnd + 1}; //< Start DetID layer 1
126constexpr unsigned int l1IDEnd{l1IDStart + 2 * 4 * 12 * 12 - 1}; //< End First DetID layer 1; inclusive range
127constexpr unsigned int l1IDTot{2 * 4 * 12 * 12}; //< Total DetID in Layer 1
128constexpr unsigned int l2IDStart{l1IDEnd + 1}; //< Start DetID layer 2
129constexpr unsigned int l2IDEnd{l2IDStart + 2 * 5 * 12 * 12 - 1}; //< End First DetID layer 2; inclusive range
130constexpr unsigned int l2IDTot{2 * 5 * 12 * 12}; //< Total DetID in Layer 2
131constexpr unsigned int nChips{l2IDEnd + 1}; //< number of Chips (PixelArrays) in IB
132
133template <typename T = int>
134inline T getDetID2Layer(T detID)
135{
136 if (static_cast<T>(l0IDStart) <= detID && detID <= static_cast<T>(l0IDEnd)) {
137 return 0;
138 } else if (static_cast<T>(l1IDStart) <= detID && detID <= static_cast<T>(l1IDEnd)) {
139 return 1;
140 } else if (static_cast<T>(l2IDStart) <= detID && detID <= static_cast<T>(l2IDEnd)) {
141 return 2;
142 }
143 return -1;
144}
145
146template <typename T = int>
147inline T getSensorID(T detID)
148{
149 auto layer = getDetID2Layer(detID);
150 if (layer == 0) {
151 return ((detID - l0IDStart) < static_cast<T>(l0IDTot) / 2) ? 0 : 1;
152 } else if (layer == 1) {
153 return ((detID - l1IDStart) < static_cast<T>(l1IDTot) / 2) ? 2 : 3;
154 } else if (layer == 2) {
155 return ((detID - l2IDStart) < static_cast<T>(l2IDTot) / 2) ? 4 : 5;
156 }
157 return -1;
158}
159
160template <typename T = int>
161inline bool isDetITS3(T detID)
162{
163 return detID < static_cast<T>(nChips);
164}
165
166} // namespace detID
167} // namespace o2::its3::constants
168
169#endif
GLuint segment
Definition glcorearb.h:4945
GLuint color
Definition glcorearb.h:1272
GLint GLsizei width
Definition glcorearb.h:270
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
constexpr float longeronsWidth
Definition SpecsV2.h:100
constexpr float edgeBetwChipAndFoam
Definition SpecsV2.h:103
constexpr std::array< float, 3 > radiusHoles
Definition SpecsV2.h:106
constexpr float gapBetwHringsLongerons
Definition SpecsV2.h:104
constexpr float HringLength
Definition SpecsV2.h:102
constexpr float longeronsLength
Definition SpecsV2.h:101
constexpr std::array< int, 3 > nHoles
Definition SpecsV2.h:105
constexpr unsigned int nChips
Definition SpecsV2.h:131
constexpr unsigned int l2IDTot
Definition SpecsV2.h:130
constexpr unsigned int l1IDStart
Definition SpecsV2.h:125
constexpr unsigned int l0IDStart
Definition SpecsV2.h:122
constexpr unsigned int l2IDEnd
Definition SpecsV2.h:129
constexpr unsigned int l2IDStart
Definition SpecsV2.h:128
constexpr unsigned int l0IDTot
Definition SpecsV2.h:124
constexpr unsigned int l1IDEnd
Definition SpecsV2.h:126
bool isDetITS3(T detID)
Definition SpecsV2.h:161
constexpr unsigned int l1IDTot
Definition SpecsV2.h:127
constexpr unsigned int mDetIDs
Definition SpecsV2.h:121
constexpr unsigned int l0IDEnd
Definition SpecsV2.h:123
constexpr float width
Definition SpecsV2.h:73
constexpr float length
Definition SpecsV2.h:74
constexpr unsigned int nTiles
Definition SpecsV2.h:75
constexpr float lengthSensitive
Definition SpecsV2.h:95
constexpr unsigned int nRSUs
Definition SpecsV2.h:92
constexpr unsigned int nTilesPerSegment
Definition SpecsV2.h:93
constexpr float cm
Definition SpecsV2.h:26
constexpr float mm
Definition SpecsV2.h:28
constexpr unsigned int nSensorsIB
Definition SpecsV2.h:111
constexpr std::array< unsigned int, nLayers > nSegments
Definition SpecsV2.h:113
constexpr std::array< float, nLayers > radiiOuter
Definition SpecsV2.h:118
constexpr float effThickness
Definition SpecsV2.h:115
constexpr float thickness
Definition SpecsV2.h:114
constexpr float equatorialGap
Definition SpecsV2.h:112
constexpr unsigned int nTotLayers
Definition SpecsV2.h:110
constexpr std::array< float, nLayers > radiiInner
Definition SpecsV2.h:117
constexpr std::array< float, nLayers > radii
Definition SpecsV2.h:116
constexpr float mu
Definition SpecsV2.h:27
constexpr unsigned int nLayers
Definition SpecsV2.h:109
GPUReconstruction * rec