columnar migration of the MuonCalibTool
This roughly follows the migration for other tools, and was suggested by the e-gamma experts as being very similar to the electron scale factors. The e-gamma experts are encouraged to review the code and see if they are happy with it. There are essentially three ways this MR can proceed:
- The muon experts are happy with the code and it can be merged as is.
- The muon experts are happy with the code but would like to see some changes. In this case, please add comments to the MR and I will address them.
- The muon experts are not happy with the code and would like to do the migration themselves. In this case, we can close this MR and you can open a new one with your changes. I will be happy to help you with that.
The general columnar migration guide is outlined here.
The cliff notes on this migration:
- The tool itself fills all data into a
MuonObj
first which then gets passed into internal tools. As such the migration only affects this filling step. - I introduced a
MuonCalibToolAccessors
structure to hold all columnar accessors, this is both to share them between multiple classes that need them and to hide them from the root dictionaries. - The tool internally retrieves
xAOD::EventInfo
in multiple places, but it should really be passed in. For the columnar code that is mandatory, so I always retrieved it in the xAOD wrapper layer and passed it from there into the columnar code. In the future we should probably also pass it in on the xAOD side to avoid unnecessary event store lookups (those introduce a surprising amount of overhead). - The muon tool uses tracks from up to four(!) different track containers. I defined a
columnar::MuonTrackDef
container definition that provides "variant" access to all of them. - I had to define several helper accessors based on code from
xAOD::TrackParticle
. To share the code between columnar and xAOD I introduced anTrackingDetails.h
header, like I've done in similar situations. - I assume the muon mass for the tracks associated with the muon, which I hope is correct. The original code was checking whether the track was marked as a muon, electron, or pion, and then used the appropriate particle mass for that.
- I don't include the muon resolution category, as the experts said it isn't needed by most users. There is a new property to turn the calculation off, and I changed the variable to an
std::optional
to ensure there is a failure if it is read when not available.
Not sure whom to tag as muon experts. Tagging some random people from the git log and usual suspects: @lucam @weitao @jojungge
Adding full-unit-tests and full-integration-tests since this changes the xAOD EDM code. I don't expect any visible changes (it just moves logic around), but this is the sort of things that seems for. Also adding analysis-review-expert to give the muon experts a chance to chime in.