Update HepMC::uniqueID helper function to cope with xAOD::TruthParticle and xAOD::TruthVertex
Background:
- HepMC2 GenVertex has a
barcode()method (returns a manually set unique identifier) and anid()method which was used to hold the "status" of the GenVertex (basically indicated the process which caused the decay/interaction represented by the vertex).\ - HepMC3 GenVertex has an
id()method (returns an automatically set unique identifier) and astatus()method which is used to hold the "status" of the GenVertex().\ -
xAOD::TruthVertexis based on HepMC2 GenVertex, so has correspondingbarcode()andid()methods.
This merge request updates the HepMC::uniqueID(const T& p) function to handle xAOD::TruthParticle and xAOD::TruthVertex in a robust way (returning barcode() rather than id()). NB some care is required when comparing unique identifiers for HepMC::GenParticle/Vertex with their xAOD::Truth equivalents.
Also add HepMC::status(const T& p) to simplify acessing "status" for xAOD::TruthVertex and HepMC2 GenVertex.
Follows the clean-up in !72007 (merged) and needed to simplify !67195 (closed) where we are attempting to migrate xAOD::TruthVertex to be more like HepMC3::GenVertex.
Edited by John Derek Chapman