Rich ray tracing speed up
This MR adds a few optimisations to the RICH ray tracing algorithm, designed to improve CPU performance by reducing the number of ray traced photons that are required.
- Instead of ray tracing a fixed number of photons (previously 96) per mass hypothesis irrespective of the CK theta value (ring size) I instead now scale the value based on CK theta, from 96 (for the largest ring, corresponding to the lightest mass hypo, electron) to a smaller value (tuned to 16) for CK theta = 0. Tests indicate this has little impact on PID performance.
- Instead of always ray tracing a new ring for every mass hypothesis for each track, if the CK theta value is less that a tuneable value different to the previous ring, that ring is simply reused, so skips ray tracing a new ring entirely. This approximation does have a minor impact on PID performance, but tuning the tolerance to a relative small value (currently amounts to about 2.5% of previous value) is I think acceptable. This also gives a possible handle to reduce CPU usage in the future if required, at the cost of PID performance.
Overall these two changes give a decent reduction in the overall CPU time taken by the ray tracing algorithm. e.g. for SSE4.2 (AVX2 will be a little different), for current master
reduces to
Ref. updates will be required, in both Moore and Brunel.
Ref updates: Moore!454 (merged) Brunel!992 (merged) added to nightlies build
Edited by Milosz Zdybal