Skip to content

Pixel alignment in MT prototype

This is almost all based on the implementation in SCT_ConditionsAlgorithms, I've copied it from there and made modifications. This MR:

  • Reworks how InDetDetectorManager handles special alignment. Previously there was only one virtual function processSpecialAlignment intended for use in an IOV callback. That had a default implementation doing nothing right in InDetDetectorManager. This handles the IBL bowing in Pixel, something I'm not sure about in the TRT, and nothing for the SCT. This is changed to two overloads, where the second one is intended for MT conditions algorithms. The new overload right now does nothing for TRT and SCT.
    • InDetDetectorManager::align for the MT case did not call processSpecialAlignment at all, this is changed now with the aforementioned overload.
    • To be able to overload this method, it is now pure virtual in InDetDetectorManager, meaning derived classes have to implement all overloads.
  • Implement the new overload for Pixel, which now calculates the IBL bowing there, and augments the Deltas already stored in the GeoAlignmentStore with the additional shift.
    • To enable this, I need to be able to reset deltas in the GeoAlignmentStore. TransformMap::setDelta previously used std::unordered_map::emplace's return value to decide if something was actually set. For other set* methods, the return value was returned as is, only for setDelta it was checked and an exception thrown. std::unordered_map::emplace however only constructs if an element was not set before, and does nothing otherwise. I changed TransformMap::setTransform to explicitly check existence, then assign using the [] operator and return the boolean. I think this makes more sense (happy to discuss here). (Thread safety should not be an issue here, a non-const GeoAlignmentStore should never be exposed to multiple threads anyway.)
  • Finally, I've added a cond alg that produces an updates collection of Pixel detector elements, with updated transforms and interlinks. (I'm not sure how to test whether this works correctly. It compiles, but I'd probably have to dig deeper to see if this actually does the right thing. I think it should, since it's based on the SCT counterpart.)

Aside: The code in the .cxx files in the detector managers has nightmarish indentation, it's all over the place and extremely hard to read. I refrained from reformatting for this MR, to make the changes simpler to parse, but I'd really like to add an additional commit which passes these files through clang-format, so the indentation is readable.

Edited by Paul Gessinger-Befurt

Merge request reports