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