Commit 030e396
authored
MatLUT: faster phi-sector determination; reduction of divisions (#12030)
Following ticket https://alice.its.cern.ch/jira/browse/O2-4170,
Profile analysis has shown that material budget calculations used in tracking, spent most time in
(a) determination of a cylindrical layer
(b) determination of a phi sector in a layer
This commit proposes an improvement for (b):
- Instead of using system function phi = atan2(y, x), we use a
faster - approximate version. We can do this, since we never need
to use the precise result of phi in a calculation. Instead, phi is merely used
to lookup a slice/sector.
The error of the approximate version is ~1e-5, which is enough to get the correct phi
sector in 99.999 of the cases.
(Rare cases, where we end up in a wrong neighbouring phi sector are probably ok ... since
the material budget lookup is anyways an approximation.)
In addition, we propose a smaller code mofication for ray.CrossZ to reduce
the number of divisions and if statements.
A previous check for
ray orthogonal to z can not happen in the code since there is a previous condition
`if (zID != zIDLast)`.
ITS reco is shown to improve by ~15% in speed for larger PbPb MC timeframes
(on Linux - tested on CC7 and Ubuntu22.04)1 parent 8fe191e commit 030e396
File tree
2 files changed
+58
-7
lines changed- Detectors/Base
- include/DetectorsBase
- src
2 files changed
+58
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
87 | 131 | | |
88 | 132 | | |
89 | 133 | | |
| |||
101 | 145 | | |
102 | 146 | | |
103 | 147 | | |
| 148 | + | |
104 | 149 | | |
105 | 150 | | |
106 | 151 | | |
| |||
119 | 164 | | |
120 | 165 | | |
121 | 166 | | |
| 167 | + | |
122 | 168 | | |
123 | 169 | | |
124 | 170 | | |
| |||
134 | 180 | | |
135 | 181 | | |
136 | 182 | | |
| 183 | + | |
137 | 184 | | |
138 | 185 | | |
139 | 186 | | |
| |||
175 | 222 | | |
176 | 223 | | |
177 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
178 | 232 | | |
179 | 233 | | |
180 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
| 297 | + | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 342 | + | |
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
| |||
0 commit comments