Merging truth formats, adding parent and child helpers
This MR merges TRUTH5 and TRUTH4 into TRUTH3, and adds the relevant collections to the 'standard' set defined in MCTruthCommon. There are three collections affected:
-
BSM and downstream particles. This includes BSM particles and their vertices, with downstream particles. On SM samples this amounts to about 10 bytes per event for the empty containers (depending on the file size). For BSM samples it is a non-trivial amount of information, but most importantly it allows studies of long-lived particles, including their decay positions and decay products. We can't do the simple stupid thing of removing particles produced during simulation because some of these things decay in the simulation.
-
Born leptons. This is a special collection that has been requested by a number of groups, including SM and Higgs. It was tested by the Higgs (ZZ) folks, and should be working for the samples that they've looked at.
-
Hard scatter collection. This comes in two flavors, after extensive testing from Dan Hayden (thanks!). The first is simply grabbing the vertex identified as the "hard scatter" in the truth record and keeping all its incoming and outgoing particles, as well as the next generation of outgoing particles (in case we have intermediate resonances, that's a big help). Because of the way Pythia8 works this doesn't always get everything, so we have to add some additional incoming particles based on their status codes. There is also a special setup for a pure-Pythia8 matrix element that largely reconstructs what that hard scatter ought to be based on particle status codes.
The latter two collections add about 300 bytes per event (what I got back after the photon changes). I believe this satisfies all the outstanding requests for additional pure-truth information.
This MR also modifies the nParents
/nChildren
and getChild
/getParent
functions in xAOD::TruthParticle
to use the accessors that we're standardizing as a part of TRUTH3. The default behavior is of course the same, and it only falls back to the decorations if the standard access can't be done. Tested by running TRUTH3 derivations and it seems to behave. Other test suggestions are welcome, of course.