Skip to content

Let R3MatchingTool read xAOD types from the leg names

Jon Burr requested to merge jburr/athena:TrigMatchParticle into master

The reduced HLT information in the slimmed DAODs doesn't have the xAOD type information included, which is needed in the matching tool. However this information can be fairly easily and reliably extracted from the chain name itself.

This MR updates the code in TrigCompositeUtils/ChainNameParser.h so will need @tbold and @wprzygod to take a look at it (and maybe suggest some tests I can run to make that I've not broken it).

I also found a bit of a bug in the existing implementation that I don't think has come up yet. If a chain includes a signature that doesn't have IParticle features it will actually break the existing implementation and no successful matches will be returned. That's because the multiplicity of that leg will be 1 (which is correct) but the no IParticle features will be returned (which is also correct). This MR corrects this by setting the leg multiplicity in these cases to 0 and skipping them when building combinations (i.e. making the multiplicity in these cases the IParticle multiplicity).

I've also added a test alg which I used to demonstrate that I saw matches where I expected them (including a MET+X chain to test the above). This needed to duplicate some of the logic in the IPartCombItr (namely generating all combinations over a set of input iterators). This is a fairly generic requirement (think itertools.product in python) so I've put it into a separate class ProductItr. At the moment this (and KFromNItr) still live in the TrigCompositeUtils package but they're really generic code so should perhaps be moved.

Edited by Jon Burr

Merge request reports