Straightforward optimisations for eflowRec
While working on a more significant algorithmic optimisation to eflowRec, I found some fixes that are easy to implement but already result in a really significant improvement in the execution time, mainly because the PFAlgorithm execution time was 80% calculating distances from every cluster to every track multiple times with a triple dynamic cast on every computation.
There are more substantial fixes in the pipeline that involve removing explicitly thread-hostile code, but I am still debugging diffs wrt the T0 references, whereas these have been checked already with RunT0Tests.py.
See attachment for illustration of the speedup on 200 events running in the HLT context.PFAlg_Time_easyfixes.pdf