Drop output changing uniqueID calls, fix for MR !69737
HepMC2 GenVertex has a barcode()
method (returns a manually set unique identifier) and an id()
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 a status()
method which is used to hold the "status" of the GenVertex().
xAOD::TruthVertex
is based on HepMC2 GenVertex, so has corresponding barcode()
and id()
methods.
In !67195 we are attempting to migrate xAOD::TruthVertex
to be more like HepMC3::GenVertex.
While working on !67195 and !71935 (merged) it was noticed that the HepMC::uniqueID()
helper function was incorrectly being used with xAOD::TruthVertex*
in a few places.
template <class T> inline int uniqueID(const T& p) { return p->id(); }
This function is intended to work with the HepMC3 GenParticle/Vertex::id()
(a unique identifier). xAOD::TruthParticle
has an id()
method which returns a unique identifier (in the form of the barcode()
), however as xAOD::TruthVertex
is still based on the HepMC2 GenVertex
class its id()
method, returns a (non-unique) value equivalent to status()
rather than a unique identifier. Currently it is best to use xAOD::TruthVertex::barcode()
via the HepMC::barcode()
helper function when a unique identifier is required for instances of xAOD::TruthVertex
.
It is anticipated that this merge request will change the barcode values for some entries in some xAOD::TruthVertexAuxContainer
instances.
The issue was introduced in !69737 (merged).