class Barcode : public Acts::MultiIndex<uint64_t, 12, 12, 16, 8, 16>
- #include <ActsFatras/EventData/Barcode.hpp>
Particle identifier that encodes additional event information.
The barcode has to fulfill two separate requirements: be able to act as unique identifier for particles within an event and to encode details on the event structure for fast lookup. Since we only care about tracking here, we need to support two scenarios:
Identify which primary/secondary vertex particles belong to. No information on intermediate/unstable/invisible particles needs to be retained. This information is already available in the underlying generator event and should not be duplicated.
If (visible) particles convert, decay, or interact with the detector, we need to be able to identify the initial (primary) particle. Typical examples are pion nuclear interactions or electron/gamma conversions.
The vertex information is encoded as two numbers that define the primary and secondary vertex. The primary vertex must be non-zero. Particles with a zero secondary vertex originate directly from the primary vertex.
Within one vertex (primary+secondary) each particle is identified by a particle, generation, and sub-particle number. Particles originating from the vertex must have zero generation and zero sub-particle number; a consequence is that only non-zero generation can have non-zero sub-particle numbers. A non-zero generation indicates that the particle is a descendant of the original particle, e.g. from interactions or decay, while the sub-particle number identifies the descendant particle.
With this encoding, non-primary particles and their primary parent can be easily identified at the expense of not storing the exact decay history.
A barcode with all elements set to zero (the default value) is an invalid value that can be used e.g. to mark missing or unknown particles.
Barcode(Barcode&&) = default
Barcode(const Barcode&) = default
inline constexpr Value generation() const
Return the generation identifier.
inline Barcode makeDescendant(Value sub = 0u) const
Construct a new barcode representing a descendant particle.
sub – sub-particle index of the new barcode.
inline constexpr Value particle() const
Return the particle identifier.
inline constexpr Barcode &setGeneration(Value id)
Set the particle identifier.
inline constexpr Barcode &setParticle(Value id)
Set the parent particle identifier.
inline constexpr Barcode &setSubParticle(Value id)
Set the process identifier.
inline constexpr Barcode &setVertexPrimary(Value id)
Set the primary vertex identifier.
inline constexpr Barcode &setVertexSecondary(Value id)
Set the secondary vertex identifier.
inline constexpr Value subParticle() const
Return the sub-particle identifier.
inline constexpr Value vertexPrimary() const
Return the primary vertex identifier.
inline constexpr Value vertexSecondary() const
Return the secondary vertex identifier.
- class Barcode : public Acts::MultiIndex<uint64_t, 12, 12, 16, 8, 16>