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 functionprocessSpecialAlignment
intended for use in an IOV callback. That had a default implementation doing nothing right inInDetDetectorManager
. 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 callprocessSpecialAlignment
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 usedstd::unordered_map::emplace
's return value to decide if something was actually set. For otherset*
methods, the return value was returned as is, only forsetDelta
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 changedTransformMap::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-constGeoAlignmentStore
should never be exposed to multiple threads anyway.)
- To enable this, I need to be able to reset deltas in the
- 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