|
SHiP Data Model
Event data model for the SHiP experiment: C++ data classes with ROOT dictionary support.
|
Monte Carlo particle — input to simulation. More...
#include <MCParticle.hpp>
Public Member Functions | |
| bool | operator== (MCParticle const &) const =default |
Public Attributes | |
| std::int32_t | pdg_code {0} |
| std::array< double, 3 > | vertex {0, 0, 0} |
| Production vertex [mm]. | |
| std::array< double, 3 > | momentum {0, 0, 0} |
| Momentum (px, py, pz) [GeV/c]. | |
| double | energy {0} |
| Total energy [GeV]. | |
| double | time {0} |
| Production time [ns]. | |
| std::int32_t | mother_id {-1} |
| First mother (-1 = none) | |
| std::vector< std::int32_t > | mothers {} |
| All mothers (see above) | |
| std::int32_t | status {1} |
| HepMC status (see above) | |
Monte Carlo particle — input to simulation.
Mother indices refer to the same collection (this event's vector of MCParticle), not to the generator's own record: a producer that filters the record must remap them. -1 means "no mother".
An entry can have several mothers — a hadron from string fragmentation, the products of a hard 2 -> n process, two partons joined into one. mothers is the complete, resolved list: Pythia8's Particle::motherList() provides exactly it, derived from the raw mother1/mother2 pair and the native status, which is what distinguishes an inclusive range of mothers from two distinct ones. mother_id is its first element, or -1 when the entry has no mother.
An empty mothers means either that the entry has no mothers or that it was written before v0.5.0, when the field did not exist. mother_id stays the portable single-mother accessor across all versions.
Taken together, for every entry i of a collection of N particles:
mother_id is -1 or in [0, N);mothers is in [0, N) — the -1 sentinel belongs to mother_id alone and never appears in the list;mothers starts with mother_id;mothers are distinct, and none of them is i. mothers_are_consistent() checks exactly this; mothers_are_populated() adds the requirement that current-schema data actually fill the list. Mothers are deliberately not required to precede their daughters: a producer that filters a generator record and remaps indices may reorder it.status follows the HepMC convention — the codes Pythia8's statusHepMC() produces, the same set EDM4hep uses for generatorStatus:
|
default |
| double SHiP::MCParticle::energy {0} |
Total energy [GeV].
| std::array<double, 3> SHiP::MCParticle::momentum {0, 0, 0} |
Momentum (px, py, pz) [GeV/c].
| std::int32_t SHiP::MCParticle::mother_id {-1} |
First mother (-1 = none)
| std::vector<std::int32_t> SHiP::MCParticle::mothers {} |
All mothers (see above)
| std::int32_t SHiP::MCParticle::pdg_code {0} |
| std::int32_t SHiP::MCParticle::status {1} |
HepMC status (see above)
| double SHiP::MCParticle::time {0} |
Production time [ns].
| std::array<double, 3> SHiP::MCParticle::vertex {0, 0, 0} |
Production vertex [mm].