[PWGHF] Cache prongs propagation in trackIndexSkimCreator - #17906
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Hi @fchinu , thanks for the development. I have a few doubts/questions.
|
|
Hi @vkucera, thanks for having a look! I would say that it helps also for 2 prongs, since the two loops are nested, and the negative prong information is extracted once per positive track. O2Physics/PWGHF/TableProducer/trackIndexSkimCreator.cxx Lines 2401 to 2418 in abd5072 Maybe I am missing something? For the 3 prongs, it is true that we calculate everything upfront without applying preselections, but it seems like that calculating the properties only once per collision is faster than once per triplet being built. |
|
Hi @fchinu , you are right, thanks for the clarification. Indeed, there is also duplication for the negative tracks in the 2-prong loop. |
|
Thanks a lot @vkucera for approving the PR! For bookkeeping I write here what we discussed earlier: |
|
@fgrosa Please don't enable the auto-merge before the tests finish. Now the result of the code check cannot be reported. |
While developing #17878, I realised that the CPU time of the track-index skim creator can be reduced significantly by building each track once per collision, reducing the
track_as,getTrackParCovcalls and, if needed, the propagation to the collision's primary vertex, and reusing it in the pair and triplet loops.In the tests I did locally on central Pb-Pb data, I see a reduction in CPU time by a factor ~2x:
performanceMetricsCached.json
performanceMetricsDefault.json