refactor!: Packed strip space point calibration column#5424
Conversation
After fighting the performance I get a marginal 2% improvement in Athena with the SPOT script. I am back to two functions again but elevated them now to public functions in With the single function and the 5 calibration vectors attached to the space point I saw about ~10% slowdown. My interpretation is that all of these are in the cache and loading them from there is slower than recalculating them from 4 calibration vectors. I think this will highly depend on the CPU and scenario but lets not go down that road. I also experimented with using Eigen to various degrees but the more we use it the more it slows down... What is left from this is mainly a refactor and some breaking renames that I believe overall improve things. Next I would explore a bit how to best estimate the seed params using the calibration. |
andiwand
left a comment
There was a problem hiding this comment.
A few things I was not sure about while trying to understand the code
Yes I tried something similar (ok but much less elegant) originally and also came to the conclusion that loading from cache was slower than recalculating them but also was not sure how much this result could be trusted for the same CPU/scenario reason so left it unmentioned ;) This is ultimately why I settled on the messy two function solution which I wasn't exactly happy with but was the fastest implementation out of the stuff I threw at the wall |
|
I also tried using only the function with the pre-calculated struct and it seems to produce the same timing. Maybe we can deduplicate to this variant? Or did it behave differently for you? There are a few things I was not sure about and left a few comments above, maybe you have an opinion on these @mvessell96. If we could reduce the information necessary for the calibration it might go faster but I didn't have a great idea about it. |
I think it gave like O(5-8%) which was a much bigger number when I put this in, I think likely some of the other recent improvements have eaten most of the gain? Since we are likely getting to the bad top sps less often |
|
Ok good to know! Then lets just keep it - doesn't hurt |
|
I coded up a little toy visualization and the current implementation looks indeed correct https://github.com/andiwand/cern-scripts/blob/main/scripts/2026-05-10_strip-space-point-calibration.py
|
…-precomputed-stripcolumns
…-precomputed-stripcolumns
…-precomputed-stripcolumns
|
|




--- END COMMIT MESSAGE ---
blocked by
SpacePointMaker#5445cc @mvessell96