Project
Loading...
Searching...
No Matches
GeometryBase.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
12#ifndef O2_TRD_GEOMETRYBASE_H
13#define O2_TRD_GEOMETRYBASE_H
14
15#include "GPUCommonDef.h"
17#include "TRDBase/PadPlane.h"
18
19namespace o2
20{
21namespace trd
22{
24{
25 public:
26 ~GeometryBase() = default;
27
28 GPUd() int isVersion() { return 1; }
29 GPUd() bool isHole(int la, int st, int se) const { return (((se == 13) || (se == 14) || (se == 15)) && (st == 2)); }
30 GPUd() bool isOnBoundary(int det, float y, float z, float eps = 0.5) const;
31
32 GPUd() void setSMstatus(int sm, bool status)
33 {
34 if (status) {
35 mSMStatus |= 0x3ffff & (0x1 << sm);
36 } else {
37 mSMStatus &= ~(0x3ffff & (0x1 << sm));
38 }
39 }
40 GPUd() bool getSMstatus(int sm) const { return (mSMStatus & (0x1 << sm)) != 0; }
41 GPUd() static int getDetectorSec(int det) { return (det % (constants::NLAYER * constants::NSTACK)); }
42 GPUd() static int getDetectorSec(int layer, int stack) { return (layer + stack * constants::NLAYER); }
43 GPUd() static int getDetector(int layer, int stack, int sector) { return (layer + stack * constants::NLAYER + sector * constants::NLAYER * constants::NSTACK); }
44 GPUd() static int getLayer(int det) { return (det % constants::NLAYER); }
45 GPUd() static int getStack(int det) { return ((det % (constants::NLAYER * constants::NSTACK)) / constants::NLAYER); }
46 GPUd() int getStack(float z, int layer) const;
47
48 GPUd() const PadPlane* getPadPlane(int layer, int stack) const { return &mPadPlanes[getDetectorSec(layer, stack)]; }
49 GPUd() const PadPlane* getPadPlane(int det) const { return &mPadPlanes[getDetectorSec(det)]; }
50
51 GPUd() int getRowMax(int layer, int stack, int /*sector*/) const { return getPadPlane(layer, stack)->getNrows(); }
52 GPUd() int getColMax(int layer) const { return getPadPlane(layer, 0)->getNcols(); }
53 GPUd() float getRow0(int layer, int stack, int /*sector*/) const { return getPadPlane(layer, stack)->getRow0(); }
54 GPUd() float getCol0(int layer) const { return getPadPlane(layer, 0)->getCol0(); }
55
56 GPUd() float getRowPos(int layer, int stack, int row) { return mPadPlanes[getDetectorSec(layer, stack)].getRowPos(row); }
57 GPUd() float getRowSize(int layer, int stack, int row) { return mPadPlanes[getDetectorSec(layer, stack)].getRowSize(row); }
58 GPUd() float getRow0(int layer, int stack) { return mPadPlanes[getDetectorSec(layer, stack)].getRow0(); }
59 GPUd() float getRowEnd(int layer, int stack) { return mPadPlanes[getDetectorSec(layer, stack)].getRowEnd(); }
60
61 static constexpr GPUd() int getSector(int det) { return (det / (constants::NLAYER * constants::NSTACK)); }
62 static constexpr GPUd() float getTime0(int layer) { return TIME0[layer]; }
63 static constexpr GPUd() float getXtrdBeg() { return XTRDBEG; }
64 static constexpr GPUd() float getXtrdEnd() { return XTRDEND; }
65 static constexpr GPUd() float getChamberWidth(int layer) { return CWIDTH[layer]; }
66 static constexpr GPUd() float getChamberLength(int layer, int stack) { return CLENGTH[layer][stack]; }
67 static constexpr GPUd() float getAlpha() { return 2.0 * 3.14159265358979324 / constants::NSECTOR; }
68 static constexpr GPUd() float cheight() { return CH; }
69 static constexpr GPUd() float cheightSV() { return CHSV; }
70 static constexpr GPUd() float cspace() { return VSPACE; }
71 static constexpr GPUd() float craHght() { return CRAH; }
72 static constexpr GPUd() float cdrHght() { return CDRH; }
73 static constexpr GPUd() float camHght() { return CAMH; }
74 static constexpr GPUd() float croHght() { return CROH; }
75 static constexpr GPUd() float csvHght() { return CSVH; }
76 static constexpr GPUd() float croWid() { return CROW; }
77 static constexpr GPUd() float anodePos() { return ANODEPOS; }
78 static constexpr GPUd() float myThick() { return RMYTHICK; }
79 static constexpr GPUd() float drThick() { return DRTHICK; }
80 static constexpr GPUd() float amThick() { return AMTHICK; }
81 static constexpr GPUd() float drZpos() { return DRZPOS; }
82 static constexpr GPUd() float rpadW() { return RPADW; }
83 static constexpr GPUd() float cpadW() { return CPADW; }
84 static constexpr GPUd() float cwidcha() { return (SWIDTH2 - SWIDTH1) / SHEIGHT * (CH + VSPACE); }
85 static constexpr GPUd() int MCMmax() { return MCMMAX; }
86 static constexpr GPUd() int MCMrow() { return MCMROW; }
87 static constexpr GPUd() int ROBmaxC0() { return ROBMAXC0; }
88 static constexpr GPUd() int ROBmaxC1() { return ROBMAXC1; }
89 static constexpr GPUd() int ADCmax() { return ADCMAX; }
90 static constexpr GPUd() int TBmax() { return TBMAX; }
91 static constexpr GPUd() int padmax() { return PADMAX; }
92 static constexpr GPUd() int colmax() { return COLMAX; }
93 static constexpr GPUd() int rowmaxC0() { return ROWMAXC0; }
94 static constexpr GPUd() int rowmaxC1() { return ROWMAXC1; }
95
96 protected:
97 GeometryBase() = default;
98
99 static constexpr float TLENGTH = 751.0;
100
101 // Parameter of the super module mother volumes
102 static constexpr float SHEIGHT = 77.9;
103 static constexpr float SWIDTH1 = 94.881;
104 static constexpr float SWIDTH2 = 122.353;
105 static constexpr float SLENGTH = 702.0;
106
107 // Length of the additional space in front of the supermodule used for services
108 static constexpr float FLENGTH = (TLENGTH - SLENGTH) / 2.0;
109
110 static constexpr float SMPLTT = 0.2;
111
112 static constexpr float VSPACE = 1.784;
113 static constexpr float HSPACE = 2.0;
114 static constexpr float VROCSM = 1.2;
115
116 static constexpr float CRAH = 4.8;
117 static constexpr float CDRH = 3.0;
118 static constexpr float CAMH = 0.7;
119 static constexpr float CROH = 2.316;
120 static constexpr float CROW = 0.9;
121 static constexpr float CSVH = VSPACE - 0.742;
122 static constexpr float CH = CRAH + CDRH + CAMH + CROH;
123 static constexpr float CHSV = CH + CSVH;
124
125 // Distance of anode wire plane relative to middle of alignable volume
126 static constexpr float ANODEPOS = CRAH + CDRH + CAMH / 2.0 - CHSV / 2.0;
127
128 static constexpr float CALT = 0.4;
129 static constexpr float CCLST = 0.21;
130 static constexpr float CCLFT = 1.0;
131 static constexpr float CGLT = 0.25;
132 static constexpr float CCUTA = 1.0;
133 static constexpr float CCUTB = 0.8;
134 static constexpr float CAUT = 1.5;
135 static constexpr float CALW = 2.5;
136 static constexpr float CALH = 0.4;
137 static constexpr float CALWMOD = 0.4;
138 static constexpr float CALHMOD = 2.5;
139 static constexpr float CWSW = 1.2;
140 static constexpr float CWSH = 0.3;
141
142 static constexpr float CPADW = 0.0;
143 static constexpr float RPADW = 1.0;
144
145 //
146 // Thickness of the the material layers
147 //
148 static constexpr float DRTHICK = CDRH;
149 static constexpr float AMTHICK = CAMH;
150 static constexpr float XETHICK = DRTHICK + AMTHICK;
151 static constexpr float WRTHICK = 0.00011;
152
153 static constexpr float RMYTHICK = 0.0015;
154 static constexpr float RCBTHICK = 0.0055;
155 static constexpr float RGLTHICK = 0.0065;
156 static constexpr float RRHTHICK = 0.8;
157 static constexpr float RFBTHICK = CRAH - 2.0 * (RMYTHICK + RCBTHICK + RRHTHICK);
158
159 static constexpr float PPDTHICK = 0.0025;
160 static constexpr float PPPTHICK = 0.0356;
161 static constexpr float PGLTHICK = 0.1428;
162 static constexpr float PCBTHICK = 0.019;
163 static constexpr float PPCTHICK = 0.0486;
164 static constexpr float PRBTHICK = 0.0057;
165 static constexpr float PELTHICK = 0.0029;
166 static constexpr float PHCTHICK = CROH - PPDTHICK - PPPTHICK - PGLTHICK - PCBTHICK * 2.0 - PPCTHICK - PRBTHICK - PELTHICK;
167
168 //
169 // Position of the material layers
170 //
171 static constexpr float DRZPOS = 2.4;
172 static constexpr float AMZPOS = 0.0;
173 static constexpr float WRZPOSA = 0.0;
174 static constexpr float WRZPOSB = -AMTHICK / 2.0 + 0.001;
175 static constexpr float CALZPOS = 0.3;
176
177 static constexpr int MCMMAX = 16;
178 static constexpr int MCMROW = 4;
179 static constexpr int ROBMAXC0 = 6;
180 static constexpr int ROBMAXC1 = 8;
181 static constexpr int ADCMAX = 21;
182 static constexpr int TBMAX = 60;
183 static constexpr int PADMAX = 18;
184 static constexpr int COLMAX = 144;
185 static constexpr int ROWMAXC0 = 12;
186 static constexpr int ROWMAXC1 = 16;
187
188 static constexpr float TIME0BASE = 300.65;
189 // Time-position of pad 0
190 static constexpr float TIME0[6] = {TIME0BASE + 0 * (CH + VSPACE),
191 TIME0BASE + 1 * (CH + VSPACE),
192 TIME0BASE + 2 * (CH + VSPACE),
193 TIME0BASE + 3 * (CH + VSPACE),
194 TIME0BASE + 4 * (CH + VSPACE),
195 TIME0BASE + 5 * (CH + VSPACE)};
196
197 static constexpr float XTRDBEG = 288.43;
198 static constexpr float XTRDEND = 366.33;
199
200 // The outer width of the chambers
201 static constexpr float CWIDTH[constants::NLAYER] = {90.4, 94.8, 99.3, 103.7, 108.1, 112.6};
202
203 // The outer lengths of the chambers
204 // Includes the spacings between the chambers!
205 static constexpr float CLENGTH[constants::NLAYER][constants::NSTACK] = {
206 {124.0, 124.0, 110.0, 124.0, 124.0},
207 {124.0, 124.0, 110.0, 124.0, 124.0},
208 {131.0, 131.0, 110.0, 131.0, 131.0},
209 {138.0, 138.0, 110.0, 138.0, 138.0},
210 {145.0, 145.0, 110.0, 145.0, 145.0},
211 {147.0, 147.0, 110.0, 147.0, 147.0}};
212
214
215 int mSMStatus = 0x3ffff;
216
218};
219} // end namespace trd
220} // end namespace o2
221#endif
Global TRD definitions and constants.
static constexpr GPUd() float cwidcha()
static constexpr GPUd() float croHght()
static constexpr GPUd() int padmax()
static constexpr GPUd() int rowmaxC1()
static constexpr GPUd() float cspace()
static constexpr float PGLTHICK
Thickness of the glue layer.
static constexpr float PRBTHICK
Thickness of the PCB copper layers.
static constexpr GPUd() float getXtrdEnd()
static constexpr GPUd() float drThick()
static constexpr GPUd() float croWid()
static constexpr GPUd() float cheightSV()
static constexpr float AMZPOS
Position of the amplification region.
GPUd() int getColMax(int layer) const
static constexpr GPUd() float getAlpha()
static constexpr float PELTHICK
Thickness of all other electronics components (caps, etc.)
static constexpr float DRZPOS
Position of the drift region.
static constexpr float AMTHICK
Thickness of the amplification region.
static constexpr float CALHMOD
Height of additional aluminum ledge on lower frame.
static constexpr float CWSW
Width of additional wacosit ledge on lower frame.
static constexpr GPUd() int getSector(int det)
GPUd() float getRowPos(int layer
static constexpr float CWIDTH[constants::NLAYER]
static constexpr float TIME0[6]
static constexpr GPUd() float getTime0(int layer)
static constexpr GPUd() int colmax()
static constexpr float PPDTHICK
Thickness of copper of the pad plane.
static constexpr float CAUT
Al frame of back panel.
static constexpr float DRTHICK
Thickness of the drift region.
static constexpr float CGLT
Thichness of the glue around the radiator.
static constexpr float CSVH
Height of the services on top of the chambers.
static constexpr float RRHTHICK
Thickness of the rohacell layers in the radiator.
static constexpr float CWSH
Height of additional wacosit ledge on lower frame.
static constexpr float CLENGTH[constants::NLAYER][constants::NSTACK]
static constexpr int PADMAX
Maximum number of pads per MCM.
GPUd() int isVersion()
static constexpr float CHSV
Total height of the chambers (with services)
static constexpr int COLMAX
Maximum number of pads per padplane row.
GPUd() float getRowEnd(int layer
static constexpr GPUd() float rpadW()
GPUd() float getRow0(int layer
static constexpr float SWIDTH1
Lower width of the supermodule.
static constexpr float RFBTHICK
Thickness of the fiber layers in the radiator.
static constexpr float SLENGTH
Length of the supermodule.
static constexpr GPUd() float getXtrdBeg()
static constexpr GPUd() int MCMmax()
static constexpr float WRTHICK
Thickness of the wire planes.
static constexpr float PHCTHICK
Thickness of the honeycomb support structure.
static constexpr GPUd() float getChamberLength(int layer
GPUd() float getRowSize(int layer
static constexpr float CROW
Additional width of the readout chamber frames.
static constexpr float CCLFT
Thickness of the lower Wacosit frame front.
static constexpr int ROWMAXC0
Maximum number of Rows per C0 chamber.
static constexpr GPUd() float cpadW()
static constexpr float CROH
Height of the readout of the chambers.
static constexpr float PCBTHICK
Thickness of the carbon layers.
static constexpr GPUd() float anodePos()
static constexpr float CALZPOS
Position of the additional aluminum ledges.
static constexpr GPUd() int rowmaxC0()
static constexpr float TIME0BASE
Base value for calculation of Time-position of pad 0.
static constexpr int ROBMAXC0
Maximum number of ROBs per C0 chamber.
float float float eps
static constexpr float RCBTHICK
Thickness of the carbon layers in the radiator.
static constexpr GPUd() float camHght()
GPUd() const PadPlane *getPadPlane(int det) const
static constexpr float ANODEPOS
static constexpr float CCLST
Thickness of the lower Wacosit frame sides.
static constexpr GPUd() float amThick()
static constexpr int MCMROW
Maximum number of MCMs per ROB Row.
static constexpr float WRZPOSB
Position of the wire planes.
static constexpr GPUd() float drZpos()
static constexpr float RGLTHICK
Thickness of the glue layers in the radiator.
static constexpr float VROCSM
Radial distance of the first ROC to the outer plates of the SM.
static constexpr GPUd() float cheight()
PadPlane mPadPlanes[constants::NLAYER *constants::NSTACK]
ClassDefNV(GeometryBase, 1)
static constexpr int TBMAX
Maximum number of Time bins.
static constexpr float FLENGTH
static constexpr int ROWMAXC1
Maximum number of Rows per C1 chamber.
static constexpr GPUd() float cdrHght()
static constexpr GPUd() float csvHght()
static constexpr float CRAH
Height of the radiator part of the chambers.
static constexpr float PPPTHICK
Thickness of PCB board of the pad plane.
static constexpr float CALH
Height of additional aluminum ledge on lower frame.
static constexpr GPUd() int ROBmaxC0()
static constexpr int MCMMAX
Maximum number of MCMs per ROB.
static constexpr float VSPACE
Vertical spacing of the chambers.
static constexpr float SHEIGHT
Height of the supermodule.
static constexpr float CDRH
Height of the drift region of the chambers.
static constexpr float CCUTB
Thickness of the upper Wacosit frame around amp. region.
static constexpr float SMPLTT
Thickness of the super module side plates.
static constexpr float HSPACE
Horizontal spacing of the chambers.
static constexpr float CH
Total height of the chambers (w/o services)
static constexpr GPUd() int MCMrow()
static constexpr GPUd() float getChamberWidth(int layer)
static constexpr int ADCMAX
Maximum number of ADC channels per MCM.
static constexpr GPUd() float myThick()
static constexpr float CALWMOD
Width of additional aluminum ledge on lower frame.
static constexpr float RMYTHICK
Thickness of the mylar layers in the radiator.
static constexpr float SWIDTH2
Upper width of the supermodule.
static constexpr GPUd() float craHght()
static constexpr float CPADW
static constexpr GPUd() int ROBmaxC1()
static constexpr float XTRDBEG
X-coordinate in tracking system of begin of TRD mother volume.
static constexpr float XETHICK
Thickness of the gas volume.
static constexpr GPUd() int TBmax()
static constexpr int ROBMAXC1
Maximum number of ROBs per C1 chamber.
static constexpr float PPCTHICK
Thickness of the PCB readout boards.
static constexpr float RPADW
>Difference of outer chamber width and pad plane width
static constexpr float CALW
Width of additional aluminum ledge on lower frame.
static constexpr GPUd() int ADCmax()
static constexpr float WRZPOSA
Position of the wire planes.
static constexpr float CAMH
Height of the amplification region of the chambers.
static constexpr float CCUTA
Upper Wacosit frame around amplification region.
static constexpr float TLENGTH
Total length of the TRD mother volume.
static constexpr float XTRDEND
X-coordinate in tracking system of end of TRD mother volume.
static constexpr float CALT
Thicknesses of different parts of the chamber frame Lower aluminum frame.
GPUd() float getCol0(int layer) const
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
constexpr int NLAYER
the number of layers
Definition Constants.h:27
constexpr int NSECTOR
the number of sectors
Definition Constants.h:25
constexpr int NSTACK
the number of stacks per sector
Definition Constants.h:26
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...