Draft: The first attempt to use status() instead of barcode() in Simulation
The first attempt to use status instead of barcode for the simulation. The end goals are:
-
- to be able to identify the origin of the particles and vertices from their status and not barcodes
-
- to be able to use the
HepMC3::GenParticle::id()
andHepMC3::GenVertex::id()
as unique identifiers of the particles, e.g. inHepMCParticleLink
. In this way the usage ofbarcode()
property
ofGenParticle
a andGenVertex
will be almost eliminated.
- to be able to use the
The 2) was already implemented by @jchapman as an option. See https://indico.cern.ch/event/1298224/contributions/5458615/attachments/2669897/4627904/Migration%20away%20from%20barcodes.pdf
The 1) requires a bit more changes and those are collected in this MR with the idea to split it later into small pieces. Namely:
-
a) Switching from the bare comparison of
status
property of particles to the classificators inTruthUtils
( e.g.isStable
) See !64579 (closed), !64552 (merged) and similar. This is an ongoing work that touches a lot of code, but the changes are trivial. -
b) Switching from the classificators that use the
barcode()
directly asint
to functions that use the underlying objects. See !64571 (merged) This MR will also require the removal of the specification of templatesHepMC::is_simulation_particle()
forint
. -
c) Change the definition of
isStable()
,isPhysical()
,isDecayed()
, i.e. ( status=1,2 particles) to take into account that particles produced in the simulation will have statusoriginal_status + constant x times_particle_interacted
. Implemented in this MR. -
d) Drop the
Barcode
service from theTruthSvc
and instead of increasing the barcode of each particle in the simulation increase the status of particle. Implemented in this MR. -
e) Change the references where it is needed. To be done.
@jchapman The very beginning