Project
Loading...
Searching...
No Matches
Geo.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 ALICEO2_TOF_GEO_H
13#define ALICEO2_TOF_GEO_H
14
15#include "Rtypes.h"
16#include <array>
17#include <vector>
19
20namespace o2
21{
22namespace tof
23{
26
27class Geo
28{
29 public:
30 // FLP <-> CRU <-> LINKS mapping
31 static Int_t getCRU(int link)
32 {
33 return CRUFROMLINK[link];
34 }
35 static Int_t getCRUlink(int link)
36 {
37 return CRULINK[link];
38 }
39 static Int_t getCRUendpoint(int link)
40 {
41 return CRUENDPOINT[link];
42 }
43 static Int_t getCONETlink(int link) { return (link % 4); }
44 static Int_t getCRUid(int link)
45 {
46 return CRUID[CRUFROMLINK[link]];
47 }
48 static Int_t getCRUid(int iflp, int icru) { return CRUFROMFLP[iflp][icru]; }
49 static Int_t getFLPid(int link)
50 {
51 return FLPFROMCRU[CRUFROMLINK[link]];
52 }
53 static Int_t getFEEid(int link)
54 {
55 return FEEID[link];
56 }
57 static Int_t getFLP(int iflp) { return FLP[iflp]; }
58
59 // From AliTOFGeometry
60 static void translate(Float_t* xyz, Float_t translationVector[3]);
61 static void translate(Float_t& x, Float_t& y, Float_t& z, Float_t translationVector[3]);
62 static void rotate(Float_t* xyz, Double_t rotationAngles[6]);
63
64 static void rotateToSector(Float_t* xyz, Int_t isector);
65 static void rotateToStrip(Float_t* xyz, Int_t iplate, Int_t istrip, Int_t isector);
66 static void antiRotateToSector(Float_t* xyz, Int_t isector);
67 static void antiRotateToStrip(Float_t* xyz, Int_t iplate, Int_t istrip, Int_t isector);
68
69 static void antiRotate(Float_t* xyz, Double_t rotationAngles[6]);
70 static void getDetID(Float_t* pos, Int_t* det);
71 static Int_t getIndex(const Int_t* detId); // Get channel index from det Id (for calibration mainly)
72 static void getVolumeIndices(Int_t index, Int_t* detId); // Get volume index from channel index
73
74 static void getPos(Int_t* det, Float_t* pos);
75 static std::string getVolumePath(const Int_t* ind);
76 static Int_t getStripNumberPerSM(Int_t iplate, Int_t istrip);
77 static void getStripAndModule(Int_t iStripPerSM, Int_t& iplate, Int_t& istrip); // Return the module and strip per module corresponding to the strip number per SM
78
79 static Float_t getAngles(Int_t iplate, Int_t istrip) { return ANGLES[iplate][istrip]; }
80 static Float_t getHeights(Int_t iplate, Int_t istrip) { return HEIGHTS[iplate][istrip]; }
81 static Float_t getDistances(Int_t iplate, Int_t istrip) { return DISTANCES[iplate][istrip]; }
82 static Float_t getGeoHeights(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoHeights[isector][iplate][istrip]; }
83 static Float_t getGeoX(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoX[isector][iplate][istrip]; }
84 static Float_t getGeoDistances(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoDistances[isector][iplate][istrip]; }
85
86 static void getPadDxDyDz(const Float_t* pos, Int_t* det, Float_t* DeltaPos, int sector = -1);
87 enum {
88 // DAQ characteristics
89 // cfr. TOF-TDR pag. 105 for Glossary
90 // TARODA : TOF-ALICE Read Out and Data Acquisition system
91 kNDDL = 4, // Number of DDL (Detector Data Link) per sector
92 kNTRM = 12, // Number of TRM ( Readout Module) per DDL
93 kNTdc = 15, // Number of Tdc (Time to Digital Converter) per TRM
94 kNChain = 2, // Number of chains per TRM
95 kNCrate = 72, // Number of Crates
96 kNCh = 8 // Number of channels per Tdc
97 };
98
99 static constexpr Int_t RAW_PAGE_MAX_SIZE = 8192;
100
101 static constexpr Double_t BC_TIME = o2::constants::lhc::LHCBunchSpacingNS; // bunch crossing in ns
102 static constexpr Double_t BC_TIME_INV = 1. / BC_TIME; // inv bunch crossing in ns
103 static constexpr Double_t BC_TIME_INPS = BC_TIME * 1000; // bunch crossing in ps
104 static constexpr Double_t BC_TIME_INPS_INV = 1. / BC_TIME_INPS; // inv bunch crossing in ps
105 static constexpr int BC_IN_ORBIT = o2::constants::lhc::LHCMaxBunches; // N. bunch crossing in 1 orbit
106
107 static constexpr Int_t NPADX = 48;
108 static constexpr Float_t NPADX_INV_INT = 1. / NPADX;
109 static constexpr Int_t NPADZ = 2;
110 static constexpr Int_t NPADS = NPADX * NPADZ;
111 static constexpr Float_t NPADS_INV_INT = 1. / NPADS;
112 static constexpr Int_t NSTRIPA = 15;
113 static constexpr Int_t NSTRIPB = 19;
114 static constexpr Int_t NSTRIPC = 19;
115 static constexpr Int_t NMAXNSTRIP = 20;
116 static constexpr Int_t NSTRIPXSECTOR = NSTRIPA + 2 * NSTRIPB + 2 * NSTRIPC;
118 static constexpr Int_t NPADSXSECTOR = NSTRIPXSECTOR * NPADS;
119
120 static constexpr Int_t NSECTORS = 18;
121 static constexpr Int_t NSTRIPS = NSECTORS * NSTRIPXSECTOR;
122 static constexpr Int_t NPLATES = 5;
123
124 static constexpr int NCHANNELS = NSTRIPS * NPADS;
125 static constexpr int N_ELECTRONIC_CHANNELS = 72 << 12;
126
127 static constexpr Float_t MAXHZTOF = 370.6; // Max half z-size of TOF (cm)
128 static constexpr Float_t ZLENA = MAXHZTOF * 2.; // length (cm) of the A module
129 static constexpr Float_t ZLENB = 146.5; // length (cm) of the B module
130 static constexpr Float_t ZLENC = 170.45; // length (cm) of the C module
131
132 static constexpr Float_t XTOF = 372.00; // Inner radius of the TOF for Reconstruction (cm)
133 static constexpr Float_t RMIN = 371;
134 static constexpr Float_t RMAX = 400.05;
135
136 static constexpr Float_t RMIN2 = RMIN * RMIN;
137 static constexpr Float_t RMAX2 = RMAX * RMAX;
138
139 static constexpr Float_t XPAD = 2.5;
140 static constexpr Float_t XHALFSTRIP = XPAD * NPADX * 0.5;
141 static constexpr Float_t ZPAD = 3.5;
142 static constexpr Float_t STRIPLENGTH = 122;
143
144 static constexpr Float_t SIGMAFORTAIL1 = 2.; // Sig1 for simulation of TDC tails
145 static constexpr Float_t SIGMAFORTAIL12 = 0.5; // Sig2 for simulation of TDC tails
146
147 static constexpr Float_t PHISEC = 20; // sector Phi width (deg)
148 static constexpr Float_t PHISECINV = 1. / PHISEC; // sector Phi width (deg)
149
150 static constexpr Float_t TDCBIN = o2::constants::lhc::LHCBunchSpacingNS * 1E3 / 1024;
151 static constexpr Float_t NTDCBIN_PER_PS = 1. / TDCBIN;
152 static constexpr Int_t RATIO_TOT_TDC_BIN = 2; // ratio between TDC and TOT bin sizes
153 static constexpr Float_t TOTBIN = TDCBIN * RATIO_TOT_TDC_BIN; // time-over-threshold bin width [ps]
154 static constexpr Float_t TOTBIN_NS = TOTBIN * 1E-3; // time-over-threshold bin width [ns]
155 static constexpr Float_t NTOTBIN_PER_NS = 1000. / TOTBIN; // number of time-over-threshold bin in 1 ns
156 static constexpr Float_t BUNCHCROSSINGBIN = TDCBIN * 1024; // bunch-crossing bin width [ps]
157
158 static constexpr Float_t SLEWTOTMIN = 10.; // min TOT for slewing correction [ns]
159 static constexpr Float_t SLEWTOTMAX = 16.; // max TOT for slewing correction [ns]
160
161 static constexpr Float_t DEADTIME = 25E+03; // Single channel dead time (ps)
162 static constexpr Float_t DEADTIMETDC = DEADTIME / TDCBIN;
163 static constexpr int NWINDOW_IN_ORBIT = 3; //< Number of tof window in 1 orbit
164 static constexpr Double_t READOUTWINDOW = o2::constants::lhc::LHCOrbitNS / NWINDOW_IN_ORBIT; // Readout window (ns) - time between two consecutive triggers = 1/3 orbit
165 static constexpr int BC_IN_WINDOW = BC_IN_ORBIT / NWINDOW_IN_ORBIT; // N. bunch crossing in 1 tof window
166 static constexpr double BC_IN_WINDOW_INV = 1. / BC_IN_WINDOW;
167 static constexpr Double_t READOUTWINDOW_INV = 1. / READOUTWINDOW; // Readout window (ns)
168
169 static constexpr Int_t READOUTWINDOW_IN_BC = BC_IN_ORBIT / NWINDOW_IN_ORBIT; // round down in case
170 static constexpr Int_t LATENCYWINDOW_TOF = 1196; // Latency window in BC (larger than 1/3 orbit 1188 BC)
171 static constexpr Int_t LATENCY_ADJUSTEMENT_IN_BC = -114; // Latency adj wrt LHC (to compare with fill scheme)
172 static constexpr Int_t LATENCYWINDOW_IN_BC = LATENCYWINDOW_TOF + LATENCY_ADJUSTEMENT_IN_BC; // Latency window in BC (larger than 1/3 orbit 1188 BC)
173 static constexpr Int_t LATENCY_ADJ_LHC_IN_BC = 0; // Latency adj wrt LHC (to compare with fill scheme) -> should be zero!
174 static constexpr Int_t MATCHINGWINDOW_IN_BC = 1200; // Latency window in BC (larger than 1/3 orbit 1188 BC)
175 static constexpr Int_t OVERLAP_IN_BC = MATCHINGWINDOW_IN_BC - READOUTWINDOW_IN_BC; // overlap between two readout window in BC
176 static constexpr Double_t LATENCYWINDOW = LATENCYWINDOW_IN_BC * o2::constants::lhc::LHCBunchSpacingNS; // Latency window in ns
177 static constexpr Double_t MATCHINGWINDOW = MATCHINGWINDOW_IN_BC * o2::constants::lhc::LHCBunchSpacingNS; // Matching window in ns
178 static constexpr Double_t WINDOWOVERLAP = MATCHINGWINDOW - READOUTWINDOW; // overlap between two consecutive matchingwindow
179
180 static constexpr Int_t CRUFROMLINK[kNCrate] = {
181 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
182 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
184 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
185
186 static constexpr Int_t FEEID[kNCrate] = {
187 327680, 327681, 327682, 327683, 327684, 327685, 327686, 327687, 327688, 327689, 327690, 327691, 327692, 327693, 327694, 327695, 327696, 327697,
188 327698, 327699, 327700, 327701, 327702, 327703, 327704, 327705, 327706, 327707, 327708, 327709, 327710, 327711, 327712, 327713, 327714, 327715,
189 327716, 327717, 327718, 327719, 327720, 327721, 327722, 327723, 327724, 327725, 327726, 327727, 327728, 327729, 327730, 327731, 327732, 327733,
190 327734, 327735, 327736, 327737, 327738, 327739, 327740, 327741, 327742, 327743, 327744, 327745, 327746, 327747, 327748, 327749, 327750, 327751};
191
192 static constexpr Int_t FLP[2] = {178, 179};
193 static constexpr Int_t CRUFROMFLP[2][2] = {{227, 228}, {225, 226}};
194 static constexpr Int_t FLPFROMCRU[4] = {179, 179, 178, 178};
195 static constexpr Int_t CRUID[4] = {225, 226, 227, 228};
196
197 static constexpr Int_t CRULINK[kNCrate] = {
198 11, 10, 0, 1, 9, 8, 2, 3, 7, 6, 4, 5, 5, 4, 6, 7, 3, 2,
199 3, 9, 11, 10, 0, 1, 9, 8, 2, 3, 7, 6, 4, 5, 5, 4, 6, 7,
200 11, 10, 0, 1, 9, 8, 2, 3, 7, 6, 4, 5, 5, 4, 6, 7, 3, 2,
201 8, 9, 11, 10, 0, 1, 9, 8, 2, 3, 7, 6, 4, 5, 5, 4, 6, 7};
202
203 static constexpr Int_t CRUENDPOINT[kNCrate] = {
204 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0,
205 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1,
206 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0,
207 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1};
208
209 static constexpr Float_t ANGLES[NPLATES][NMAXNSTRIP] = { // Strip Tilt Angles
210 {43.99, 43.20, 42.40, 41.59, 40.77, 39.94, 39.11, 38.25, 37.40, 36.53,
211 35.65, 34.76, 33.87, 32.96, 32.05, 31.13, 30.19, 29.24, 12.33, 0.00},
212 {27.26, 26.28, 25.30, 24.31, 23.31, 22.31, 21.30, 20.29, 19.26, 18.24,
213 17.20, 16.16, 15.11, 14.05, 13.00, 11.93, 10.87, 9.80, 8.74, 0.00},
214 {0.00, 6.30, 5.31, 4.25, 3.19, 2.12, 1.06, 0.00, -1.06, -2.12,
215 -3.19, -4.25, -5.31, -6.30, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00},
216 {-8.74, -9.80, -10.87, -11.93, -13.00, -14.05, -15.11, -16.16, -17.20, -18.24,
217 -19.26, -20.29, -21.30, -22.31, -23.31, -24.31, -25.30, -26.28, -27.26, 0.00},
218 {-12.33, -29.24, -30.19, -31.13, -32.05, -32.96, -33.87, -34.76, -35.65, -36.53,
219 -37.40, -38.25, -39.11, -39.94, -40.77, -41.59, -42.40, -43.20, -43.99, 0.00}};
220
221 static constexpr Float_t HEIGHTS[NPLATES][NMAXNSTRIP] = {
222 {-8.405, -7.725, -8.405, -7.765, -8.285, -7.745, -7.865, -7.905, -7.895, -7.885,
223 -7.705, -7.395, -7.525, -7.645, -7.835, -7.965, -8.365, -9.385, -3.255, 0.000},
224 {-7.905, -8.235, -8.605, -9.045, -10.205, -3.975, -5.915, -7.765, -10.205, -3.635,
225 -5.885, -8.005, -10.505, -4.395, -7.325, -10.235, -4.655, -7.495, -10.515, 0.000},
226 {-2.705, -10.645, -5.165, -10.095, -4.995, -10.085, -4.835, -10.385, -4.835, -10.085,
227 -4.995, -10.095, -5.165, -10.645, -2.705, 0.000, 0.000, 0.000, 0.000, 0.000},
228 {-10.515, -7.495, -4.655, -10.235, -7.325, -4.395, -10.505, -8.005, -5.885, -3.635,
229 -10.205, -7.765, -5.915, -3.975, -10.205, -9.045, -8.605, -8.235, -7.905, 0.000},
230 {-3.255, -9.385, -8.365, -7.965, -7.835, -7.645, -7.525, -7.395, -7.705, -7.885,
231 -7.895, -7.905, -7.865, -7.745, -8.285, -7.765, -8.405, -7.725, -8.405, 0.000}};
232
233 static constexpr Float_t DISTANCES[NPLATES][NMAXNSTRIP] = {
234 {364.14, 354.88, 344.49, 335.31, 325.44, 316.51, 307.11, 297.91, 288.84, 279.89,
235 271.20, 262.62, 253.84, 245.20, 236.56, 228.06, 219.46, 210.63, 206.09, 0.00},
236 {194.57, 186.38, 178.25, 170.13, 161.78, 156.62, 148.10, 139.72, 131.23, 125.87,
237 117.61, 109.44, 101.29, 95.46, 87.36, 79.37, 73.17, 65.33, 57.71, 0.00},
238 {49.28, 41.35, 35.37, 27.91, 21.20, 13.94, 7.06, 0.00, -7.06, -13.94,
239 -21.20, -27.91, -35.37, -41.35, -49.28, 0.00, 0.00, 0.00, 0.00, 0.00},
240 {-57.71, -65.33, -73.17, -79.37, -87.36, -95.46, -101.29, -109.44, -117.61, -125.87,
241 -131.23, -139.72, -148.10, -156.62, -161.78, -170.13, -178.25, -186.38, -194.57, 0.00},
242 {-206.09, -210.63, -219.46, -228.06, -236.56, -245.20, -253.84, -262.62, -271.20, -279.89,
243 -288.84, -297.91, -307.11, -316.51, -325.44, -335.31, -344.49, -354.88, -364.14, 0.00}};
244
245 // from AliTOFv6T0 class
246 static constexpr Bool_t FEAWITHMASKS[NSECTORS] =
247 // TOF sectors with Nino masks: 0, 8, 9, 10, 16
248 {kTRUE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE,
249 kTRUE, kTRUE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE, kFALSE};
250 ; // Selecting TOF sectors containing FEA cooling masks
251
252 static constexpr Float_t MODULEWALLTHICKNESS = 0.33; // wall thickness (cm) (nofe: 0.3 as in AliTOFGeometry?)
253 static constexpr Float_t INTERCENTRMODBORDER1 = 49.5; // 1st distance of
254 // border between
255 // central and
256 // intermediate
257 // modules respect to
258 // the central module
259 // centre (cm)
260 static constexpr Float_t INTERCENTRMODBORDER2 = 57.5; // 2nd distance of
261 // border between the
262 // central and
263 // intermediate
264 // modules respect to
265 // the central module
266 // centre (cm)
267 static constexpr Float_t EXTERINTERMODBORDER1 = 196.0; // 1st distance of
268 // border between the
269 // intermediate and
270 // external modules
271 // respect to the
272 // central module
273 // centre (cm)
274 static constexpr Float_t EXTERINTERMODBORDER2 = 203.5; // 2nd distance of
275 // border between the
276 // intermediate and
277 // external
278 // modules respect to
279 // the central module
280 // centre (cm)
281 static constexpr Float_t LENGTHINCEMODBORDERU = 5.0; // height of upper border
282 // between the central
283 // and intermediate
284 // modules (cm)
285 static constexpr Float_t LENGTHINCEMODBORDERD = 7.0; // height of lower border
286 // between the central
287 // and intermediate
288 // modules (cm)
289 static constexpr Float_t LENGTHEXINMODBORDER = 5.0; // height of border
290 // between the
291 // intermediate and
292 // external modules
293 // (cm)
294 static constexpr Float_t MODULECOVERTHICKNESS = 2.0; // thickness of cover
295 // modules zone (cm)
296 static constexpr Float_t FEAWIDTH1 = 19.0; // mother volume width of each of
297 // two external FEA in a
298 // supermodule (cm)
299 static constexpr Float_t FEAWIDTH2 = 39.5; // mother volume width of two
300 // internal FEA in a supermodule
301 // (cm)
302 static constexpr Float_t SAWTHICKNESS = 1.0; // services alluminium wall
303 // thickness (cm)
304 static constexpr Float_t CBLW = 13.5; // cables&tubes block width (cm)
305 static constexpr Float_t CBLH1 = 2.0; // min. height of cables&tubes block
306 // (cm)
307 static constexpr Float_t CBLH2 = 12.3; // max. height of cables&tubes block
308 // (cm)
309 static constexpr Float_t BETWEENLANDMASK = 0.1; // distance between the L
310 // element and the Nino
311 // mask (cm)
312 static constexpr Float_t AL1PARAMETERS[3] = {static_cast<Float_t>(FEAWIDTH1 * 0.5), 0.4, 0.2}; // (cm)
313 static constexpr Float_t AL2PARAMETERS[3] = {7.25, 0.75, 0.25}; // (cm)
314 static constexpr Float_t AL3PARAMETERS[3] = {3., 4., 0.1}; // (cm)
315 static constexpr Float_t ROOF1PARAMETERS[3] = {AL1PARAMETERS[0], AL1PARAMETERS[2], 1.45}; // (cm)
316 static constexpr Float_t ROOF2PARAMETERS[3] = {AL3PARAMETERS[0], 0.1, 1.15}; // (cm)
317 static constexpr Float_t FEAPARAMETERS[3] = {static_cast<Float_t>(FEAWIDTH1 * 0.5), 5.6, 0.1}; // (cm)
318 static constexpr Float_t BAR[3] = {8.575, 0.6, 0.25}; // (cm)
319 static constexpr Float_t BAR1[3] = {BAR[0], BAR[1], 0.1}; // (cm)
320 static constexpr Float_t BAR2[3] = {BAR[0], 0.1, static_cast<Float_t>(BAR[1] - 2. * BAR1[2])}; // (cm)
321 static constexpr Float_t BARS[3] = {2., BAR[1], BAR[2]}; // (cm)
322 static constexpr Float_t BARS1[3] = {BARS[0], BAR1[1], BAR1[2]}; // (cm)
323 static constexpr Float_t BARS2[3] = {BARS[0], BAR2[1], BAR2[2]}; // (cm)
324
325 static constexpr Float_t HHONY = 1.0; // height of HONY Layer
326 static constexpr Float_t HPCBY = 0.08; // height of PCB Layer
327 static constexpr Float_t HRGLY = 0.055; // height of RED GLASS Layer
328 static constexpr Float_t HFILIY = 0.125; // height of FISHLINE Layer
329 static constexpr Float_t HGLASSY = 0.160 * 0.5; // semi-height of GLASS Layer
330 static constexpr Float_t HCPCBY = 0.16; // height of PCB Central Layer
331 static constexpr Float_t WHONZ = 8.1; // z dimension of HONEY Layer
332 static constexpr Float_t WPCBZ1 = 10.64; // z dimension of PCB Lower Layer
333 static constexpr Float_t WPCBZ2 = 11.6; // z dimension of PCB Upper Layer
334 static constexpr Float_t WCPCBZ = 12.4; // z dimension of PCB Central Layer
335 static constexpr Float_t WRGLZ = 8.; // z dimension of RED GLASS Layer
336 static constexpr Float_t WGLFZ = 7.; // z dimension of GLASS Layer
337 static constexpr Float_t HSENSMY = 0.0105; // height of Sensitive Layer
338
339 static Float_t getCableLength(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc) { return CABLELENGTH[icrate][islot - 3][ichain][itdc / 3]; }
340 static Float_t getCableTimeShift(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc) { return getCableLength(icrate, islot, ichain, itdc) * CABLEPROPAGATIONDELAY; }
341 static Int_t getCableTimeShiftBin(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc) { return int(getCableTimeShift(icrate, islot, ichain, itdc) * 1000 / TDCBIN); }
342 static Float_t getPropagationDelay() { return CABLEPROPAGATIONDELAY; };
343 static Int_t getIndexFromEquipment(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc); // return TOF channel index
344
345 static Int_t getCrateFromECH(int ech) { return ech >> 12; }
346 static Int_t getTRMFromECH(int ech) { return ((ech % 4096) >> 8) + 3; }
347 static Int_t getChainFromECH(int ech) { return (ech % 256) >> 7; }
348 static Int_t getTDCFromECH(int ech) { return (ech % 128) >> 3; }
349 static Int_t getTDCChFromECH(int ech) { return (ech % 8); }
350 static Int_t getECHFromIndexes(int crate, int trm, int chain, int tdc, int chan) { return (crate << 12) + ((trm - 3) << 8) + (chain << 7) + (tdc << 3) + chan; }
351 static Int_t getECHFromCH(int chan) { return CHAN_TO_ELCHAN[chan]; }
352 static Int_t getCHFromECH(int echan) { return ELCHAN_TO_CHAN[echan]; }
353
354 static void Init();
355 static void InitIdeal();
356 static void InitIndices();
357 static void getPosInSectorCoord(int ch, float* pos);
358 static void getPosInStripCoord(int ch, float* pos);
359 static void getPosInPadCoord(int ch, float* pos);
360 static void getPosInSectorCoord(const Int_t* detId, float* pos);
361 static void getPosInStripCoord(const Int_t* detId, float* pos);
362 static void getPosInPadCoord(const Int_t* detId, float* pos);
363
364 private:
365 static Int_t getSector(const Float_t* pos);
366 static Int_t getPlate(const Float_t* pos);
367 static Int_t getPadZ(const Float_t* pos);
368 static Int_t getPadX(const Float_t* pos);
369
370 static void fromGlobalToSector(Float_t* pos, Int_t isector); // change coords to Sector reference
371 static Int_t fromPlateToStrip(Float_t* pos, Int_t iplate, Int_t isector); // change coord to Strip reference and return strip number
372
373 static Bool_t mToBeInit;
374 static Bool_t mToBeInitIndexing;
375 static Float_t mRotationMatrixSector[NSECTORS + 1][3][3]; // rotation matrixes
376 static Float_t mRotationMatrixPlateStrip[NSECTORS][NPLATES][NMAXNSTRIP][3][3];
377 static Float_t mPadPosition[NSECTORS][NPLATES][NMAXNSTRIP][NPADZ][NPADX][3];
378 static Float_t mGeoDistances[NSECTORS][NPLATES][NMAXNSTRIP];
379 static Float_t mGeoHeights[NSECTORS][NPLATES][NMAXNSTRIP];
380 static Float_t mGeoX[NSECTORS][NPLATES][NMAXNSTRIP];
381 static Int_t mPlate[NSTRIPXSECTOR];
382 static Int_t mStripInPlate[NSTRIPXSECTOR];
383 static std::array<std::vector<float>, 5> mDistances[NSECTORS];
384
385 // cable length map
386 static constexpr Float_t CABLEPROPAGATIONDELAY = 0.0513; // Propagation delay [ns/cm]
387 static const Float_t CABLELENGTH[kNCrate][10][kNChain][kNTdc / 3]; // not constexpr as we initialize it in CableLength.cxx at run time
388 static const Int_t CHAN_TO_ELCHAN[NCHANNELS];
389 static const Int_t ELCHAN_TO_CHAN[N_ELECTRONIC_CHANNELS];
390
391 ClassDefNV(Geo, 3);
392};
393} // namespace tof
394} // namespace o2
395
396#endif
GPUChain * chain
Header to collect LHC related constants.
uint16_t pos
Definition RawData.h:3
TOF geo parameters (only statics)
Definition Geo.h:28
static constexpr Float_t RMAX
Definition Geo.h:134
static std::string getVolumePath(const Int_t *ind)
Definition Geo.cxx:444
static constexpr Float_t ZPAD
Definition Geo.h:141
static Float_t getCableLength(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc)
Definition Geo.h:339
static void getStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip)
Definition Geo.cxx:1148
static constexpr Float_t PHISECINV
Definition Geo.h:148
static constexpr Float_t RMIN2
Definition Geo.h:136
static constexpr Float_t HFILIY
Definition Geo.h:328
static constexpr Float_t SIGMAFORTAIL12
Definition Geo.h:145
static constexpr Float_t MODULECOVERTHICKNESS
Definition Geo.h:294
static Float_t getCableTimeShift(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc)
Definition Geo.h:340
static Float_t getGeoDistances(Int_t isector, Int_t iplate, Int_t istrip)
Definition Geo.h:84
static constexpr Float_t DEADTIME
Definition Geo.h:161
static Int_t getTDCChFromECH(int ech)
Definition Geo.h:349
static constexpr Float_t ROOF2PARAMETERS[3]
Definition Geo.h:316
static constexpr Float_t XPAD
Definition Geo.h:139
static constexpr Float_t LENGTHEXINMODBORDER
Definition Geo.h:289
static constexpr Int_t NSECTORS
Definition Geo.h:120
static constexpr Float_t XHALFSTRIP
Definition Geo.h:140
static constexpr Double_t BC_TIME_INPS
Definition Geo.h:103
static constexpr Float_t SLEWTOTMAX
Definition Geo.h:159
static constexpr Double_t BC_TIME_INPS_INV
Definition Geo.h:104
static constexpr Float_t HCPCBY
Definition Geo.h:330
static constexpr Float_t BARS[3]
Definition Geo.h:321
static constexpr Float_t HGLASSY
Definition Geo.h:329
static constexpr Int_t CRUFROMLINK[kNCrate]
Definition Geo.h:180
static Float_t getAngles(Int_t iplate, Int_t istrip)
Definition Geo.h:79
static constexpr Int_t NPADZ
Definition Geo.h:109
static constexpr Float_t HHONY
Definition Geo.h:325
static void InitIdeal()
Definition Geo.cxx:292
static constexpr Float_t DISTANCES[NPLATES][NMAXNSTRIP]
Definition Geo.h:233
static constexpr Float_t WGLFZ
Definition Geo.h:336
static constexpr Double_t READOUTWINDOW
Definition Geo.h:164
static Int_t getIndexFromEquipment(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc)
Definition Geo.cxx:1143
static constexpr Float_t NTOTBIN_PER_NS
Definition Geo.h:155
static void rotateToSector(Float_t *xyz, Int_t isector)
Definition Geo.cxx:1028
static constexpr Float_t HPCBY
Definition Geo.h:326
static constexpr Int_t CRULINK[kNCrate]
Definition Geo.h:197
static Int_t getTDCFromECH(int ech)
Definition Geo.h:348
static constexpr Float_t BUNCHCROSSINGBIN
Definition Geo.h:156
static constexpr Float_t CBLH2
Definition Geo.h:307
static constexpr Int_t RATIO_TOT_TDC_BIN
Definition Geo.h:152
static constexpr Float_t WRGLZ
Definition Geo.h:335
static constexpr Float_t HRGLY
Definition Geo.h:327
static constexpr Int_t MATCHINGWINDOW_IN_BC
Definition Geo.h:174
static Int_t getStripNumberPerSM(Int_t iplate, Int_t istrip)
Definition Geo.cxx:593
static constexpr Int_t NSTRIPXSECTOR
Definition Geo.h:116
static constexpr Float_t NPADS_INV_INT
Definition Geo.h:111
static constexpr Float_t HEIGHTS[NPLATES][NMAXNSTRIP]
Definition Geo.h:221
static constexpr Float_t ROOF1PARAMETERS[3]
Definition Geo.h:315
static void translate(Float_t *xyz, Float_t translationVector[3])
Definition Geo.cxx:979
static constexpr Float_t HSENSMY
Definition Geo.h:337
static constexpr Float_t INTERCENTRMODBORDER1
Definition Geo.h:253
static constexpr Float_t BAR2[3]
Definition Geo.h:320
static constexpr Int_t NPADS
Definition Geo.h:110
static constexpr int N_ELECTRONIC_CHANNELS
Definition Geo.h:125
static Float_t getHeights(Int_t iplate, Int_t istrip)
Definition Geo.h:80
static constexpr Float_t ZLENC
Definition Geo.h:130
static constexpr Float_t DEADTIMETDC
Single channel TDC dead time (ps)
Definition Geo.h:162
static constexpr double BC_IN_WINDOW_INV
Definition Geo.h:166
static constexpr Float_t TOTBIN
Definition Geo.h:153
static void getPosInPadCoord(int ch, float *pos)
Definition Geo.cxx:699
static constexpr Int_t NSTRIPB
Definition Geo.h:113
static constexpr Int_t NSTRIPC
Definition Geo.h:114
static Int_t getTRMFromECH(int ech)
Definition Geo.h:346
static constexpr Float_t NTDCBIN_PER_PS
number of TDC bins in 1 ns
Definition Geo.h:151
static Int_t getCRUid(int link)
Definition Geo.h:44
static void Init()
Definition Geo.cxx:43
static constexpr Double_t READOUTWINDOW_INV
Definition Geo.h:167
static constexpr Int_t RAW_PAGE_MAX_SIZE
Definition Geo.h:99
static constexpr Int_t LATENCY_ADJUSTEMENT_IN_BC
Definition Geo.h:171
static Int_t getCRU(int link)
Definition Geo.h:31
static constexpr Float_t AL1PARAMETERS[3]
Definition Geo.h:312
static constexpr Float_t FEAPARAMETERS[3]
Definition Geo.h:317
static void getPosInStripCoord(int ch, float *pos)
Definition Geo.cxx:692
static constexpr Float_t XTOF
Definition Geo.h:132
static constexpr Int_t NSTRIPA
Definition Geo.h:112
static Float_t getGeoX(Int_t isector, Int_t iplate, Int_t istrip)
Definition Geo.h:83
static constexpr Float_t CBLH1
Definition Geo.h:305
static Int_t getCRUid(int iflp, int icru)
Definition Geo.h:48
static constexpr Float_t ZLENA
Definition Geo.h:128
static Int_t getCrateFromECH(int ech)
Definition Geo.h:345
static Float_t getGeoHeights(Int_t isector, Int_t iplate, Int_t istrip)
Definition Geo.h:82
static constexpr Float_t BAR1[3]
Definition Geo.h:319
static constexpr Int_t LATENCYWINDOW_TOF
Definition Geo.h:170
static Int_t getFLP(int iflp)
Definition Geo.h:57
static void getPos(Int_t *det, Float_t *pos)
Definition Geo.cxx:491
static constexpr Float_t BETWEENLANDMASK
Definition Geo.h:309
static constexpr Int_t LATENCYWINDOW_IN_BC
Definition Geo.h:172
static constexpr Float_t MAXHZTOF
Definition Geo.h:127
static constexpr Double_t BC_TIME
Definition Geo.h:101
static constexpr Double_t BC_TIME_INV
Definition Geo.h:102
static void antiRotateToSector(Float_t *xyz, Int_t isector)
Definition Geo.cxx:1008
static constexpr Int_t NPADSXSECTOR
Definition Geo.h:118
static constexpr Float_t AL2PARAMETERS[3]
Definition Geo.h:313
static Int_t getCHFromECH(int echan)
Definition Geo.h:352
static Int_t getCableTimeShiftBin(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc)
Definition Geo.h:341
static constexpr Float_t NPADX_INV_INT
Definition Geo.h:108
static constexpr Float_t WPCBZ1
Definition Geo.h:332
static void rotate(Float_t *xyz, Double_t rotationAngles[6])
Definition Geo.cxx:1082
static constexpr Int_t READOUTWINDOW_IN_BC
Definition Geo.h:169
static Int_t getChainFromECH(int ech)
Definition Geo.h:347
static constexpr Float_t LENGTHINCEMODBORDERD
Definition Geo.h:285
static constexpr Float_t INTERCENTRMODBORDER2
Definition Geo.h:260
static constexpr Float_t MODULEWALLTHICKNESS
Definition Geo.h:252
@ kNTRM
Definition Geo.h:92
@ kNDDL
Definition Geo.h:91
@ kNCrate
Definition Geo.h:95
@ kNTdc
Definition Geo.h:93
@ kNChain
Definition Geo.h:94
static constexpr Double_t WINDOWOVERLAP
Definition Geo.h:178
static constexpr Float_t FEAWIDTH1
Definition Geo.h:296
static constexpr Int_t CRUENDPOINT[kNCrate]
Definition Geo.h:203
static void getVolumeIndices(Int_t index, Int_t *detId)
Definition Geo.cxx:543
static constexpr Float_t RMIN
Definition Geo.h:133
static constexpr Float_t BARS2[3]
Definition Geo.h:323
static constexpr Int_t LATENCY_ADJ_LHC_IN_BC
Definition Geo.h:173
static constexpr Float_t TOTBIN_NS
Definition Geo.h:154
static constexpr Int_t FLPFROMCRU[4]
Definition Geo.h:194
static constexpr int NCHANNELS
Definition Geo.h:124
static constexpr Float_t SAWTHICKNESS
Definition Geo.h:302
static Int_t getIndex(const Int_t *detId)
Definition Geo.cxx:563
static constexpr Float_t SLEWTOTMIN
Definition Geo.h:158
static Int_t getFEEid(int link)
Definition Geo.h:53
static constexpr Int_t NPLATES
Definition Geo.h:122
static constexpr Float_t ZLENB
Definition Geo.h:129
static constexpr Float_t TDCBIN
TDC bin width [ps].
Definition Geo.h:150
static constexpr Float_t WPCBZ2
Definition Geo.h:333
static void getDetID(Float_t *pos, Int_t *det)
Definition Geo.cxx:507
static constexpr int BC_IN_WINDOW
Definition Geo.h:165
static Float_t getDistances(Int_t iplate, Int_t istrip)
Definition Geo.h:81
static void antiRotate(Float_t *xyz, Double_t rotationAngles[6])
Definition Geo.cxx:1113
static Int_t getFLPid(int link)
Definition Geo.h:49
static constexpr Float_t BARS1[3]
Definition Geo.h:322
static void getPadDxDyDz(const Float_t *pos, Int_t *det, Float_t *DeltaPos, int sector=-1)
Definition Geo.cxx:835
static void getPosInSectorCoord(int ch, float *pos)
Definition Geo.cxx:685
static constexpr int BC_IN_ORBIT
Definition Geo.h:105
static constexpr Float_t NSTRIPXSECTOR_INV_INT
Definition Geo.h:117
static constexpr Int_t OVERLAP_IN_BC
Definition Geo.h:175
static constexpr Int_t NMAXNSTRIP
Definition Geo.h:115
static constexpr Int_t CRUFROMFLP[2][2]
Definition Geo.h:193
static constexpr Float_t WHONZ
Definition Geo.h:331
static constexpr Float_t EXTERINTERMODBORDER1
Definition Geo.h:267
static Int_t getCRUendpoint(int link)
Definition Geo.h:39
static Int_t getCONETlink(int link)
Definition Geo.h:43
static constexpr Int_t NPADX
Definition Geo.h:107
static Float_t getPropagationDelay()
Definition Geo.h:342
static constexpr Float_t FEAWIDTH2
Definition Geo.h:299
static Int_t getECHFromCH(int chan)
Definition Geo.h:351
static constexpr Int_t FEEID[kNCrate]
Definition Geo.h:186
static constexpr Float_t STRIPLENGTH
Definition Geo.h:142
static constexpr Float_t BAR[3]
Definition Geo.h:318
static constexpr Int_t CRUID[4]
Definition Geo.h:195
static constexpr Float_t LENGTHINCEMODBORDERU
Definition Geo.h:281
static Int_t getECHFromIndexes(int crate, int trm, int chain, int tdc, int chan)
Definition Geo.h:350
static void antiRotateToStrip(Float_t *xyz, Int_t iplate, Int_t istrip, Int_t isector)
Definition Geo.cxx:1048
static constexpr Float_t EXTERINTERMODBORDER2
Definition Geo.h:274
static constexpr Int_t FLP[2]
Definition Geo.h:192
static constexpr Float_t WCPCBZ
Definition Geo.h:334
static constexpr Float_t RMAX2
Definition Geo.h:137
static Int_t getCRUlink(int link)
Definition Geo.h:35
static constexpr Float_t PHISEC
Definition Geo.h:147
static constexpr int NWINDOW_IN_ORBIT
Definition Geo.h:163
static constexpr Float_t SIGMAFORTAIL1
Definition Geo.h:144
static void InitIndices()
Definition Geo.cxx:401
static constexpr Float_t CBLW
Definition Geo.h:304
static constexpr Float_t AL3PARAMETERS[3]
Definition Geo.h:314
static void rotateToStrip(Float_t *xyz, Int_t iplate, Int_t istrip, Int_t isector)
Definition Geo.cxx:1065
static constexpr Bool_t FEAWITHMASKS[NSECTORS]
Definition Geo.h:246
static constexpr Double_t MATCHINGWINDOW
Definition Geo.h:177
static constexpr Float_t ANGLES[NPLATES][NMAXNSTRIP]
Definition Geo.h:209
static constexpr Double_t LATENCYWINDOW
Definition Geo.h:176
static constexpr Int_t NSTRIPS
Definition Geo.h:121
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint index
Definition glcorearb.h:781
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
constexpr int LHCMaxBunches
constexpr double LHCBunchSpacingNS
constexpr double LHCOrbitNS
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...