Skip to content

Rich ray tracing speed up

Christopher Rob Jones requested to merge jonrob/Rec:RichRayTraceSpeedUp into master

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.

  1. 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.

RingPoints

  1. 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.

RingReuse

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

Master

reduces to

2.5__Ring_Share

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

Merge request reports