Sweeping !56822 from master to 22.0. For HepMC3, GenParticle barcodes can only be set once they are associated with a GenEvent
For HepMC3, GenParticle barcodes can only be set once they are associated with a GenEvent
See merge request !56822 (merged)